Waiting on task? Synchronous / Asynchronous

1,015 views
Skip to first unread message

ksi...@gmail.com

unread,
Dec 11, 2015, 11:23:25 AM12/11/15
to camunda BPM users
Hi everyone!

For the past few months, I've been working and diving more and more into Camunda, and the proper methodology for integrating the engine into our application, however, I keep coming back to this hurdle, which stems from my background building desktop applications in a synchronous world. Let's use this as an example :

-User enters wire transfer information and submits
-Submission invokes a webservice that will debit that client's account, and credit the beneficiary's account, while the screen is 'waiting' for transaction completion
-Once the service complete, the screen is unlocked, with a Success/Failure status displayed on the screen

This process was straightforward while developing desktop applications, as no BPMN was even present in the application.

Shifting to a web-based, declarative method of doing things, I decided to design JSF page (Using the start event's initiator form to identify the page), and using service tasks to invoke the accounting webservices. The big question is : How do I lock the user's screen, waiting for the service task to end, for it to return to the end user.

Logically, when we "complete" a task on the engine, we have no link to this process instance, as we don't know the next step in the model, but we need to be notified in some way or another that the task was completed.

Can anybody help explain how to implement this? Should the application work asynchronously, and camunda issue a send task to the application, and use callback to unlock the screen? Any help would be highly appreciated...

thorben....@camunda.com

unread,
Dec 14, 2015, 3:53:58 AM12/14/15
to camunda BPM users
Hi,

Bringing process flow and page flow together is always an interesting topic. Perhaps Bernd's blogpost on the UI mediator pattern gives you some ideas: http://www.bpm-guide.de/2012/04/04/pageflow-vs-process-flow-and-ui-mediator-pattern/

Note that the blogpost is written for Camunda fox (basically Camunda BPM 6), but the principle should be valid nonetheless.

Cheers,
Thorben

Karim Sinno

unread,
Dec 14, 2015, 4:09:39 AM12/14/15
to camunda BPM users
Thanks Thorben!

I actually ended up stumbling onto Bernd's blog post two hours into research, and the case presented was quite similar to the one I presented earlier. Looking into other Oracle's BPM solution, a mediator object was present out of the box. Isn't there a constant need for something like that in all BPM solutions?

Bernd Rücker

unread,
Dec 14, 2015, 6:50:23 AM12/14/15
to camunda-...@googlegroups.com

Hi Karim.

 

The implementation of this pattern might vary very much depending on UI technology – that’s why I think it is better to leave it to the user to implement it. Please note that one possible form is part of the Camunda Tasklist – if you finish a task there and get a task assigned in the same process instance afterwards – you see a notification box in the UI.

 

Cheers

Bernd

--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/53da89e6-fe47-403b-b8c2-e09d73bf28b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Karim Sinno

unread,
Dec 14, 2015, 6:56:34 AM12/14/15
to camunda-...@googlegroups.com
Hi Bernd,

I see what you mean. Thanks for the advice! I'll start on it ,and see how it turns out. Is there a chance of updating the blogpost since it's gotten quite outdated?

--
You received this message because you are subscribed to a topic in the Google Groups "camunda BPM users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/camunda-bpm-users/9A1IrmvKq0E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to camunda-bpm-us...@googlegroups.com.

To post to this group, send email to camunda-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best Regards,

Karim B. Sinno

Bernd Rücker

unread,
Dec 14, 2015, 8:54:11 AM12/14/15
to camunda-...@googlegroups.com

Hi Karim.

 

Sorry – too limited time at the moment – so don’t wait for it. Sorry! But feel free to publish a current one yourself!

Reply all
Reply to author
Forward
0 new messages