|
From: <tom...@jb...> - 2006-06-27 07:49:42
|
please, give some more input it is very valuable to us. first the background on the current situation (lack of general applicable conditions on transitions): my main problem with adding conditions or guards on all transitions is that jbpm is not able to do anything functional with them except throw an exception when a user wants to take a transition that is not available. this can only be meaning full in the first transition that is taken. if a user provides a signal and process execution resumes. suppose that after executing a few nodes, an automatic node decides to take a transition for which the condition is not met. then the user will get an exception that is caused by a problem in the process definition. the user would get an exception in the line of "hey, somewhere in the process definition there was a contradiction: node x decided to take transition t, which was not accessible" the user is only responsible for the initial signal and the transition that he/she specifies. in that case the engine could throw an exception with a message like "hey, you can't take this transition". in the latter case, guards could make sense. BUT, the verification could just as well be done in the user code as in the process. Instead of sending a signal to the process and have the process decide wether you can take that transition, you might as well check that condition yourself. When checking for conditions in the user code, you don't rely on exceptions for your normal program operation. So in my opinion, there is this one little thing in which guard conditions make sense. To ask the process execution: "to filter the outgoing transitions of the current node and answer the question: 'which transitions are currently available for this execution'" Are you referring to exactly this last use case ? Do you see another use case for guard conditions that i should be aware of ? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953630#3953630 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953630 |