AnsweredAssumed Answered

Activiti 6 Task Assignment Issue

Question asked by abu on Nov 9, 2015
Latest reply on Nov 11, 2015 by trademak

I ran into an issue when trying to setup a simple workflow using Activiti 6.0.0 Beta1.

My Development Environment:
Spring Boot 1.2.6
Activiti 6.0.0. Beta 1
Eclipse STS.

I'm using spring boot and have added the Activiti 6 jar dependencies manually in the gradle file.

The workflow process is a simple one - basically, from my spring base java code, whenever there is an exception, I instantiate an Activiti "ErrorProcess" (a process that I created using Activiti 6 UI App). This "ErrorProcess" is passed the "exceptionDetails" from the java code as a string, and in the workflow, there is a UserTask that uses "" as the Assignee. Basically, the form just retrieves the ${exceptionDetails} from the start node and displays in a "display text" field.


There are two issues that I can observe:
1. The process does get deployed correctly. However, the issue is that the task assignment doesn't seem to be happening correctly. I.e., when I log into the Activiti 6 UI App and view the Tasks tab, there are no tasks assigned for "". I also tried assigning to a candidate group (Superusers) that the user "" is part of, but that yielded the same result (i.e. the task was not visible in the tasks tab).

2. In the Activiti UI App (AngularJS based), when I try to initiate a new process instance, the right hand pane seems to be loading the form but it doesn't appear (all I can see is animation with three dots indicating that it is still being loaded…). The actual form with exceptionDetails field is not displayed.

What could be the issue ? Greatly appreciate any insights you could provide as we are looking forward to use Activiti 6 in a large project, however, this has become a show stopper.

The BPMN file is given below:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="" xmlns:xsi="" xmlns:xsd="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" typeLanguage="" expressionLanguage="" targetNamespace="">
  <process id="ErrorProcess" name="ErrorProcess" isExecutable="true">
    <startEvent id="startevent1" name="Start" activiti:initiator="" activiti:isInterrupting="false">
        <activiti:formProperty id="exceptionDetails" name="Exception Details" type="string" required="true"></activiti:formProperty>
    <userTask id="usertask1" name="User Task" activiti:assignee="" activiti:candidateGroups="Superusers" activiti:formKey="10">
        <modeler:form-reference-id xmlns:modeler="">10</modeler:form-reference-id>
        <modeler:form-reference-name xmlns:modeler="">ErrorDetailsForm</modeler:form-reference-name>
        <modeler:initiator-can-complete xmlns:modeler="">true</modeler:initiator-can-complete>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  <bpmndi:BPMNDiagram id="BPMNDiagram_ErrorProcess">
    <bpmndi:BPMNPlane bpmnElement="ErrorProcess" id="BPMNPlane_ErrorProcess">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="300.0"></omgdc:Bounds>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55.0" width="105.0" x="180.0" y="285.0"></omgdc:Bounds>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="28.0" width="28.0" x="330.0" y="300.0"></omgdc:Bounds>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="129.99660595085598" y="314.68092327764134"></omgdi:waypoint>
        <omgdi:waypoint x="180.0" y="313.6170212765957"></omgdi:waypoint>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="285.0" y="313.2062780269058"></omgdi:waypoint>
        <omgdi:waypoint x="330.0012666944829" y="313.81167623355805"></omgdi:waypoint>

The java code that creates a new process instance:

Map<String, Object> variables = new HashMap<String, Object>();
      variables.put("exceptionDetails", "exception details…");
ProcessInstance processInstance = runtimeService
                  "ErrorProcess", variables);

Many Thanks !