JBoss Community

jBpm 4.3 service task has no optional args?

reply from Tim S in jBPM - View the full discussion

Thanks for the reply. I did upgrade to 4.4 and after a little  head-scratching I realised I was encountering JBPM-2830. Your patch  restored my application built on 4.3 to the point that I can start and  list process instances so I'm hoping it is agreed to restore the  previous behaviour.

 

I tried again to call a Java Service Task with an arg that is not populated at the time the service task is invoked:

    <itemDefinition id="registerUserItemDef" >
         <jbpm:arg>
             <jbpm:object expr="#{user}" />
         </jbpm:arg>
         <jbpm:arg>
             <jbpm:object expr="#{groups}" />
         </jbpm:arg>
     </itemDefinition>

    ...

    <operation id="registerUser" name="registerUser">

 

and this time I get a different error:

  org.jbpm.pvm.internal.wire.WireException: couldn't invoke  method registerUser: couldn't create argument 1: Cannot resolve  identifier 'groups'
       at org.jbpm.bpmn.flownodes.JavaServiceTaskActivity.perform(JavaServiceTaskActivity.java:92)

 

Once again, creating a variable named groups allows the service task to be invoked successfully.

Tim

Reply to this message by going to Community

Start a new discussion in jBPM at Community