AnsweredAssumed Answered

ServiceTask after usertask ?

Question asked by stroobat on Feb 15, 2011
Latest reply on Jun 27, 2012 by nocheinandi
I have the following configuration:

<?xml version="1.0" encoding="UTF-8"?>

<definitions>
   <process name="Order_model" id="Order_model">

      <startEvent id="startOrder" name=""/>

      <serviceTask id="INITIATE_ORDER" name="Initiate the order" activiti:expression="#{orderServiceImpl.initiateOrder(execution)}" />

      <userTask id="provisionOrder" name="Validate and provision the order" activiti:formKey="approve.form">
          <documentation>
            This form will be used to manually approve the orders.  
          </documentation>
          <potentialOwner>
            <resourceAssignmentExpression>
              <formalExpression>management</formalExpression>
            </resourceAssignmentExpression>
          </potentialOwner>
      </userTask>
      <endEvent id="endOrderEvent" name=""/>
<serviceTask id="PLACE_ORDER" name="Place and persist the order" activiti:expression="#{orderServiceImpl.placeOrder(execution)}" />
      <sequenceFlow id="SequenceFlow" name="" sourceRef="startOrder" targetRef="INITIATE_ORDER"/>
      <sequenceFlow id="SequenceFlow_1" name="" sourceRef="INITIATE_ORDER" targetRef="provisionOrder"/>
      <sequenceFlow id="SequenceFlow_2" name="" sourceRef="provisionOrder" targetRef="PLACE_ORDER"/>
      <sequenceFlow id="SequenceFlow_3" name="" sourceRef="PLACE_ORDER" targetRef="endOrderEvent"/>
   </process>
</definitions>

The first servicetask runs without a problem.
I can open the taskform in the activiti explorer. But when I hit the OK button in the form I get the exception:

Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'orderServiceImpl'
   at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
   at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
   at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
   at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
   at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
   at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
   at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:44)
   … 36 more

Seems like activiti tries to resolve the xml line:

<serviceTask id="PLACE_ORDER" name="Place and persist the order" activiti:expression="#{orderServiceImpl.placeOrder(execution)}" />
as a field submitted from the form.

The method and class exist. Even when I use the same xml as the first serviceTask I still get the same error.
My intention is just to execute the method placeOrder in the class OrderServiceImpl after I hit the 'OK' button in the activiti form.

Any ideas ?

Outcomes