public Connector5Descriptor(Instance connectorInstance) {
    this.uuid = connectorInstance.getUuid();
    this.name = connectorInstance.get(NAME);
    this.connectorId = connectorInstance.get(CONNECTOR_ID);
    this.documentation = connectorInstance.get(DOCUMENTATION);
    this.event = connectorInstance.get(EVENT);
    this.ignoreErrors = connectorInstance.get(ERROR_HANDLE);
    final List<Instance> parameters = connectorInstance.get(PARAMETERS);
    for (Instance parameter : parameters) {
      String key = parameter.get(PARAMETER_KEY);
      Object value = parameter.get(PARAMETER_VALUE);
      inputs.put(key, value);
    }
    final List<Instance> outputMapping = connectorInstance.get(OUTPUTS);
    for (Instance output : outputMapping) {
      try {
        Instance data = output.get(OUTPUT_DATA);
        String value = output.get(OUTPUT_EXPRESSION);
        if (data != null) {
          outputs.put((String) data.get("name"), value);
        } else {
          Instance container = connectorInstance.getContainer();
          if (container.instanceOf("form.Widget")) {
            String id = "field_" + container.get("name");
            outputs.put(id, value);
          }
        }
      } catch (IllegalArgumentException e) {
        BonitaStudioLog.warning(
            "The connector "
                + connectorId
                + "/"
                + name
                + " doesn't provide the expected feature for outputs.",
            BarImporterPlugin.PLUGIN_ID);
      }
    }
    definitionMapper =
        ConnectorIdToDefinitionMapping.getInstance().getDefinitionMapper(connectorId);

    this.containerType = connectorInstance.getContainer().getType().getEClass();
  }
  private void createOperation(
      Model model,
      Instance connectorInstance,
      StringToExpressionConverter converter,
      final String variableToSet,
      final String varValue) {
    Instance operationContainerInstance = connectorInstance.getContainer();
    Instance originalVariable = getOriginalVariable(model, variableToSet);

    // set variable dependency of left operand
    String returnType = Object.class.getName();
    Instance leftOperand = null;
    if (originalVariable != null) {
      returnType = StringToExpressionConverter.getDataReturnType(originalVariable);
      leftOperand =
          StringToExpressionConverter.createExpressionInstanceWithDependency(
              model,
              variableToSet,
              variableToSet,
              returnType,
              ExpressionConstants.VARIABLE_TYPE,
              true,
              originalVariable);
    } else {
      leftOperand =
          StringToExpressionConverter.createExpressionInstance(
              model,
              variableToSet,
              variableToSet,
              returnType,
              ExpressionConstants.VARIABLE_TYPE,
              true);
    }
    Instance rightOperand = converter.parse(varValue, returnType, false);
    Instance operatorInstance = model.newInstance("expression.Operator");
    operatorInstance.set("type", ExpressionConstants.ASSIGNMENT_OPERATOR);
    Instance operationInstance = model.newInstance("expression.Operation");
    operationInstance.set("leftOperand", leftOperand);
    operationInstance.set("rightOperand", rightOperand);
    operationInstance.set("operator", operatorInstance);
    operationContainerInstance.add("operations", operationInstance);
  }