Closed ThorbenLindhauer closed 10 months ago
setVariablesToTriggeredScope
)? Tricky part here is that there's no new scope.variablesToTriggeredScope
at all)
setVariablesLocal
variablesToTriggeredScope
at all)
setVariablesLocal
is semantically the same in this use caseDecision: For both use cases second option with arguments considering user expectations and existing implementation. Also, reached out to the customer to get their feedback. So far we are not aware if they are using those two events and if they have intentions to use the new parameter with them.
To consider: add a test case with async continuation.
Notes:
asyncAfter
is used, the behaviour is the same asyncBefore
is used, the behaviour is different as the new execution is created before the correlation. We still can assign the variables to that scope just we need to do it earlier.Therefore, I adjusted setting the variables at earlier point in PVM instead of PvmAtomicOperationActivityStart
:
PvmAtomicOperationActivityStartConcurrent
PvmAtomicOperationActivityStartCancelScope
ExecutionEntity(PvmExecutionImpl).setDelayedPayloadToNewScope
(after SubProcessActivityBehavior
triggers execution.executeActivity("message"). I created https://github.com/camunda/camunda-bpm-platform/issues/3979 to move out the logic from the execution to the operations.@danielkelemen, I covered async continuation scenario and implemented the review hints. Ready for review on master and 7.20
Handover to QA:
Docs REST API for message correlation: https://docs.camunda.org/rest/camunda-bpm-platform/7.20/#tag/Message/operation/deliverMessage
new variable processVariablesToTriggeredScope
to be used
Use cases:
Example processes:
testLocalVar=outputValue
Tested on 7.20.2
patch
This issue was imported from JIRA:
There is an additional correlation parameter that takes variables with the following semantics:
Intermediate message event/receive task: Set the variables on the execution that is in the intermediate event (like
setVariablesLocal
) Event sub process: Set the variables on the execution that represents the scope instance of the event sub process (unlikesetVariablesLocal
)User Problem
User Story (Required on creation):
As a developer, I want to be able to define in the BPMN, how a certain error should be handled based on a variable.
Functional Requirements (Required before implementation):
variablesToTriggeredScope
that are assigned to the new scope triggered by correlationTechnical Requirements (Required before implementation):
Limitations of Scope (Optional):
Breakdown
setVariablesToTriggeredScope
toMessageCorrelationBuilder
and implementationPvmExecutionImpl
EventHandlerImpl.handleIntermediateEvent()
fetch the payload input and add it to the process instance execution (as a dedicated tuple: activityId, variables)PvmAtomicOperationActivityStart#getScope()
is executed check if activity is a message and variables not empty in PI, set the payload to the (right) executionpopulate this information in the activity behaviour(BoundaryEventActivityBehavior
,EventSubProcessStartEventActivityBehavior
, andIntermediateCatchEventActivityBehavior
) Fetch the type from the "type" property of the activityprocessVariablesToTriggeredScope
inCorrelationMessageDto
Hints
Execution Tree Examples
example-1.pdf example-2.pdf example-3.pdf example-4.pdf
Links: