AnsweredAssumed Answered

Unit testing processes with async tasks

Question asked by imbaczek on Dec 20, 2013
Latest reply on Dec 23, 2013 by imbaczek

This process' script1 task executes just fine in a unit test.

   <process id="my-process">

      <startEvent id="start" />
      <sequenceFlow id="flow1" sourceRef="start" targetRef="script1" />

      <scriptTask id="script1"
         name="log" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <sequenceFlow id="flow2" sourceRef="script1" targetRef="end" />

      <endEvent id="end" />

But when I set activiti:async="true" in script1, the script doesn't execute, which is kind of expected. What to do to make it work? I need to unit test long-running scripts (waiting for external program output.)