Vote Tallies
* 
When creating a Windchill ProjectLink routing workflow template, the following variables must be created:
PJL_Instructions_Variable of type java.lang.String
PJL_Distribution_List of type wt.team.Team
When writing a voting expression, use the following basic code:
//Object to represent the activity.
WfAssignedActivity mySelf = ((WfAssignedActivity)self.getObject());

//Routing events for activity. The resulting vector can hold duplicate values of some events.
Vector userEvents = (Vector) mySelf.getUserEventList();

//Tally the result.
result = WfTally.all(self, userEvents);
Result Tallies
The following result tallies are available:
WfTally.any
Select events chosen by one or more required users.
WfTally.all
Select events chosen by all required users.
WfTally.percent
Select events based on what percent of users choose an option. Use with a tallying operator.
WfTally.number
Select events based on the number of users that choose an option. Use with a tallying operator.
WfTally.plurality
Select the events chosen by the most required users. If there is a tie, then each event in the tie is chosen.
WfTally.notPlurality
Select the events chosen by the least required users. If there is a tie, then each event in the tie is chosen.
Routing Type
When routing events based on votes, use one of the following routing types:
Manual—Users can vote for one or more options.
Manual exclusive—Users can vote for only one option.
Tallying Operator
When tallying votes by numbers or percent, you can use the following operators:
WfTally.GT
Greater than >
WfTally.LT
Less than <
WfTally.EQ
Equal to =
WfTally.GTE
Greater than or equal to >=
WfTally.LTE
Less than or equal to <=
The following voting samples are provided:
Isto foi útil?