[jboss-user] [JBoss jBPM] - Re: org.hibernate.TransientObjectException object references

warmonga do-not-reply at jboss.com
Sun May 20 09:54:39 EDT 2007


@ kukeltje: Thanks for your reply! Ok, the news are not good. 

Ok I'll try to real quick explain my scenario, maybe anyone has an idea how to solve it:
I have a scenario where a process instance is to be evaluated by business rules (expressed by drools rules) after each single task instance of the process. This is realized through an ActionHandler, which is attached to each TaskNode and which fires the Drools rules. If any of the rules is not valid, then the process execution should simply stop and the user should get a message, i.e. a task saying "Please check componentX/valueY/wahetever". That is it so far.

What I already tried is the following:

1. Just insert a TaskInstance displaying the message and call processInstance.suspend() in the consequence of the Drools rule. The TaskInstance-part works fine but:
-> Problem: It seems like processInstance.suspend() does not work if called out of an ActionHandler

2. Insert a state node right after the current TaskNode. This inserted state node could also make the process instance pause process execution.
-> Problem: TransientObjectException as described earlier in this thread

3. My current workaround is this: Insert a TaskInstance for the message (as in try no. 1) and then just set the ASYNC attribute of the node following the "node that fires the rule" to true, so that the user, in case any of the rules fires, only sees the inserted TaskInstance in his work list at first, because the task that would be displayed if none of the rules would have fired was set to ASYNC.
-> Problem with that: This does not really stop the process execution, it only requires a second click on "Home" in the task list in order to show the next "regular task" for the user.

Ok, so hopefully this was understandable and hopefully someone has a hint for solving this issue.
Many thanks in advance!
Best regards,
Maurice

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047056



More information about the jboss-user mailing list