Type Information lost when setting variables by message

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Duplicate
    • Priority: L3 - Default
    • None
    • Affects Version/s: None
    • Component/s: engine
    • None

      When setting a typed Variable (e.g. a file like in the code example below) this information is lost when correlating a Message:
      BpmPlatform.getDefaultProcessEngine().getRuntimeService().createMessageCorrelation("MSG_DOCUMENT_RECEIVED")
      ...
      .setVariables(variables)
      .correlate();

      Probably because this is a Map instead of a VariableMap:
      https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/MessageCorrelationBuilderImpl.java#L39

      My variable:
      VariableMap variables = Variables.createVariables().putValueTyped(
      "document",
      Variables
      .fileValue((String)documentVariable.getValueInfo().get("filename"))
      // Base64.decodeBase64(
      .file(((String)documentVariable.getValue()).getBytes("UTF-8"))
      .mimeType((String)documentVariable.getValueInfo().get("mimeType"))
      .create());

            Assignee:
            Unassigned
            Reporter:
            Bernd Ruecker
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: