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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Promotion Request Workflow Team Verification

bwilcox
1-Newbie

Promotion Request Workflow Team Verification

Is there a way to query the team members selected for a particular promotion request and then check to see if a minimum number of participants was selected for a particular role? We have a promotion request workflow where we have set the number of required participants equal to 2. If the user submitting the request forgets to select approvers or only selects one, then the process hangs. Any ideas?


Thanks,


Benjamin Wilcox – IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definition downhole and sub-surface operations
> Get the Facts.

5 REPLIES 5
RandyJones
19-Tanzanite
(To:bwilcox)

On 09/06/13 16:07, Ben Wilcox wrote:
>
> Is there a way to query the team members selected for a particular promotion request and then
> check to see if a minimum number of participants was selected for a particular role? We have a
> promotion request workflow where we have set the number of required participants equal to 2. If
> the user submitting the request forgets to select approvers or only selects one, then the process
> hangs. Any ideas?
>

Check out these posts:

Randy,


Thanks for the prompt reply. I have tried that approach, but the syntax check fails, so I am guessing that the promotion request object workflow must require a different way to read the team members. Do you (or anyone else)know how to query the team/participants on a promotion request object?


Thanks,


Benjamin Wilcox – IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definition downhole and sub-surface operations
> Get the Facts.

RandyJones
19-Tanzanite
(To:bwilcox)

On 09/06/13 16:39, Ben Wilcox wrote:
>
> Randy,
>
> Thanks for the prompt reply. I have tried that approach, but the syntax check fails, so I am
> guessing that the promotion request object workflow must require a different way to read the team
> members. Do you (or anyone else) know how to query the team/participants on a promotion request
> object?
>


I use this in a conditional to check to see if any Reviewers have been selected:
String sig = "Conditional to check for Reviewer";
System.out.println("Here at " + sig);
result = "NoReviewer";
//get the principals selected for the REVIEWER role
java.util.Enumeration
principals=((wt.team.Team)((wt.workflow.engine.WfProcess)self.getObject()).getTeamId().getObject()).getPrincipalTarget(wt.project.Role.toRole("REVIEWER"));

//find out how many principals have been selected
int i = 0;
while(principals.hasMoreElements())
{
System.out.println(sig + " here at principals loop");
wt.org.WTPrincipal wtprincipal =
((wt.org.WTPrincipalReference)principals.nextElement()).getPrincipal();
System.out.println(sig + " principal = " + wtprincipal.getPrincipalDisplayIdentifier());
i++;
}
System.out.println(sig + " num selected = " + i);
if(i > 0) result = "HaveReviewer";


> Thanks,
>
> *Benjamin Wilcox* -- Intelli*Serv*^^(TM)
>
> *PPM & PDM Administrator*
>
> *IntelliServ provides broadband networking and along-string
> evaluation services for high-definition downhole and sub-surface operations**> Get the Facts.*
>

I tried that in a conditional, but I get an invalid flag error when checking the syntax (see attached screenshot). I have gotten this to work in workflows that are not for promotion request objects, but I cannot get it to work in the workflow for a promotion request object.


Benjamin Wilcox – IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definition downhole and sub-surface operations
> Get the Facts.

I went ahead and tried it, even though I got the Invalid Flag error, and it seemed to work fine. I don't know why the syntax checker doesn't like it....


Thanks, Randy, for your help.




In Reply to Ben Wilcox:



I tried that in a conditional, but I get an invalid flag error when checking the syntax (see attached screenshot). I have gotten this to work in workflows that are not for promotion request objects, but I cannot get it to work in the workflow for a promotion request object.


Benjamin Wilcox – IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definition downhole and sub-surface operations
> Get the Facts.







Benjamin Wilcox – IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definition downhole and sub-surface operations
> Get the Facts.

Announcements


Top Tags