Flow variables are null in execution

JakeBaynes
Tera Contributor

I am trying to setup a series of flows and subflows to handle the automation of request item and task creation for the onboarding of employees.  

 

I have an initial flow that runs when someone submits a New Hire request in our Service Catalog. I have a subflow that runs if the New Hire is a Sales employee. Depending on their sales job title, another subflow will run. The subflow is supposed to generate a set of RITMs. Most of these are working correctly, but there are one or two where certain variables are blank during the execution of the flow. It's odd, because other examples using the same Catalog Item are working as expected and are getting the variable values. I have tried deleting and recreating the flow step that is causing the issue, but it didn't fix it. 

 

We have a Business Rule on the Requested item table that is supposed to check for a value of 'Standard' on a field called 'Account Creation' and if that value is present, it creates a space in the Requested Item Details on the RITM that show a list of variable values, but because the Account Creation field is not getting the Standard value even though it is set in the 'Submit Catalog Item Request' step in the flow, the BR isn't running to setup the Requested Item Details correctly. I'm at a loss for how to troubleshoot this. 

 

Any help is appreciated.

1 REPLY 1

Matthew_13
Kilo Sage

I have seen this almost always come down to timing or where the value actually lives, LESS the flow being corrupt

Here is the straight to point version:

  • Account Creation is likely a catalog variable, but your Business Rule is checking a field on the RITM or vice versa. In the flow it looks like set, but at the time the BR runs that value isnt there yet.

  • In many cases, the Business rule fires before variables are written, especially when RITMs are created by flows/subflows. So the BR runs, doesn’t see Standard, and never builds the Requested Item Details.

  • The reason only some RITMs fail is usually that different subflow paths pass different data pills, so one branch has the value and another doesn’t.

Quick checks:

  1. On a bad RITM, confirm whether Account Creation is a variable or a real field.

  2. Check the flow execution — if the value is already missing in the Submit Catalog Item Request step, it’s a mapping issue.

  3. If the value shows up later but the BR never ran, it’s a timing issue.

My recommend path forward:

  • Move the “build Requested Item Details” logic into the flow after the RITM is created, instead of relying on a Business Rule to race the flow.

So in a nutshell it isn’t random; its either variables not written yet or the BR checking the wrong place.

 

@JakeBaynes - Please mark as Accepted Solution and Thumbs Up if you found Helpful!!