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

Question

Question

Forms invoking workflow and route based on where in the process the workflow was invoked

asked on February 20, 2017

I have a complex form process that I've been working on.  The process is updating some database records which are used for several other processes.  Throughout each stage of my process I want to update the database record with some information as to the current progress of the process, so that other processes can "report" on current status.

The only way I know to update those database records is via Workflow.

What I'm trying to do at this point, is reduce how many workflows I'm using.  I have about 12-15 places that I want to update the database, and I don't really want to have 12-15 nearly identical workflows to do that.

My process is mostly using the same form throughout, and which "version" of the workflow that runs is based on various gateways in my process.  So getting the values I need inside the form variables is tricky to say the least.  It's a lot easier to know what's going on from the Process Diagram than it is from inside the form itself.

In order to minimize the number of workflows used, I need to be able to tell workflow which task/step is calling workflow, so that I can use flow control steps in workflow to dictate which process to follow.

I've reviewed the tokens that are created in the workflow when the "Started by Laserfiche Forms" checkbox is marked, but I don't see anything there about the task/step that triggered the workflow.

I know that workflow can also be configured with custom "input parameters" for token values, but I can't find any way to populate those tokens from Forms.

Anyone have any tricks up their sleeves to easily communicate from Forms to Workflow some indication of where in the Forms Process that Workflow was triggered?

0 0

Answer

SELECTED ANSWER
replied on February 21, 2017

Unfortunately, based on current functionality, I think I'm left with no choice but to have multiple workflows.  sad

0 0

Replies

replied on February 20, 2017 Show version history

***Enhancement Request****

In the long-run, it'd sure be nice to have a "custom query" task functionality available in the Forms Process Diagram like what is in Workflow, so that things like this (to query a database to pull values or update values) could be done directly in forms instead of having to keep jumping over to Workflow to do these little queries and updates.  Not only would it simplify the process of updating a database record in a forms process, but would give more power for data lookups.  Don't get me wrong, I like the lookup functionality inside forms, it's simple and easy to jump in to, and great for situations where one field needs to be populated based upon another.  But in situations where you want a form to be pre-populated with a bunch of information from a database, the power and flexibility given by a custom query is well worth routing over to workflow to get it.  It would just be really nice to have that right within Forms.  And at least from my experience, database updates and inserts are something being using in quite a few of my form processes, and so I spend a lot of time routing back and forth between Forms and Workflow, just to do custom queries.

1 0
replied on February 20, 2017

To know which step triggered workflow was requested here and has been added to workflow's list. And to be able to interact with database is a feature already in Forms list, but we have no estimation when will it be implemented yet.

1 0
replied on February 21, 2017

I really like those enhancement requests.  It would also be nice if there was a forms BP activity that could just modify a data field.

I was able to take 5 workflows and combine them into one utilizing the Forms input parameter tokens.   I had the luxury of always calling workflow right after a User Task occurred.   The name of the user task is available and I route my workflow based on this.   (As long as no one changes the name of the user task in the forms process for which I added a forms comment box indicating this )   I know you may not be calling workflow after a user task, but it works when you do!

Just a thought but perhaps you could add an additional field to your db table that would allow you to keep track of where in the process you are and update records based on it's last value.  That may or may not be a viable solution depending on the complexity of your forms process but ....  
maybe in 11.0.

1 0
replied on February 21, 2017

To support modify a variable value directly inside Forms process is in our features list as well. It may be supported in next major release.

2 0
replied on February 21, 2017

Oh, that will be great!

0 0
replied on February 21, 2017

Thanks @████████- I'm sure I'm not the only one excited to see that future functionality.  Sorry for duplication, I did search for other posts before posting this one, and just hadn't come across the one you linked to.

Thanks @████████- unfortunately, my process doesn't necessarily flow as A, B, C, D, E, etc. - based on user actions, variable contents, and time elapsed, it could flow like A, B, C, A, B, A, D, C, D, E or other variations, so unfortunately, just incrementing the database value on each pass wouldn't work.  But that is a great suggestion for simplifying the process in situations where the flow is more linear.

 

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

Sign in to reply to this post.