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

Question

Question

One Workflow Started by Multiple Forms Processes

asked on February 10, 2021

Hi, I was wondering if there was a way to have two different forms processes start the same workflow process. Basically, I have data coming in from two different forms processes that we are using but I want them to run the same paths within the workflow module.  I haven't found a good way to do that and was wondering if anyone had any good ideas. 

Thanks,
K

0 0

Answer

SELECTED ANSWER
replied on February 11, 2021

Either option should work - either two Workflows or the split path like what was posted by @████████.

Bear in mind if you do duplicate Workflows, that you don't have to completely rebuilt a Workflow from scratch - if you open your complete and published Workflow, change the name, and republish it, it will be an identical copy of the original.  At that point, you would just need to redirect the activities that talk to LFForms to talk to the other Process instead.

0 0

Replies

replied on February 10, 2021

Although it's possible for multiple LFForms Processes to run the same Workflow, the activities that retrieve field values from forms and push values back to forms are going to be tied to the specific LFForms Process.

You could maybe do conditional branching to run alternate paths based on which LFForms Process triggered the Workflow, and do dedicated activies in those different paths - but at that point, it probably just makes more sense to make two copies of your workflow, one for each LFForms Process.

1 0
replied on February 10, 2021

I've done things this way for reusable workflows. Basically, my workflow is set up like this:

  1. Create "Process Tokens" for the different values I need to act upon
  2. Conditional decision that checks the %(BP Name) token
  3. Assign values to my "Process Tokens"
  4. Perform workflow actions based on the process tokens

By creating the tokens, I only need the branch to handle retrieving the business process variables and assigning the values.

Since I assign everything to those tokens, I can use them throughout the entire workflow and reuse all my activities regardless of the original source.

1 0
replied on February 11, 2021

Hi Jason,
Thank you for your insight and diagram snapshot. It really helped. Using process tokens to designate which fields to pull from the different Forms process was something I hadn't thought of. It makes sense to be able to use the same workflow but designate different form variables throughout. 
Best, 
K

0 0
replied on February 11, 2021

Oddly enough, the Retrieve Business Process Variables activity doesn't actually use the process id when it runs (at least if you use the default options--I haven't tested it when specifying instance/submission ids). If you have two processes with the same field, a process set up for one will work with the other.

This is not true for the Set Business Process Variables activity.

1 0
replied on February 11, 2021

This makes sense. The instances/submissions are stored in shared tables so they each have unique identifiers meaning the "process" identifier isn't necessarily needed to retrieve the form data.

The process selection is more for the design side to determine what forms/variables are available to the workflow for validation purposes. In either case, I think it still makes sense to have the branches so you know which forms are using a workflow.

1 0
replied on February 11, 2021

Hi Matthew,
You bring up a good point about "at that point, it probably just makes more sense to make two copies of your workflow, one for each LFForms Process" which is something I figured would work but wasn't too keen on going through that. It is solution to keep in mind though if it gets to that point. Thank you for the feedback!
Best, 
K

1 0
SELECTED ANSWER
replied on February 11, 2021

Either option should work - either two Workflows or the split path like what was posted by @████████.

Bear in mind if you do duplicate Workflows, that you don't have to completely rebuilt a Workflow from scratch - if you open your complete and published Workflow, change the name, and republish it, it will be an identical copy of the original.  At that point, you would just need to redirect the activities that talk to LFForms to talk to the other Process instead.

0 0
replied on February 11, 2021

Matthew, THANK YOU! This saved me so much time. I was thinking I was going to have to copy and re-import in order to duplicate. I didn't realize I just needed to change a name to get it to duplicate itself. It worked and saved me so much time. 

1 0
replied on May 6

I ran across this and wanted to share how I have done this.  I just bring in the variables from the multiple processes then use a token calculator to set the variables to use in the workflow.  For the decision points, the variables can either be set in the token calculator, or you can just add the variable groups such as if variable_dataset_1=X OR variable_dataset_2=X.

I just look at the length of the variable to determine which to use.

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

Sign in to reply to this post.