In our process there is a multi instance task where the user has to make a decision: approve, reject or rework a document. We have modeled this as a multi instance sub-process (expanded) with user task inside. In the user task there is a variable called “decision” of type enum with the given id/value. But when the user completes the task and we put his decision into the array (to keep it for history reason) within end execution listener we’ve got an exception:
2019-04-25 17:40:08,032 ERROR [org.camunda.bpm.engine.context] (pool-10-thread-48) ENGINE-16004 Exception while closing command context: Unable to evaluate script: groovy.lang.MissingPropertyException: No such property: decision for class: Script275: org.camunda.bpm.engine.ScriptEvaluationException: Unable to evaluate script: groovy.lang.MissingPropertyException: No such property: decision for class: Script275
The form field is defined as follows:
<camunda:formField id="decision" label="Decision" type="enum">
<camunda:validation>
<camunda:constraint name="required" />
</camunda:validation>
<camunda:value id="approve" name="Approve" />
<camunda:value id="reject" name="Reject" />
<camunda:value id="rework" name="To Rework" />
</camunda:formField>
The listener (groovy script) is as follows:
approverDecisionsArray[loopCounter] = decision;
Any ideas?