AnsweredAssumed Answered

See progress of script tasks

Question asked by nixikanius on Jul 21, 2015
Latest reply on Jul 23, 2015 by martin.grofcik
Hello.

I created test process:


<process id="connectionRequestProcess" name="Connection Request Process" isExecutable="true">
    <startEvent id="startevent1" name="Request received"></startEvent>
    <scriptTask id="scripttask1" name="Script Task" activiti:async="true" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <script>sleep(20000);</script>
    </scriptTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="scripttask1"></sequenceFlow>
    <endEvent id="endevent1" name="Request processed"></endEvent>
    <scriptTask id="scripttask2" name="Script Task" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <script>sleep(20000);</script>
    </scriptTask>
    <scriptTask id="scripttask3" name="Script Task" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <script>sleep(20000);</script>
    </scriptTask>
    <sequenceFlow id="flow3" sourceRef="scripttask2" targetRef="scripttask3"></sequenceFlow>
    <sequenceFlow id="flow4" sourceRef="scripttask3" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow5" sourceRef="scripttask1" targetRef="scripttask2"></sequenceFlow>
  </process>


As you see the first task of process is asynchronous. It needs to start process asynchronously. When I start process in this way I see in activiti-explorer and in activiti-rest that activity_id for process instance is always set to scripttask1 even when this task is completed (for example in 30 seconds after process start).

Is there anyway to see actual progress of script tasks in Activiti? We need asynchronous process with some direct script tasks and want to see where each process instance is now.

Outcomes