Hi All ,
I am a new user to the jBPM tool and quite in a fix with it . I am trying a simple process as this :
START
|
Set & Check Account Type
/\
Active / \ Inactive
Get Address Get Reactivated
But the problem is that after executing the correct condition it traverses the Get Address node again at the end . I am unable to figure out why does it so ? Please , it would be very kind of you if you can help with this ...........
the action handler for the decision box goes like this :
public void execute(ExecutionContext context) throws Exception {
System.out.println("Checking the Accnt Status");
if(context.getContextInstance().getVariable("acctStatus").equals("active"))
{
System.out.println("Account is Active");
context.leaveNode("Yes");
}else{
System.out.println("Account is InActive");
context.leaveNode("No");
}
<?xml version="1.0" encoding="UTF-8"?>
<process-definition
xmlns="urn:jbpm.org:jpdl-3.2"
name="simple">
<start-state name="start">
<transition name="" to="CheckaccountType"></transition>
</start-state>
<end-state name="end">
</end-state>
<decision name="CheckaccountType">
<event type="node-enter">
<action name="action1" class="com.bpm.actions.CheckAcctStatus"></action>
</event>
<transition name="Yes" to="Fetch Address Info"></transition>
<transition name="No" to="InactiveAccount"></transition>
</decision>
<node name="Fetch Address Info">
<event type="node-leave">
<action name="action1" class="com.bpm.actions.FetchAddInfo"></action>
</event>
<transition name="1" to="end"></transition>
</node>
<node name="InactiveAccount">
<event type="node-enter">
<action name="action1" class="com.bpm.actions.InactiveAcctStatus"></action>
</event>
<transition name="2" to="end"></transition>
</node>
</process-definition>