Thanks Tom,

At the consultancy I've just finished they've been using the CPAN Perl workflow 
framework (see http://search.cpan.org/~cwinters/Workflow-0.17/lib/Workflow.pm) 
which, while very simple, implements this well.  In fact, it has two parts, 
conditions and validators.  Conditions are used to determine whether a 
transition is available, and validators are used to check whether the inputs 
supplied to the transition are valid.  In the context of JBPM, I think that 
conditions are the important aspect.

Having each of 
Token.getAvailableTransitions()/TaskInstance.getAvailableTransitions() calling 
the transition guards with an appropriate context seems right.

However I disagree with Alex that there should always be at least one available 
transition since the guards may, for example, be time-dependent or otherwise 
have their status depend on external state.  Naturally a UI might need to 
periodically call getAvailableTransitions() to check whether there had been a 
change.  Taking his example, you may not be able to cancel the ticket less than 
24 hrs before departure, but again you may not be able to check in great than 
12 hrs before departure, which would leave a 12 hr window where the process is 
effectively stalled, but not actually deadlocked.

cheers, michael


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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to