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"?>

   <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">
            This form will be used to manually approve the orders.  
      <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"/>

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(
   at org.activiti.engine.impl.juel.AstMethod.invoke(
   at org.activiti.engine.impl.juel.AstMethod.eval(
   at org.activiti.engine.impl.juel.AstEval.eval(
   at org.activiti.engine.impl.juel.AstNode.getValue(
   at org.activiti.engine.impl.juel.TreeValueExpression.getValue(
   at org.activiti.engine.impl.el.JuelExpression.getValue(
   … 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 ?