Discussion:
[jboss-user] [jBPM] - waitTillDone
Laura delli Paoli
2013-06-28 10:18:42 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"waitTillDone"

To view the discussion, visit: https://community.jboss.org/message/825471#825471

--------------------------------------------------------------
What does waitTillDone do when starting/completing a human task?
is it needed???

Can I replace it with:
do {
     stuffs....
                    } while (!currentTask.getStatus().equals("InProgress"));

thanks
Laura
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/825471#825471]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-07-09 08:14:41 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: waitTillDone"

To view the discussion, visit: https://community.jboss.org/message/827043#827043

--------------------------------------------------------------
waitTillDone is usually used in unit testing to wait for response from task server as the communication is done asynchronously so it makes sense to wait for it until proceeding with next steps of the test. It production environment it should not be used as it completely breaks the concept of asynchronous integration making it synchronous.

Replacing it with that looks introduces risk of infinite loop in case something goes wrong that's why waitTillDon accept argument of how long it should wait for the response.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827043#827043]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...