Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-4717

Type Information lost when setting variables by message

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Duplicate
    • L3 - Default
    • None
    • None
    • engine
    • None

    Description

      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());

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce