cancel
Showing results for 
Search instead for 
Did you mean: 

Returning multiple parameters from service task?

alebu
Champ in-the-making
Champ in-the-making
Is it possible to return more than one parameter from service task and map them to a different process variables?
For example:
<serviceTask … activiti:expression="${<someObjectsMethodCallWithParameters>}" activiti:resultVariable="<processVariableName>" />
Will mimic typical java method call where only one parameter may be returned, but as I understand BPMN supports possibility to return
multiple named values, so it technically should be possible to have a service task that returns for example two variables - x and y.
And it should be possible to map them to some process variables.
I was trying to play with activiti:class or activiti:delegateExpression but with no luck.
In general, how it possible to specify an output for activiti:class or activiti:delegateExpression or isit not possible at all?
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

No, you would need to set the process variables yourself in the service task implementation, if you need multiple process variables set.

Best regards,