IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this forum will no longer be available. More details available on our FAQ.
Topic
  • 7 replies
  • Latest Post - ‏2019-08-19T21:52:42Z by AndrewPaier
harishpandola
harishpandola
23 Posts

Pinned topic Token disappears in case of inclusive gateway

‏2019-08-18T14:40:58Z |

Hi All,

 

I have a scenario where the process has a parallel gateway which diverges into 3 separate flows connected to 3 separate activities.The outward flow of these 3 activities converges to a inclusive gateway so the way it works is until all the active activities are completed,the inclusive gateway goes into waiting mode and the flow moves ahead only when all the activities having a token gets completes.

 

Now,the issue I face is,sometimes,even though all the activities having a token gets complete,the process loose the token and the next task does not get generated.

 

Anyone faced such issue?Please help.

  • Atanu
    Atanu
    209 Posts

    Re: Token disappears in case of inclusive gateway

    ‏2019-08-19T09:17:51Z  

    Is there any other flow from the activities ?

    Can it be possible to provide the complete diagram ?

    From the diagram you have given, if the inclusive gateway is the only path coming out from those three parallel activities, it should definitely go the next activity.

     

     - Atanu Roy

  • harishpandola
    harishpandola
    23 Posts

    Re: Token disappears in case of inclusive gateway

    ‏2019-08-19T12:58:20Z  
    • Atanu
    • ‏2019-08-19T09:17:51Z

    Is there any other flow from the activities ?

    Can it be possible to provide the complete diagram ?

    From the diagram you have given, if the inclusive gateway is the only path coming out from those three parallel activities, it should definitely go the next activity.

     

     - Atanu Roy

    Hi Atanu,

     

    Thanks for responding.There are no other out/in flow from the activities.I won't be able to share the complete diagram due to compliance.The flow goes to the inclusive gateway in most of the cases but in few cases,we loose the active token and then we have to manually trigger the next task. 

  • AndrewPaier
    AndrewPaier
    1198 Posts

    Re: Token disappears in case of inclusive gateway

    ‏2019-08-19T13:59:47Z  

    Hi Atanu,

     

    Thanks for responding.There are no other out/in flow from the activities.I won't be able to share the complete diagram due to compliance.The flow goes to the inclusive gateway in most of the cases but in few cases,we loose the active token and then we have to manually trigger the next task. 

    So for the 2 types of joins the rules are (roughly) as follows -

    Parallel Gateway (a.k.a "And Join") - every line to the gateway has a token on it.

    Inclusive Gateway (a.k.a. "Or Join") - every token that can reach me has reached me.

    (Note this is based off of my testing several years back, not based on knowledge of the underlying code, so if a IBM Developer contradicts the above, ignore me).

     

    You are using an Inclusive gateway.  Without seeing the details of your instance I can't tell where all the tokens are.  But each of your "Activities" are implemented by what appears to be "Sub" or "Linked" processes.  Since you are using an Inclusive gateway, if one of those processes also has a split, then this join cannot execute until all the tokens from that split have reached the join.  So I would look through the BPD's in each of those activities and see if you have any splits.  Worst case would be a split with an implied join (meaning the lines converge on an activity rather than having a join declared).  Or worse yet (because I don't know if it is handled right) a split going to different end points int he BPD.  If there are 0 splits in the other BPDs then we will likely need more details on an instance where this happened to really figure out what is going on.

     

    -Andrew Paier

  • harishpandola
    harishpandola
    23 Posts

    Re: Token disappears in case of inclusive gateway

    ‏2019-08-19T14:12:48Z  

    So for the 2 types of joins the rules are (roughly) as follows -

    Parallel Gateway (a.k.a "And Join") - every line to the gateway has a token on it.

    Inclusive Gateway (a.k.a. "Or Join") - every token that can reach me has reached me.

    (Note this is based off of my testing several years back, not based on knowledge of the underlying code, so if a IBM Developer contradicts the above, ignore me).

     

    You are using an Inclusive gateway.  Without seeing the details of your instance I can't tell where all the tokens are.  But each of your "Activities" are implemented by what appears to be "Sub" or "Linked" processes.  Since you are using an Inclusive gateway, if one of those processes also has a split, then this join cannot execute until all the tokens from that split have reached the join.  So I would look through the BPD's in each of those activities and see if you have any splits.  Worst case would be a split with an implied join (meaning the lines converge on an activity rather than having a join declared).  Or worse yet (because I don't know if it is handled right) a split going to different end points int he BPD.  If there are 0 splits in the other BPDs then we will likely need more details on an instance where this happened to really figure out what is going on.

     

    -Andrew Paier

    Hi Andrew,

     

    I my particular instance,the upper 2 activities  did not execute due to a particular case and only the bottom activity executed which is completed but after completion,it should have generated the next task after reaching the inclusive gateway but there was no active token for the instance i.e. next task did not get generated.

  • AndrewPaier
    AndrewPaier
    1198 Posts

    Re: Token disappears in case of inclusive gateway

    ‏2019-08-19T14:30:01Z  

    Hi Andrew,

     

    I my particular instance,the upper 2 activities  did not execute due to a particular case and only the bottom activity executed which is completed but after completion,it should have generated the next task after reaching the inclusive gateway but there was no active token for the instance i.e. next task did not get generated.

    The split in your diagram will create tokens on all 3 lines (Parallel Gateway).  Where did the tokens that went into the top 2 activities wind up?  I don't understand the statement "They didn't execute due to a particular case". I don't see an option on the Parallel Gateway to not have a token on each possible path.  If some of the paths are optional this split should really be a Inclusive gateway, which would allow you to indicate when each line should get a token.

     

    -Andrew Paier

  • harishpandola
    harishpandola
    23 Posts

    Re: Token disappears in case of inclusive gateway

    ‏2019-08-19T14:38:54Z  

    The split in your diagram will create tokens on all 3 lines (Parallel Gateway).  Where did the tokens that went into the top 2 activities wind up?  I don't understand the statement "They didn't execute due to a particular case". I don't see an option on the Parallel Gateway to not have a token on each possible path.  If some of the paths are optional this split should really be a Inclusive gateway, which would allow you to indicate when each line should get a token.

     

    -Andrew Paier

    Hi Andrew,

     

    Sorry for not being clear enough. The parallel gateway generates 3 tokens and activate all the 3 subprocesses but inside all the 3 subprocesses ,we again have exclusive gateway to check whether we need to continue this subprocess or not.

    so for my particular instance,the flag was false for the upper 2 subprocesses so even though they get activated,they just finish just after the decision gateway inside them and do not proceed anymore.

    only the the bottom one executes fully and completes after executing all the activities inside it.

     

    I am attaching a screenshot of the gateway inside of one of the subprocesses.

  • AndrewPaier
    AndrewPaier
    1198 Posts

    Re: Token disappears in case of inclusive gateway

    ‏2019-08-19T21:52:42Z  

    Hi Andrew,

     

    Sorry for not being clear enough. The parallel gateway generates 3 tokens and activate all the 3 subprocesses but inside all the 3 subprocesses ,we again have exclusive gateway to check whether we need to continue this subprocess or not.

    so for my particular instance,the flag was false for the upper 2 subprocesses so even though they get activated,they just finish just after the decision gateway inside them and do not proceed anymore.

    only the the bottom one executes fully and completes after executing all the activities inside it.

     

    I am attaching a screenshot of the gateway inside of one of the subprocesses.

    So the pattern you just showed would really work better using an inclusive gateway as your split and putting the logic from your decision in the line to the appropriate box rather than following this pattern.  Additionally if since the split is generating 3 tokens, and all 3 tokens can reach the join, you should change the join to be a parallel (AND) join as it is significantly less processor intensive to do that.

    Without seeing an actual instance showing where the tokens are at various stages, it is really difficult to troubleshoot this.  If it were me I'd create a simple version as a reproduction with similar behavior.  You can probably do that with just 1 linked BPD used in 3 places having 2 of them send in a "Short Circuit" boolean that would behave like the above and the 3rd going to a default human service.  If you reproduce the problem with that scenario then you have identified a bug and have the TWX you can share with IBM to prove it.

    Good Luck!

     

    -Andrew Paier