I think I solved my problem. The problem was i misunderstood the bpm concept. I 
don't want to steal your time but  I explain my problem maybe it can help for 
somebody.

I explain the bussines logic of my bpm:

We have some bussines function implamented as a stateless session bean. 
I'll develop a custom action for every ejb invoke i call this node type with 
ejbInvoke node. The node invoke the EJB and if the invoke is succes signaling 
the Token to jump the next node.

 I dont want to implement indentity I'll delegate the authorization information 
for the ejb layer. When somebody wants to start a process send a message with 
ProcessDef  and his Identity. 

The MessageDriven bean is listening on the queue. when a message received the 
MDB create a jbpmContext put the USER object into the jbpmContext and starts 
the process. Every "ejbInvoke" node call an ejb method with an USER in the 
parameter list (gets from the process context).  If the EJB invocation falls 
with security exception the EjbInvoke node will not resume the execution (now 
our process is in waiting state on the EjbInvoke node) save the process 
instance and the MDB will be destroyed.  

A different user can get a list with the processes wich are in waiting state 
and he can resume the process with his own USER objects. (send a message to the 
mdb with the USER objects and process id. The mdb will overwrite the user in 
the process Context with the the new USEER object and resume the process ).

If the B user tries to resume the process wich is already resumed  by user A 
but the new state isn't persisted because the node isn't finished. The A user's 
mdb will get a Hibernate exception. 


Now I think i found a solutions: The user cannot signaling directly the process 
execution.  When i catch the security exception i insert a "resume process 112" 
task. The users can get only the task lists not the process instance list and 
he can complete the task with a resume message, when the user sends a resume 
message i set the task to complete  persist the task state and AFTER resume the 
process execution from the custome task action. When the b user tries to 
complete the "resume process 112" he will get a message "the process already 
started" and a task will disappear from his tasklist because somebody else set 
to complete the task. 

thx,

Janos








View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189084#4189084

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189084
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to