Parallel Paths in Workflow

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
chewblocka's picture

I'm looking for some feedback. I'm using the workflow module and generally find it very good. Very easy to setup and can be extended to do quite a bit. The only thing it seems to be lacking that I keep finding myself needing and having to work around, is parallel paths. Does any one have any ideas on how to accomplish this? I am a fairly adept programmer and may be able to devote a little bit of time to this, but looking for some input to see if anyone else out there has this need or has any ideas on how to accomplish this?

My initial thought is that the setup of workflow_ng may be more suited for this use case, however I currently find their user interface much less user friendly. Any ideas?

Comments

what do you mean by

amitaibu's picture

what do you mean by "parallel paths"?

Example: Lets say I have a

chewblocka's picture

Example:

Lets say I have a content type of Contract and want a workflow to walk through all the steps of getting a contract created and agreed upon. There are many different steps to getting a contract created that have to be performed by many different people. Many of those steps can be done at the same time ("in parallel"), however, currently, a node can only have one workflow state and once one person says to move it, it goes to the next step. The ideal flow here, even if it still just has one "status" let's say legal needs to do something, IT needs to do something, and Management has to do something, someone from each group should have to say "OK" (needs to happen inside the workflow with name/comments captured) before it can move to the next step.

Make more sense now?

workflow_ng...

amitaibu's picture

I understand. It seems currently Workflow module can do it, because it has states, however I would opt for Workflow-ng, once some features will be implemented:
1. CCK states.
2. Allow adding actions to trigger other configurations.

Maybe, if your a developer, you can speed things up ;)

Thanks for the feedback. I

chewblocka's picture

Thanks for the feedback. I really wish I could help out as I love developing and contributing to open source projects, but I just don't have the time right now between work, going to grad school part time, and caring for a new infant at home. So for now I'll just wait with my fingers crossed until I either get some time freed up at work or home.

workflow-ng

fago's picture

yep, with that you could build it... :)

If access permissions are not so important for you, you could already built it now.

e.g.
create a select with CCK containing all possible states for Management Steps, another one for IT Steps. Then you can use workflow-ng to check both "states" and react as you desire. However there is no access control as IT people could change the management's state.

So another way to phrase this is

mlncn's picture

Multiple conditions to move to another workflow state? As long as the other people/roles/groups know they're responsible for doing something.

Good idea, don't know either module well enough to advise, but we're subscribing!

~ ben melançon

member, Agaric Design Collective
http://AgaricDesign.com - "Open Source Web Development"

benjamin, agaric

If I understnad correctly the requirements...

boaz_r's picture

Then I'd suggest that you'd go straight to the workflow-ng module.

I was recently in a very similar situation. My requirements were to have multiple parallel workflows per "person", which is a registered user on the system. How do I do that? at the time, workflow-ng was nearing completion but documentation almost did not exists (at least not for newcomers). I've implemented this by instantiating "child nodes" for a user (actually for its user-profile, using node profile module). Then, each child node was a different content type (say in your case - company-management-context, contract-municipal-stuff, contract-financial-aspects, etc...). Then, the whole thing worked as I had one workflow per content type and the whole thing orchestrates nicely together.

Now, it takes resources to develop this. workflow-ng today is much better documented, IIRC, so I would have taken the time learning to use it.

You're advise to have a look here (not too much info other than my case in other words), which I originally consulted on my with this group.

Good luck!

Boaz
PHP therapist
Linnovate

Boaz
PHP therapist

Is there any movement on this

tomhung's picture

Is there any movement on this issue?

I have a similar case and wonder if D6"Workflow" has this capability or if only the D5"Workflow-ng" can accomplish this.

  > 2
  > 3
1 > 4 > 6
  > 5

1 = Initialization State
2 = Group A Approval State
3 = Group B Approval State
4 = Group C Approval State
5 = Group D Approval State
6 = All Groups have Approved State

So I have a solution using

tomhung's picture

So I have a solution using Workflow Fields. This will allow the "Creator" to make a node, automatically go to "Approval" state, have 4 groups within the "approval" state, each group can only see their fields, edit and mark approved, once all the groups / fields are marked approved then the triggered rule switches the state to "Final". Therefore virtually allowing for Parallel work within one state.

  > 2
  > 3
1 > 4 > 6
  > 5

INSTRUCTIONS:

Create a content type called "test multi state"
Create a CCK field called "Group A Approval" Text, Select List, Values = Yes
Create a CCK field called "Group B Approval" Text, Select List, Values = Yes
Create a CCK field called "Group C Approval" Text, Select List, Values = Yes
Create a CCK field called "Group D Approval" Text, Select List, Values = Yes
Create a CCK text field called "Final State" Text, Text Field

Create Workflow:

(creation) > approval > final

Edit workflow "From / To":
(creation) to approval check "author"

Edit (creation) workflow fields:
Visible: Author = Title, Body
Editable: Author = Title, Body

Edit "approval" workflow fields:
Visible:
- Author = Title, Body, Group A Approval, Group B Approval, Group C Approval, Group C Approval
- Group A = Title, Body, Group A Approval
- Group B = Title, Body, Group B Approval
- Group C = Title, Body, Group C Approval
- Group D = Title, Body, Group D Approval
Editable:
- Author = {none}
- Group A = Group A Approval
- Group B = Group B Approval
- Group C = Group C Approval
- Group D = Group D Approval

Edit "final" workflow fields:
Visible: all can see everything
Editable: Author = Final State Field

Create a "Triggered Rule"
- Label = test multi state final approval
- Event = After updating existing content
Rule Elements:
- IF Type = "test multi state"
- AND "Group A Approval" has value = yes
- AND "Group B Approval" has value = yes
- AND "Group C Approval" has value = yes
- AND "Group D Approval" has value = yes
- DO Change workflow state to new state = final

For Drupal 7

colan's picture

To sum up the previous post (originally meant for Drupal 6?) for Drupal 7, the high-level plan would be:

  1. Enable the core List module.
  2. Add a Boolean field for each approver that can work in parallel.
  3. Enable the Rules module.
  4. Create a rule firing on the workflow change to that approval state which will notify the approvers.
  5. Create a rule firing on the content type's update to move to the next state if all of the checkboxes are checked.

Some more ideas: - The

johnv's picture

Some more ideas:
- The workflow issue queue has an issue for this "Mutli review": https://drupal.org/node/2097401.
- The Maestro module is a good alternative, but perhaps too heavy.
- Workflow version 7.x-2.x now implements workflows as Fields, so you can add 2 Workflows to a node type.

Workflow

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: