[jboss-user] [jBPM] - How to do automatic transition from one state node to any other node

Felix Jose do-not-reply at jboss.com
Mon Apr 26 01:57:33 EDT 2010


Felix Jose [http://community.jboss.org/people/FelixKJose] replied to the discussion

"How to do automatic transition from one state node to any other node"

To view the discussion, visit: http://community.jboss.org/message/539419#539419

--------------------------------------------------------------
Hi Huisheng,
When the control comes in the task node "analyse" from "create form" how come the business logic(eg.: Analyser.java) get executed?
For example: 
<task g='93,93,90,50' name='create form' assignee="publisher">
    <transition to='analyse'/>
  </task>
  <task g='213,93,90,50' name='analyse' assignee="analyzer">
    <transition name='review' g='-21,-22' to='review'/>
    <transition name='reject' g='258,42:56,-2' to='end 2'/>
  </task> 
  when the control flow comes in the analyse task we need execute some business logic (eg.: Analyser.java)to analyse the form.
  How can I do that. Which will call Analyser.java class? Once the execution of that class gets over how the transition occurs to the next task? 
  
  Analyser.java
  
  public class Analyser{
  
  public String analyse()
  {
  String country = form.getCountry();
  if(null!=country||""!=country)
  {
  return "review"
  }
  else
  {
  return "reject"
  }
  }
  Can you please give a reply an answer to the same as soon as possible? Please..
  
  Thank You very much,
  With Regards,
  Felix K Jose

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/539419#539419]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100426/75a2a949/attachment.html 


More information about the jboss-user mailing list