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

Question

Question

Can workflow initiate a forms process and wait for it to finish?

asked on March 21, 2016 Show version history

Basically as the title says.

We have a case where we want to have a user initiate a workflow (business process) on a particular entry. the workflow in turn kicks of a forms process, and we want to wait for that that to finish to collect information from the variables of the form, but there doesn't seem to be a super obvious way to accomplish that.

 

Anyone have some insights on this?

 

 

0 0

Replies

replied on December 3, 2016 Show version history

Boris,

I do this in a workflow currently.  I had to wait until version 10 to be able to do it, but it is working just fine.  I basically have a forms process that I call from a workflow, wait for the completion of it, and then utilize the final variables to do other things in the workflow.  So here's the scoop...I use the "Invoke Business Process" activity to start the Forms process I want, sending a few variables I am tracking through the set variable values part of the pane when the activity is highlighted. 

If you want the workflow to wait until the Forms process is finished, you have to setup some kind of folder in the repository for the completed form to be submitted to from forms, and have the workflow use the 'Delay' activity...set it to the 'Until' option, and use one of the fields from the form.  You could have a field on the form for instance that is blank until the final submission, in which case you fill it with a value the workflow can look for, or just any value that is not blank even.  The delay activity in the workflow will then accomplish what you want, i.e. the workflow waiting for the forms process to finalize. Just assign any template to the form when submitted, and use one of the fields to capture the instance_id of the forms process, and submission id. 

Now...once the forms process is finalized, you can get those final variables by calling the "Retrieve Business Process Variables" activity, and set the instance_id and submission_id values in the pane on the right to the value from those fields you filled when the form was sumitted on the template.  You can get these by using a "Retrieve Field Values" activity just prior to this one.  You can then have the workflow delete the submitted form if you don't need it.  Hope this helps...it does involve some working around things but it works like a charm, I have done this three times already.

 

Rick

1 0
replied on March 21, 2016

I would use two workflows. The first one being the business process that is started by a user that starts a forms process. As part of the forms process you can start another workflow that uses the variables that are entered into the form once submitted. Or you could have the second workflow triggered by the storing of the form, and assign the variables to fields if necesary.

0 0
replied on March 21, 2016

Yea, using two workflows is the solution we're already going with since we didn't find any other options for now.

I just don't think this is the most desirable solution, it would be nice if we could get an option that would allow us to initiate a forms process and just wait for it to complete. Also would need to be able to identify the forms process so we can subsequently retrieve the values. I.e. the activity that starts the forms process generates a token containing the ID of it so it can be used to identify it in the activity to retrieve the variables

 

 

 

0 0
replied on March 21, 2016 Show version history

Hi Boris, as too Darrell's point, a form only creates an Instance ID after the form is submitted, so workflow wouldn't be able to track what it kicked off and associate them back together from my understanding.

The Wait for Entry Changes in WF looks much like a starting rule, so it needs tangible data to know when to continue.

The only way I would see a possible work around is for you to create a Reference number and pass it to the Form, but this would only work if the form was only ever kicked off from your workflow, as I've only successfully done this when I requested the Reference number from the Form Workflow.

 

Beyond this you would likely need some customer coding to work with Web Services.

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

Sign in to reply to this post.