I have this simple BPMN that accepts an invoice
process variable. The invoice
variable contains an ArrayList
of Charge objects called charges
.
The multi-instance business rule task implemented as a DMN is configured to process each charge as shown below.
However, when execution arrives at the DMN, the following error message is printed.
org.camunda.bpm.engine.ProcessEngineException: ENGINE-02025 Variable ‘invoice.charges’ is not of the expected type ‘Collection’.
This is confusing me, because I have verified that the type of the charges
is ArrayList, and in the Script Task preceding the DMN, a Groovy script loops over the list and prints each description to standard out, which results in the expected output.
Here is the standard output from the script followed by the error.
class java.util.ArrayList
CHARGE
ANOTHER_CHARGE
2020-04-21 19:15:13.190 ERROR 62340 — [ main] org.camunda.bpm.engine.context : ENGINE-16004 Exception while closing command context: ENGINE-02025 Variable ‘invoice.charges’ is not of the expected type ‘Collection’.
Why is the multi-instance business rule task not recognizing the list of charges as a Collection?
MOCK_CLIENT-process.bpmn (3.5 KB)