Hi!
I would like to implement a worklflow and I want to use stateful session bean.
So the worklfow rather complicated, this has to do some steps and wait for some events, make some decisions, wait again and so on. There is one workflow logic but more workflow instances have to run simultaneously. I want to implement the workflow logic by a stateful session bean and I need more running instances of this stateful session bean (SFSB). A message driven bean (MDB) will start the workflows and handles the events (the workflow will exit from waiting if a proper event has happened from outside (MDB) ).
The logic of workflows are the same but they differ in some attributes (for example: country). I try to paint this in text
outside world --> facade --> workflow HUN (stateful session bean)
(
Java client) (stateless session bean)
--> workflow GB (stateful session bean)
--> workflow ...
Something like this. So "the outside world" will start workflows through facade. "The outside world" can tell which sort of workflow it wants to start. After some steps the workflow will wait for an event. If the event will happen (I don't know where or when, this is transparent for my workflow) "the outside world" will notify the facade and the facade must find the right workflow to call its method. As You can see above more workflows (so more stateless session bean) must run simultaneously.
In this case how I could find the right workflow storing the reference? (I thought of storing the references of SFSBs in a Map:
Ok, this might not be a good solution but could You please recommend me a good one?
)
Could You please help me?
Thanks!
V.