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

Question

Question

Feature Request: Subroutines in Workflow.

asked on August 19, 2014

Currently I'm implementing a subroutine like process by creating a new workflow with input and output tokens, then using that in multiple places. However I fear doing it this way introduces too much lag. I can technically copy and paste all of the individual steps contained in my separate "subroutine workflow"  into the "parent workflow" multiple times but that just seems inefficient use of my time.

 

I'd love to see a future enhancement that formalizes an actual subroutine process, preferably one that just executes the subroutine without triggering a separate workflow instance (this would also simplify logging as you wouldn't have 5 steps of a workflow all listed separately in the logs).

 

I know how you guys love firm examples, so here's one for you:

 

I have a set of workflows that all need to access a database using stored procedures. Each of the items need to be looked at in slightly different ways so I created one generic workflow that has input parameters that cover all the variations, plus a token to select what type of data I need. I then pass that information back in tokens to be able to use in my parent workflow. 

 

Thanks for your consideration!

1 0

Answer

SELECTED ANSWER
replied on August 19, 2014

Thanks, Chris! It's on our to-do list, but we don't quite have a release date for it.

0 0

Replies

replied on August 19, 2014

I think sub-routines may be limiting. It would be nice to have workflows opened up in other workflows for the purposes of revisions, but having the same workflow with multiple processes does not really allow for reusability and may cause more slowdown in evaluation than calling another workflow.

 

I look forward to seeing a Laserfiche response though

0 0
replied on August 19, 2014 Show version history

Have you checked out the "Invoke Workflow" activity? It allows you to trigger another workflow, wait for it to run and then return any parameters back into the parent workflow. This would trigger as a separate workflow instance though.

0 0
replied on August 19, 2014

That's exactly what I'm doing, I guess I didn't specifically say "invoke workflow" in my  example I used above.

 

But I suspect in a busy system doing it this way is more prone to lag. The "parent workflow" is waiting for "sub workflows" to finish, thus tying up more resources. Plus the overhead of kicking off a new workflow in subscriber then waiting for workflow server to get to it in the que. 

 

If there was a way we could invoke a sub routine in the same workflow (or use the invoke workflow in a way that combined that other workflow in the current workflows thread) I think those potential issues would be greatly reduced. Plus if you are using invoked workflows as a subroutine in this way it would could potentially simplify tracking what is happening when reviewing a particular issue.

 

I'm envisioning something like auto opening a new tab when you click on the "invoke workflow" when reviewing a previously ran "parent workflow" (i.e. when that item shows a green or red box around it, signifying it was complete). 

 

If the invoked sub workflows don't show up by default when searching that would be great too - if the concept of subworkflows was implemented you could potentially hide those sub workflows when you did a search on all workflows that touched entry 12345 for instance. This would make it easier to track if you fully used different subworkflows as subroutines. 

0 0
SELECTED ANSWER
replied on August 19, 2014

Thanks, Chris! It's on our to-do list, but we don't quite have a release date for it.

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

Sign in to reply to this post.