javavaadin7activiti

Activiti using receiveTask to pause and resume an activiti


I am new to the Activiti framework. Learning the concepts via prototypes.

Here is the prototype I am currently working with:

  1. I have integrated Activiti with a Vaadin Project
  2. Activiti version: 5.16.1

Here is my process flow: pause and resume

My main Vaadin java class starts this process flow. The first service task is the ModalWindow java class. At this point I add a subWindow using UI.getCurrent().addWindow(modalWindow);

This Window has a TextField and a submit button. At this point I would like the process to wait for the user to click on submit button.

What I have tried so far :

  1. added a ReceiveTask between ModalWindow and TempTask. this receive task would be signalled to end in the Button.ClickListener of the ModalWindow class.

What happened:

  1. Once the subWindow was added to my main page, the process just continued till endEvent, skipping over TemTask.

  2. when User clicked on submit, the entire process was started from the beginning!!

What is required:

Could someone please guide me?


Solution

  • You need to be using a user task. As soon as the user task is initiated, the process will enter a wait state until the task is explicitly completed using the task.complete() API.

    Your VAADIN application can automatically wait for the task to be assigned (look at some of the task unit tests for examples of how to do this) and then enable the submit button.

    BPMN and Activiti is extremely powerful but sometimes there are many ways to do the same thing.

    Let me know if you need any more help.

    Cheers, Greg Harley - BP3