In the beta 1 release of Seam, I fussed and worried about what was the best way to specify a jBPM transition. Eventually I settled on the @Transition annotation, like so:
@Transition | private String transition; | | | @EndTask | public String myActionListener() { | transition = "approved"; | return "success"; | } In beta 2, I've discovered a few other things which are kinda similar. We need ways to: (1) Set the jBPM actorId (2) Set the conversation description and outcome for conversation switching (3) Set the conversation timeout And I'm quite sure new things like these will pop up as we evolve. Rather than introducing annotations for all these things, I'm now inclined toward a pattern like this: @In Transition transition; | | @EndTask | public String myActionListener() { | transition.setName("approved"); | return "success"; | } And: @In Actor actor; | | public String login() { | ... | actor.setId( user.userName() ); | return "success"; | } And so I've removed the @Transition annotation from CVS. One advantage of this is it lets me group related things (eg. converstaion switching stuff) into a single API, instead of spreading them across multiple annotations. Does anyone object to this, or think the previous approach was much better? P.S. Because I noticed that it was *very* common for people to make @EndTask methods which always resulted in the same transition, I'm also supporting the following: @EndTask(transition="approved") | public String myActionListener() { | return "success"; | } View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914652#3914652 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914652 ------------------------------------------------------- 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 JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user