AnsweredAssumed Answered

Expressions, variables and processId

Question asked by imamchishty on Apr 3, 2012
Latest reply on Apr 4, 2012 by imamchishty
I have a spring bean which requires several variables, lets imagine the service method is as follows:

void doSomething(String song, String id);

The task is defined as below:

<serviceTask id="task1" name="songTask" activiti:expression="#{bean.doSomething(song, id)}>
<extensionElements>
<activiti:field name="song" stringValue="november rain" />
</extensionElements>
</serviceTask>

Questions:
1. When the task is fired song is not found, even though its been defined in the extension elements. I would've expected the song property to have been added to the variables map within the process instance.

2. The second param required is the actual process instance Id. I know that this can be obtained from the delegate expression, but I don't wish to make my beans have a dependency on activiti. How can the id passed in?

Thanks

Outcomes