2011/07/08

Cordys - Designing short lived processes

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:
  1. Calling a subprocess within the same package
  2. Calling a subprocess within another package
  3. 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.

  1. Another BPM process can be executed within the same service container and on the same thread
  2. Same as 1)
  3. 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.

No comments:

Post a Comment