Assign indeterminate number of parallel tasks?

Post any question regarding setting up, running or configuring Verj.io Workflow

Moderators: Jon, Steve, Ian, Dave

ericb
Ebase User
Posts: 82
Joined: Fri Jan 15, 2016 2:34 pm

Assign indeterminate number of parallel tasks?

#1

Postby ericb » Thu Mar 03, 2016 3:27 pm

We're building an application to manage requests for access to various secured doors in our building. Doors all have a person who is responsible for approving/rejecting requests for that door. What I would ideally like to have is to be able to create a split-join node that will have a dynamic number of tasks that can be run in parallel (each person approving whatever doors they are responsible for). When all doors have been approved, then the job can move forward. Is it possible to have a split-join node with an unknown (at design time) number of parallel streams?

An example:

Door 1 is managed by person A, door 2 is managed by person B, and door 3 is managed by person C.

A new request is made and doors 1 and 2 are requested. In this case I'd like to have two parallel tasks running (one for person A's approval, one for person B's approval). When both have approved access to their respective door, the process continues. Person C doesn't get a task because they don't have any doors to approve.

Basically I'd like to be able to have a number of copies of a task running for each person that needs to approve (a) door(s). As you can imagine, we have quite a bit more than 3 doors, so creating a stream for all doors and just auto-completing the ones that aren't requested is not feasible.

If it isn't possible to do this with a split-join node, I was thinking of just having a single task at all times, that would handle all approvals for all door approvers. I would essentially handle the split-join programmatically inside a single task, keeping track of how many people need to approve doors. I would only set the task to complete when I see that every person that needed to approve a door has done so. The main downsides I see to doing this would be that I suspect it would be a bit more complicated to develop and maintain than a native split-join node solution, and since a single task would handle all door approvals it would be harder to see where exactly the job is in it's process (when viewing it from a task list).
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#2

Postby Wai » Thu Mar 03, 2016 4:24 pm

Hi,

Currently it is no possible to use a Split-Join with an unknown number of parallel streams as this needs to be defined at design time.
This is on our list of enhancements.

As a work-around you can have a system task which starts a new Workflow Job for each work stream you require. You can pass into each new job the parent process ID.

To prevent the process continuing before all work streams are completed you can have a Pause node which constantly checks if they have completed. For example. this could be checking a database table, where you have recorded into the table each workflow process that was kicked off by the parent and a flag to say it has completed.

Does that make sense?
0 x

ericb
Ebase User
Posts: 82
Joined: Fri Jan 15, 2016 2:34 pm

#3

Postby ericb » Thu Mar 03, 2016 4:28 pm

Hi Wai,

That does make sense, and it sounds like a promising option. I'll definitely look into implementing it in the way you suggested, thanks.
0 x


Who is online

Users browsing this forum: No registered users and 2 guests