AnsweredAssumed Answered

Help in executing a script task in activiti6

Question asked by bond007 on May 5, 2016
Latest reply on May 6, 2016 by martin.grofcik
Hi
I've one very basic question. I'm not able to execute any script task. It just adds two numbers and  wants to dispaly/store the output. but i'm not getting it. Please help

PFB my XML file

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
  <process id="script" name="script" isExecutable="true">
    <startEvent id="startEvent1" activiti:isInterrupting="false"></startEvent>
    <scriptTask id="theScriptTask" name="ScriptTask" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <script><![CDATA[sum = 10+70]]></script>
    </scriptTask>
    <sequenceFlow id="sid-1F24AB50-A78F-4AA8-AFC7-F8632C83E112" sourceRef="startEvent1" targetRef="theScriptTask"></sequenceFlow>
    <endEvent id="sid-0BE46A42-6F29-46A1-875C-9BCBB104A444"></endEvent>
    <sequenceFlow id="sid-5CA2305C-F589-49D8-BAD4-7065DCC965A8" sourceRef="theScriptTask" targetRef="sid-0BE46A42-6F29-46A1-875C-9BCBB104A444"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_script">
    <bpmndi:BPMNPlane bpmnElement="script" id="BPMNPlane_script">
      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
        <omgdc:Bounds height="30.0" width="30.0" x="135.0" y="85.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="theScriptTask" id="BPMNShape_theScriptTask">
        <omgdc:Bounds height="80.0" width="100.0" x="285.0" y="60.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-0BE46A42-6F29-46A1-875C-9BCBB104A444" id="BPMNShape_sid-0BE46A42-6F29-46A1-875C-9BCBB104A444">
        <omgdc:Bounds height="28.0" width="28.0" x="510.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-1F24AB50-A78F-4AA8-AFC7-F8632C83E112" id="BPMNEdge_sid-1F24AB50-A78F-4AA8-AFC7-F8632C83E112">
        <omgdi:waypoint x="165.0" y="100.0"></omgdi:waypoint>
        <omgdi:waypoint x="285.0" y="100.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-5CA2305C-F589-49D8-BAD4-7065DCC965A8" id="BPMNEdge_sid-5CA2305C-F589-49D8-BAD4-7065DCC965A8">
        <omgdi:waypoint x="385.0" y="101.05820105820106"></omgdi:waypoint>
        <omgdi:waypoint x="510.0031343576359" y="103.70377003931505"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Outcomes