Hi,
I has one requirement related to the process variables usage in camunda 7.
I’m setting some process variables in the execution using 2 ways, First I’m setting them using the execution listeners in the process xml. Please refer example below.
bpmn:extensionElements
<camunda:executionListener expression=“${execution.setVariable('jsonData', "997ba660-db90-4762-9069-739da7bde72f")}” event=“start” name=“jsonData” type=“{"variableType":"GLOBAL","dataType":"FILE"}” value=“"997ba660-db90-4762-9069-739da7bde72f"” />
<camunda:executionListener expression=“${execution.setVariable('Details', "")}” event=“start” name=“Details” type=“{"variableType":"GLOBAL","dataType":"STRING"}” value=“""” />
<camunda:executionListener expression=“${execution.setVariable('workflowId', 200)}” event=“start” name=“workflowId” type=“{"variableType":"GLOBAL","dataType":"INTEGER"}” value=“200” />
</bpmn:extensionElements>
Another setting of variables is through the start process defintion with key api(POST
/process-definition/key/{key}/start). I’m passing variables with this api.
So, here comes my conflict, if both these variables contains a common variable name, then which one will be used in the execution. My usecase is I want the variables sent through the start process api should replace the ones set in the xml, as they are going last, but it is not happening, can I do anything to set up the scope or priority of the variables which to be taken when there is a conflict?
Please if anyone knows about this provide me with some details.
Thank you.