Activiti Workflow - Task can't be completed Error

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2016 06:47 AM
Hi .. I am new to Activiti ..i am using Activiti Enterprise edition 1.4 for workflows. i am using the REST APIs to get the details of the workflows. I have defined a sample process to check how this can be achieved.
Please see my sample process :
For the first task, everything is fine, but for the second task(Submitted to GPC), I am not able to complete the task. It expects some variables (sendtooe) which I am passing when calling the REST (http://localhost:8080/activiti-app/api/enterprise/tasks/7524/action/complete). But I get the task cannot be completed message.
Could someone please guide me here as what I am doing wrong here.
Any help would be appreceiated.
Please see my sample process :
<?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/test"> <process id="GPCWorkflow_Basic" name="GPC Workflow Basic" isExecutable="true"> <startEvent id="startOEWorkflow" name="StartOEWorkFlow" activiti:initiator="startGPCWorkflow" activiti:formKey="start GPC Workflow"></startEvent> <sequenceFlow id="flow1" sourceRef="startOEWorkflow" targetRef="oe_draft"></sequenceFlow> <sequenceFlow id="flow2" sourceRef="oe_draft" targetRef="oe_submitted"></sequenceFlow> <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway> <sequenceFlow id="finalFlow" name="Final Flow" sourceRef="exclusivegateway1" targetRef="processFinal"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[{sendtooe == false}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="flow8" sourceRef="oe_submitted" targetRef="exclusivegateway1"></sequenceFlow> <sequenceFlow id="sendtoOE" name="send to OE" sourceRef="exclusivegateway1" targetRef="receivetask2"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[{sendtooe == true}]]></conditionExpression> </sequenceFlow> <userTask id="oe_draft" name="Draft"> <documentation>The OE form is opened in Draft status. The status won't change until all the validations are fulfilled.</documentation> </userTask> <userTask id="oe_submitted" name="Submitted to GP&C"></userTask> <receiveTask id="processFinal" name="Final"> <documentation>The OE form is verified and validated by the GPC Admin. If the verification is successfull the process is completed to Final.</documentation> </receiveTask> <receiveTask id="receivetask2" name="Send to OE"> <documentation>The OE user can again edit the form based on the GP&C feedback.</documentation> </receiveTask> <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway> <sequenceFlow id="flow12" sourceRef="processFinal" targetRef="exclusivegateway2"></sequenceFlow> <endEvent id="endevent1" name="End"></endEvent> <sequenceFlow id="gpc_complete" name="complete task" sourceRef="exclusivegateway2" targetRef="endevent1"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[{reopen == false}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="gpc_reopen" name="Reopen" sourceRef="exclusivegateway2" targetRef="receivetask2"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[{reopen == false}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="oe_resubmit" name="Re Submit" sourceRef="receivetask2" targetRef="oe_submitted"></sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_GPCWorkflow_Basic"> <bpmndi:BPMNPlane bpmnElement="GPCWorkflow_Basic" id="BPMNPlane_GPCWorkflow_Basic"> <bpmndi:BPMNShape bpmnElement="startOEWorkflow" id="BPMNShape_startOEWorkflow"> <omgdc:Bounds height="35.0" width="35.0" x="140.0" y="260.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1"> <omgdc:Bounds height="40.0" width="40.0" x="820.0" y="258.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="oe_draft" id="BPMNShape_oe_draft"> <omgdc:Bounds height="75.0" width="105.0" x="220.0" y="240.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="oe_submitted" id="BPMNShape_oe_submitted"> <omgdc:Bounds height="75.0" width="105.0" x="460.0" y="241.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="processFinal" id="BPMNShape_processFinal"> <omgdc:Bounds height="55.0" width="105.0" x="970.0" y="250.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="receivetask2" id="BPMNShape_receivetask2"> <omgdc:Bounds height="76.0" width="105.0" x="790.0" y="380.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2"> <omgdc:Bounds height="40.0" width="40.0" x="1120.0" y="258.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> <omgdc:Bounds height="35.0" width="35.0" x="1205.0" y="261.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="175.0" y="277.0"></omgdi:waypoint> <omgdi:waypoint x="220.0" y="277.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="325.0" y="277.0"></omgdi:waypoint> <omgdi:waypoint x="460.0" y="278.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="finalFlow" id="BPMNEdge_finalFlow"> <omgdi:waypoint x="860.0" y="278.0"></omgdi:waypoint> <omgdi:waypoint x="970.0" y="277.0"></omgdi:waypoint> <bpmndi:BPMNLabel> <omgdc:Bounds height="14.0" width="49.0" x="870.0" y="286.0"></omgdc:Bounds> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"> <omgdi:waypoint x="565.0" y="278.0"></omgdi:waypoint> <omgdi:waypoint x="820.0" y="278.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="sendtoOE" id="BPMNEdge_sendtoOE"> <omgdi:waypoint x="840.0" y="298.0"></omgdi:waypoint> <omgdi:waypoint x="842.0" y="380.0"></omgdi:waypoint> <bpmndi:BPMNLabel> <omgdc:Bounds height="14.0" width="53.0" x="850.0" y="330.0"></omgdc:Bounds> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12"> <omgdi:waypoint x="1075.0" y="277.0"></omgdi:waypoint> <omgdi:waypoint x="1120.0" y="278.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="gpc_complete" id="BPMNEdge_gpc_complete"> <omgdi:waypoint x="1160.0" y="278.0"></omgdi:waypoint> <omgdi:waypoint x="1205.0" y="278.0"></omgdi:waypoint> <bpmndi:BPMNLabel> <omgdc:Bounds height="14.0" width="66.0" x="1159.0" y="294.0"></omgdc:Bounds> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="gpc_reopen" id="BPMNEdge_gpc_reopen"> <omgdi:waypoint x="1140.0" y="298.0"></omgdi:waypoint> <omgdi:waypoint x="1139.0" y="417.0"></omgdi:waypoint> <omgdi:waypoint x="895.0" y="418.0"></omgdi:waypoint> <bpmndi:BPMNLabel> <omgdc:Bounds height="14.0" width="37.0" x="1011.0" y="429.0"></omgdc:Bounds> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="oe_resubmit" id="BPMNEdge_oe_resubmit"> <omgdi:waypoint x="790.0" y="418.0"></omgdi:waypoint> <omgdi:waypoint x="513.0" y="418.0"></omgdi:waypoint> <omgdi:waypoint x="512.0" y="316.0"></omgdi:waypoint> <bpmndi:BPMNLabel> <omgdc:Bounds height="14.0" width="48.0" x="591.0" y="430.0"></omgdc:Bounds> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram></definitions>
For the first task, everything is fine, but for the second task(Submitted to GPC), I am not able to complete the task. It expects some variables (sendtooe) which I am passing when calling the REST (http://localhost:8080/activiti-app/api/enterprise/tasks/7524/action/complete). But I get the task cannot be completed message.
Could someone please guide me here as what I am doing wrong here.
Any help would be appreceiated.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2016 04:23 AM
Hi,
jUnit test would help.
https://forums.activiti.org/content/sticky-how-write-unit-test
Regards
Martin
jUnit test would help.
https://forums.activiti.org/content/sticky-how-write-unit-test
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2016 02:33 AM
Hi Martin,
Thanks a lot. That was helpful. I fixed the issue. I have to change the condition from ${sendtooe ==false"} to ${sendtooe .equals("false")}.
Regards,
Kiran
Thanks a lot. That was helpful. I fixed the issue. I have to change the condition from ${sendtooe ==false"} to ${sendtooe .equals("false")}.
Regards,
Kiran
