flow is stalling on a Wait for Condition action

sbh
Tera Guru

In Flow Designer, I'm working on a flow which has a Wait for Condition action based on a variable on a Service Catalog item. The variable is multiple choice with two possible values: yes and no. The variable does not show in the portal view of the form; it only appears in the back end after the request has been submitted. The variable is set by the fulfiller/agent (person in the group the ticket is assigned to), so I can't base IF flow logic on the variable's value until it's been set to yes or no.

 

I'm using a Service Catalog trigger and have a Get Catalog Variables action before the Wait for Condition action. Using the Condition Builder, there is no 'is not empty' option for the variable so I set the operator to 'is one of' and the values to yes and no. I suspect this is where the problem lies. Is there a way to use the Condition Builder to check for empty/null values for a multiple choice variable?

 

When I test the flow on a RITM where the variable has no value yet, the flow stops in Test Run - Waiting status with no errors. When I update the variable's value, nothing happens. If I run the test after the variable is set, it does what it's supposed to do, based on the variable's value. I've also tried activating the flow (I'm working in dev) and nothing happens after I update the variable.

 

flow_setup.png

2 ACCEPTED SOLUTIONS

James Chun
Kilo Patron

Hi @sbh,

 

I tested something similar in my PDI and it seems to be working fine, the Flow is paused until the variable is updated.

Can you do the following:

  • Set the Duration of the Wait for Condition to 0.
  • It does take a few minutes for the Flow to progress after the update is made. Did you make sure you waited for at least 5 minutes?
  • Make sure the correct variable is selected in the Wait for Condition action

If the above does not fix the issue, try cross-checking with my configurations:

  • Multiple choice variable created with 2 options (Yes, no) and none
  • Flow configured as the following:

JamesChun_0-1717914174396.png

 

Hope that helps, cheers

 

View solution in original post

yadavrekha
Tera Expert

Hi @sbh ,

I have faced issues with Wait for Condition based on variables. I would suggest updating a field on the RITM instead of a variable and set the Wait for condition on the field. I would not recommend creating a custom field however, I have managed to use the stage field for this purpose. You can use any other if it suits you.

 

For example, create a new stage and add it on the Flow. Update the Wait for condition to "Stage changes to 'newValue'".  Add a client script(i don't really recall if it was a client script i used, feel free to try other options) to update the stage field to the new value, onchange of the variable on the RITM. The flow should move forward as soon as the stage value is changed. 

 

View solution in original post

8 REPLIES 8

Maik Skoddow
Tera Patron
Tera Patron

You could store the value of the catalog variable in a Flow variable of type String first and use that Flow variable in your condition builder. Now you should be able to test for empty string.

Thanks very much for your prompt reply! I'm still trying to get the Wait for Condition action to work with the flow variable. What I've got now is clearly wrong because I'm getting an internal server error and I can't tell anything from the error log.

 

When I set the flow variable's value, I first tried just pulling in the pill for the catalog variable. when that didn't work, I set it to:

fd_data._2__get_catalog_variables.catalogvarname.toString();

 

I can pull the pill for the flow variable into the Condition Builder but not where I need it (maybe because the flow is using a Service Catalog trigger?). So I added a script like:

"fd_data.flow_var.flowvarnameISNOTEMPTY"

James Chun
Kilo Patron

Hi @sbh,

 

I tested something similar in my PDI and it seems to be working fine, the Flow is paused until the variable is updated.

Can you do the following:

  • Set the Duration of the Wait for Condition to 0.
  • It does take a few minutes for the Flow to progress after the update is made. Did you make sure you waited for at least 5 minutes?
  • Make sure the correct variable is selected in the Wait for Condition action

If the above does not fix the issue, try cross-checking with my configurations:

  • Multiple choice variable created with 2 options (Yes, no) and none
  • Flow configured as the following:

JamesChun_0-1717914174396.png

 

Hope that helps, cheers

 

Thank you very much for your response!! I included None in the variable, as you suggested, and I thought that would do it but it hasn't worked so far.

 

In some ways, I'd be extremely happy for this to work after five minutes. But it would make me wonder if this would slow down performance after it's moved to prod.

 

I'll keep at it. But thank you - I'm sure including None is at least part of the solution!