You are viewing limited content. For full access, please sign in.

Discussion

Discussion

WHY does my BP fail when it reaches this routing decision?!

posted on April 5, 2022 Show version history

I've been trying to figure this out for a while, and I just can't see it.  My Forms process goes into a sub-process (which just calls a Workflow and saves to the repository), then goes into this Exclusive Gateway:

From there, I have four possible options:

  1. /dataset/_fs_action="Save Changes and /dataset/Permit_Status!="Permit Generated" and /dataset/Close_Active_Process/Close_Process="unchecked"
  2. /dataset/_fs_action="Send for Payment"
  3. /dataset/_fs_action="Void Permit" or /dataset/Close_Active_Process/Close_Process="checked"
  4. /dataset/Close_Active_Process/Close_Process="unchecked" and ((/dataset/Permit_Status="Permit Generated" and (/dataset/_fs_action="Save Changes" or /dataset/_fs_action="Waive Fee")) or /dataset/_fs_action="Generate Permit")

 

To convert that to Layman's terms:

  1. If the last submission action was "Save Changes" and the Status is NOT  'Permit Generated', and the "close process" checkbox is unchecked
  2. The last submission action = 'Permit Generated'
  3. The last submission action = 'Void Permit' OR any submission action with the 'close process' checkbox checked
  4. The 'Close Process' checkbox is unchecked, and the user action is 'Waive Fee' OR 'Save Changes', while the Status = 'Permit Generated'; this path is also taken if 'Close Process' is unchecked and the user action is 'Generate Permit.'

 

If I ONLY have #1 attached to the gateway, it will work just fine.  As soon as I reattach ANY of the other options, the logic fails and the task either terminates or becomes suspended (depending on which version of Forms I'm using; we're transitioning our Test environments to 11).

I've tried saving the last submission action in a variable on the Form itself and using that, but that didn't work either.

Does anyone else see what I don't?

0 0
replied on April 8, 2022 Show version history

Hi Sean,

Just as an FYI, sometimes in these situations where there are complicated rules for routing, I actually create a Field (Which I ultimately Hide) in the Form with the Calculation which would provide a Single Word Output such as Yes, No, Permit, etc). This way in the Exclusive routing logic my rules are very simple in the workflow: Follow when Rule = Yes for example.

One of the reasons I like this approach is that the output of the Calculation can be seen as I am testing the form so I know if the formula logic is working as expect, and also If I want to change the Calculation I don't have to change the logic of the BP Rules and test them against breakage, as I know as long as the calulation works in the Field, the BP will work.

Just some thoughts to save you headaches and maybe gray hair :)

0 0
replied on April 8, 2022

Well, I'm going to go ahead and say Steve Knowlton's response regarding my logic structures was the right answer!  We were able to get this working again by sticking in a default path temporarily to shift the process to a new location, then bringing it back again to the previous user task and deleting the default pathway.  I don't know for sure why that worked, but it did!

Thanks to everyone who commented!

1 0
replied on April 5, 2022

4. like #1, last submission was 'Save Changes' but the Status IS 'Permit Generated', or the last submission action is either 'Generate Permit' or 'Waive Fee', all of which is conditional on the 'close process' checkbox being unchecked

You had a But in your description but you calc had an And, so I'm going with that

 

/dataset/_fs_action="Save Changes" and /dataset/Close_Active_Process/Close_Process="unchecked" and (/dataset/Permit_Status="Permit Generated" or /dataset/_fs_action="Generate Permit" or /dataset/_fs_action="Waive Fee")

 

=Saved Changes and Unchecked and  (Permit Generated or Generate Print or Waive Fee)

0 0
replied on April 5, 2022

Hi Steve,

I appreciate your help!  Good catch on the missing quote in number one, though that was a recent typo from one of my many iterations; it unfortunately did not solve the problem.

Likewise, I did rewrite #4, though the logic needed to be changed a bit since the permit status requirement is directly paired with one of two possible user actions (I only had one paired with it before).  My new logic for #4 is reflected in the posting.

Once again, though, I find myself disappointed.  The process still becomes suspended as soon as it touches on the gateway if more than one outflow is attached.

0 0
replied on April 5, 2022

Can you verify that at least one branch's condition is actually met? I just ran a test in 10.4 with 2 branches that both would evaluate false. It led to the WF terminating. My guess is that nothing is coming up as TRUE, causing the problem.

Note that you can make one branch the default, which will be used if the others are all false.

0 0
replied on April 8, 2022

Hi Peter,

I mentioned this in an earlier response, but I haven't been able to use default paths for some time due to a bug in our Production version of Forms.  It will use the default path every time, even when at an exclusive gateway where another path's conditions are met.  We're working towards updating our Production Forms server in the next couple of weeks, so that hopefully won't be an issue anymore.

 

I was able to get this working finally, but thanks for your response!

1 0
replied on April 5, 2022 Show version history

Hi Sean, I see an issue with your quotes in Number 1

I corrected it here

  1. /dataset/_fs_action="Save Changes" and /dataset/Permit_Status!="Permit Generated" and /dataset/Close_Active_Process/Close_Process="unchecked"
  2. /dataset/_fs_action="Send for Payment"
  3. /dataset/_fs_action="Void Permit" or /dataset/Close_Active_Process/Close_Process="checked"

 

Also pretty sure that I still got Number 4 wrong

0 0
replied on April 5, 2022 Show version history

Hi Sean

As a Best Practice, I never put a condition on all of my outflows, I always set one to default with no Condition as it is the path to follow should none of other conditions match, this way, you would never get a Process Terminating, it just processed to the task that outflow is pointed at.

That being said, I would change your #4 condition to the following

(/dataset/_fs_action="Save Changes" and /dataset/Permit_Status="Permit Generated" and /dataset/Close_Active_Process/Close_Process="unchecked") or (/dataset/_fs_action="Generate Permit" or /dataset/_fs_action="Waive Fee") and /dataset/Close_Active_Process/Close_Process="unchecked")

 

 

 

1 0
replied on April 5, 2022

Hi Steve,

Our Production version of Forms has a bug wherein the default path is ALWAYS taken, even if it's an exclusive gateway with another path's conditions met. Leads to duplicate tasks, and can get messy.  That's not an issue in our Test or Dev environments, which run on a newer version, but I haven't been able to use default pathways in Production for some time now.

I did try the update you suggested for #4, but it still fails.  I have tried various combinations; it will still fail if only 1&2 are connected, or 1&3, etc.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.