cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Super Workflow User Task Idea

avillanueva
22-Sapphire I

Super Workflow User Task Idea

I know this might be a common problem and I by no means take credit for
the idea. As far as I know, it's not possible to have a user task were
the role participants can be altered in the workflow prior to the task
being started without losing the role the end user was acting as. Let me
illustrate. I can create a workflow that has 5 roles required to make a
choice and set it to Any, meaning any one in that role can complete the
task for that role. If I have 2 Quality Engineers in that role, first on
wins. The task does not complete until all roles have made a choice. The
decision for which roles get a choice is made in the workflow template.
Each time the workflow runs, the role list is static. If I want to vary
the list or roles by Product, I need a copy of that workflow for each
product.



Another option would be a massive workflow with each possible role
defined as having its own task. There would be decision gates
determining if the task should be started and logic after the parallel
tasks waiting for each to complete before moving on. It would look
something like an inverse March Madness bracket or branching capillaries
for those medical types.





One workflow but very complex to design and manage.



Another option would be the use of a team or team template as the
participant to the task. You could programmatically add roles to the
team as you see fit before the task was started. I believe from testing
that what ends up happening is that all roles are merged along with the
users in those roles to a single assignee role (how it would show up in
the assignment). Depending on the participant setting (all or any),
would determine if all people needed to complete the task. What you lose
at the end is what role they were acting as when they completed the
task.



I believe there is a need for a better user task that can be send to
various roles determined during the workflow and preserves who each
person's role was during their assignment. For example, I could define
a workflow variable for a team, assign it to this task with 'any' as the
completion option meaning any from the roles in the team. Now, ahead of
this task, I could replace the team, modify it, whatever. When the task
executes, it looks at the team, grabs the roles and issues assignments
to the users of the those roles and maintains who they are. When they
sign, it would say signed by this user as that role. I would prefer
this over other solutions that required a manual task (such as
determining the assignment list) each time the workflow executes.



Anyone up for a collaboration effort to develop a new task type? Is this
coming down the road?

5 REPLIES 5
AL_ANDERSON
5-Regular Member
(To:avillanueva)

This is how we address this problem of having a flexible, reusable,
variable set of approvers in a workflow.

For all workflow approvals, we have created workflows that use a common
3-task approach in Windchill 8 that should work in any version of PDMLink.

(1) Assign the list of people to sign off on a review. First, we have a
task that goes to a "Creator" actor or a "Change Manager" role where the
purpose of the task is to use a Setup Participants task to assign a
variable list of people to the role appropriate to the next task.
Depending on the task, we use the role "Stakeholder" or "Reviewer" or
"Approver" but we only have one role that needs to be populated in this
first step. The team templates generally have no default values assigned
to these roles used to variably assign participants.

(2) The role assigned to perform the review get a task for "All" of them
to complete. This task goes to a ground icon.

(3) Concurrent with task (2) the assigner from task (1) gets a
simultaneous task to "Review Input." This person has the authority to
stop the review at any time and either approve or disapprove the review.
This allows for the case in which one of the reviewers is on vacation, or
if one finds a problem that is clearly going to kill the review and the
lead want to start the rework loop right away before getting the others to
complete their review. For that possibility, we have the concurrent
Review Input task. When this task completes, the workflow goes to a robot
that captures all of the votes and comments in the lifecycle history
including an auto "No" vote with the auto-added comment "DID NOT
VOTE-OVERRIDDEN" in the lifecycle history before completing the Review
task (if its not already completed). This way the lead can go forward,
but if he does so improperly, then there is a permanent record of that
fact.

Here is an example from our Windchill Foundation 8 system, but PDMLink
should be similar.



The Complete Proposal and Begin Stakeholder Input task is a setup
participants task to assign users to the "Stakeholder" role.

Review Change Proposal is set up as a Review for All Stakeholders.

The Review Stakeholder Input task is for the person who had assigned the
stakeholders (an assignee variable set on task completion of the Complete
Proposal and Begin Stakeholder Input task.

The only interesting code exists in the CaptureVotes robot. It looks like
this. Note, above, how the CaptureVotes has a "Complete" Event to the
"Review Change Proposal" task instead of a "Start" Event.

wt.lifecycle.LifeCycleManaged lifecyclemanaged =
(wt.lifecycle.LifeCycleManaged) primaryBusinessObject ;
try {
java.util.Enumeration pendingItems =
wt.workflow.work.WorkflowHelper.service.getUncompletedWorkItems(lifecyclemanaged,
"VoteReview");
while(pendingItems.hasMoreElements()) {
wt.workflow.work.WorkItem workitem =
(wt.workflow.work.WorkItem) pendingItems.nextElement() ;
wt.lifecycle.LifeCycleSignature sig =
wt.lifecycle.LifeCycleSignature.newLifeCycleSignature();
try {
String s1 =
wt.lifecycle.LifeCycleServerHelper.service.getPhaseName(lifecyclemanaged);
String s = "

Antonio,


I know this is going back a few years but did you make any progress withyour improved workflow task concept?


My client is requesting something similar, a "Team sign-off" capability allowing a single task to go out to multiple groups or roles requiring "Any" single user from "All" groups/roles for completion. Is that similar to what you had in mind and if so we're you able to get anywhere with it?


Regards,


Greg Montgomery

Wow, that does go back a while. I am running 9.1 now but the problem is
basically the same. What I have done is sort of write a self modifying
workflow. You are still bound by a template, which determines what
roles, groups or users get assigned a task. What I ended up doing was
using Role Variables as "slots". I have 20 of them. I can dynamically
change the roles which are assigned to each slot in tasks leading up to
the signoff. I do this by asking a user to pick from a list of context
teams (just roles not users). For the remaining unassigned roles, the
are deadended to administrator, changed to not required and quickly
auto-completed. This leaves the task waiting for the remaining roles
which are populated from the context team (Team page). All these roles
are set to any.

There is an issue where emails coming from this setup will show the role
as Assignee. I have already filed a SPR on this so it should be
addressed. I have worked around this by sending my own email
notifications about a workflow task pending.

I am wonderingif you have done any more work with roles. I am trying to do a similar thing in 10.0 with the role variable. I have loaded 3 variables and have a start expression on the task to populate this variables based on an IBA on the change activity. The only issue that I have now is the requirement could be to fill 1 2 or 3 of the roles and the others I don't want to use. Is there a way to remove these roles from the participants list? I tried to set them to null, but it still creates some default assigned role in place of the ones that are null.

It's a bit of coding but possible. Speaking for 9.1 here. I first handled this by leaving the remaining role variables unassigned. They defaulted to a single user, in my case, the administrator but any dead end user will work. As soon as the task was issued, I ran code to mark those as not-required. This way the task completes without those roles voting or taking action. I did work on another piece of code that marks those assignments as complete which removes them from the assignments list. Very complicated but possible. Unfortunately, I cannot share this work.
Top Tags