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

Discussion

Discussion

Quirky Discovery with Form Fields and Workflow Return Values

posted on July 13, 2022

This should save someone pain and suffering. 

Using Forms 10.2, we have a forms process that calls a workflow rule to do a database insert.

Then we use the Set Business Process task in the workflow to indicate to the forms process whether the insert worked or not.

But, it would not give us a return result of any type.

Silence. Nada. Zip, Zilch. Squat.

After lots of trial and error we finally figured this out:

If you want to use a field to capture a return value, you actually have to populate it with something - anything - BEFORE you call the workflow process.  It is as if the field needs to be turned on.

Once the variable has a value, it can be changed, but not before

 

0 0
replied on July 13, 2022

Is your Workflow service task in Forms set to wait for the workflow instance to complete? Where are you checking the value in Forms?

0 0
replied on July 13, 2022 Show version history

Hi Miruna - Yes, we set the service task to wait for the workflow to finish. Then we check the values (or check for the values) in an exclusive gateway:

 

 

In WF, the token "Entry Result" is set to a default of "fail", and switches to "success" if it does not hit a Catch branch. So something has to go back to the BP, yet the BP shows no value:

 

 

Here's how we try to update the variable:

 

 

But, when we set a default value in the field in the form, this same set up works exactly the way we want.  Prior to this finding, we had not set any value for the variable, entry_result.

 

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

Sign in to reply to this post.