AnsweredAssumed Answered

Service parameters and return value

Question asked by mhw on Sep 14, 2011
Latest reply on Aug 27, 2012 by trevershick
Hi, I am trying to interact with a service facade using XML only. I am stuck with how to pass parameters from outside expressions.

I have the following process:
<serviceTask id="javaService" name="Read voltage"
      activiti:expression="#{ServiceDelegate.execute()}"
      activiti:resultVariable="voltage">
      <extensionElements>
         <activiti:field name="serviceName">
            <activiti:string>READ_VOLTAGE</activiti:string>
         </activiti:field>
      </extensionElements>
   </serviceTask>
   <sequenceFlow id="flow2" sourceRef="exclusiveGw" targetRef="theTask1">
      <conditionExpression xsi:type="tFormalExpression">{voltage == 12.1}</conditionExpression>
    </sequenceFlow>

Now I want to access the filed "serviceName" from the execute-Method. Unlike realized with "activiti:class" the field is not injected. But I have to use "activiti:expression" since I need the "activiti:resultVariable".

Could anybody please help?

regards, Michael

Outcomes