When designing short lived processes you have to watch out.An example short lived process with several different types of activities.
Within a process you can use several Activities:
- Calling a subprocess within the same package
- Calling a subprocess within another package
- A webservice call:
- A runtime reference webservice call
- A UDDI webservice call
- A webservice call (drag-and-dropped from another package)
Execution
The short lived process is executed within a BPM service container and uses a thread for it. It holds the http connection for this call.
However be aware that the runtime behavior of the 3 activities is different.
- Another BPM process can be executed within the same service container and on the same thread
- Same as 1)
- A webservice call is done through the Bus again and Cordys does not know where the call will be executed eventually. Note that this can be the SAME service container as the one, where the current short lived process is executed. Another thread is needed and eventually (when doing more such webservices calls) the service container may use all threads. This can cause that the client gets a timeout and the next calls cannot be executed.
A way to avoid case 3) is that extra service containers are defined to handle subsequent calls.
For example:
When you have 2 ISV packages that each contain different functionality, you can decide to have separate service containers at runtime. Another advantage is that you can stop the service container of one component without stopping the other service container, so that components can be stopped.
Conclusion
Be aware of the runtime consequences when designing short-lived processes.
Reacties
Een reactie posten