AnsweredAssumed Answered

Problem iin Activiti - Async

Question asked by vimalan.dharma on Oct 7, 2013
Latest reply on Oct 9, 2013 by frederikheremans1

I have taken sample async bpmn from your site. Where i added service task instead of script task. when i run this activiti, i got the response immediately. Thats perfect. But the problem here is in the service task delegate the task to the Java class , this java class is never ever executed. I dont know why.

when i remove the activiti:async=true. This above java deleagate class has been executed perfectly.
The scenario is, Calling this activiti from UI. I have to send 200 response code to the UI side to not wait until this activiti completes.
Moreover my activiti takes longer time to complete. In this time UI has aborted the connection afterthat not able to proceed.

This is my sample bpmn.xml file. Taken AsynScript file from ur site. Here service task is used instead of calling script task.

<?xml version="1.0" encoding="UTF-8"?>

  <process id="asyncScript">
    <startEvent id="theStart" />
    <sequenceFlow sourceRef="theStart" targetRef="script" />
    <serviceTask id="script" activiti:class="com.activiti.task.ServiceTask" activiti:async="true"></serviceTask>
   <!–  <scriptTask id="script" activiti:async="true" scriptFormat="juel">
    </scriptTask> –>
    <sequenceFlow sourceRef="script" targetRef="wait" />
    <receiveTask id="wait" />
    <sequenceFlow sourceRef="wait" targetRef="theEnd" />
    <endEvent id="theEnd" />

Please help me on this. i am trying all the possibilities not no clues.