-1

I want to achieve this goals,

when the process moves to a node, it stopsat a place, to send a message to the MQ, when receiving subscriber finished the message, the process continues.

which task can I use?Receive Task?if so,how can I know the task arrival.

Vinay Veluri
  • 6,671
  • 5
  • 32
  • 56
leopard
  • 1
  • 1

1 Answers1

0

Yes, you can use Receive Task. To know that task is staretd use execution listener.

<receiveTask id="waitTask" name="Wait Task">
    <extensionElements>
        <activiti:executionListener event="start" class="SendMessageExecutionListener"></activiti:executionListener>
      </extensionElements>
</receiveTask>

Listener must implement ExecutionListener interface

public class SendMessageExecutionListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution execution) throws Exception {
        //send message here
    }
}

And when subsriber handles message signal process to continue.
See more details in Activiti User Guide Java Receive Task section.

Evgeny
  • 2,483
  • 1
  • 17
  • 24