https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/long_running_service_design_in_ibm_business_process_manager?lang=en
Long running service design in IBM Business Process Manager
If you want to integrate an externally long running service in an IBM
Business Process Manager process application, the best practice is to
use asynchronous calls.
The reason for this practice is that long running synchronous call from
IBM Business Process Manager to the outside service can lead to many
potential problems. IBM Business Process Manager will keep a thread
alive for the synchronize calls during the execution. It will hold many
resources, such as table lock in the BPMDB, java heap. It can block the
other threads from accessing the resource and it will not serve the
other requests.
As a consequence, you end up seeing hung threads in the server logs. In extreme situation, it will exhaust the server resource.
The following screen shot illustrates an example, which is explained below:
In the previous screenshot, the process application has a timer for
step 3 and this timer connects to one autoRetrieveTask. The
autoRetrieveTask calls an Integration Service, which will call a third
party service to get the task data. This call can take 30 minutes to
return.
When the application is running, you can see the following messages in the server logs:
[14-11-25 12:50:05:027 CST] 00000099 ThreadMonitor W WSVR0605W: Thread “Wor
at java
at java
at java
....
Before the autoRetrieveTask finished, if you call the following REST
API to check process instance details, it will also be blocked:
GET /res
The following hung message can be seen in the server logs:
[14-11-25
12:59:05:034 CST] 00000099 ThreadMonitor W WSVR0605W: Thread
“WebContainer : 11”(00001838)has been active for 642212 milliseconds and
may be hung. There is/are 7 thread(s) in total in the server that may
be hung.
at java
at java
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at com.
at org.
at org.
at org.
at org.