AnsweredAssumed Answered

expression to pass activiti variable to spring method

Question asked by billbert on Feb 29, 2012
Latest reply on Mar 5, 2012 by billbert
I am trying to pass the processInstanceId and TaskDefinitionKey to a spring Bean using expression. 

If I call ${springBean.sendMessage("Hello World")} it works great!

When I call ${springBean.sendMessage(" ${task.getTaskDefinitionKey()} ")} my message is
" ${task.getTaskDefinitionKey() " instead of "createOrder"

Listed below is my actual user task.

I'm probably doing something not exactly right.   Any help would be greatly appreciated.  Really enjoy working with the product.

    <userTask id="createOrder" name="Create Order" activiti:assignee="automation">
      <documentation>"Create Order"</documentation>
        <activiti:formProperty id="orderNumber" name="Order Number" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
        <activiti:taskListener event="create" expression="${springBean.sendMessage(&quot;{ \&quot;processinstanceid\&quot;:\&quot;${task.getProcessInstanceId()}\&quot;, \&quot;taskdefinitionkey\&quot;:\&quot;${task.getTaskDefinitionKey()}\&quot; } &quot;)}"></activiti:taskListener>