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

I can correlate a message by local execution variable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.7.0, 7.7.0-alpha2
    • Component/s: engine
    • Labels:

      Description

      AT:

      • it is possible to correlate a message by a local execution variable
      • possible though fluent builder
      • possible through REST Api

        Issue Links

          Activity

          Hide
          meyer Daniel Meyer added a comment -

          Workaround:

          Use an execution query:

          Execution e = runtimeService.createExecutionQuery().variableValueEquals("correlationVariableName", 777).messageEventSubscriptionName("MESSAGE_NAME").singleResult();

          and then trigger it:

          runtimeService.messageEventReceived("MESSAGE_NAME", execution.getId());

          Show
          meyer Daniel Meyer added a comment - Workaround: Use an execution query: Execution e = runtimeService.createExecutionQuery().variableValueEquals("correlationVariableName", 777).messageEventSubscriptionName("MESSAGE_NAME").singleResult(); and then trigger it: runtimeService.messageEventReceived("MESSAGE_NAME", execution.getId());
          Hide
          meyer Daniel Meyer added a comment -

          Falko Menge it will be part of 7.7

          Show
          meyer Daniel Meyer added a comment - Falko Menge it will be part of 7.7
          Hide
          menge Falko Menge added a comment -

          A slightly better workaround is possible with 7.6.0:

          Put that local variable into the message name with UEL, e.g.

           <bpmn:message id="Message_1" name="MESSAGE_NAME_${correlationVariableName}" />
          

          and then correlate only via message name:

           runtimeService.correlateMessage("MESSAGE_NAME_" + correlationVariableValue);
          

          However, I still see a lot of demand for correlation on variables in our customers projects.

          Show
          menge Falko Menge added a comment - A slightly better workaround is possible with 7.6.0: Put that local variable into the message name with UEL, e.g. <bpmn:message id= "Message_1" name= "MESSAGE_NAME_${correlationVariableName}" /> and then correlate only via message name: runtimeService.correlateMessage( "MESSAGE_NAME_" + correlationVariableValue); However, I still see a lot of demand for correlation on variables in our customers projects.
          Hide
          svetlana.dorokhova Svetlana Dorokhova added a comment -

          Smirnov Roman, please review the changes.

          Show
          svetlana.dorokhova Svetlana Dorokhova added a comment - Smirnov Roman , please review the changes.

            People

            • Assignee:
              roman.smirnov Smirnov Roman
              Reporter:
              meyer Daniel Meyer
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development