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

Type Information lost when setting variables by message

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Duplicate
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • 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());

        This is the controller panel for Smart Panels app

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

                Created:
                Updated:
                Resolved: