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

Expression to determine which participant has voted for which option.

Highlighted
Newbie

Expression to determine which participant has voted for which option.

Hi all,

I have an activity in a custom workflow which has two routing options yes and no.There are two roles associated with that activity as participants.They give their votes as yes or no.All these votes go to the creator in the next activity and the creator resends the task to only that person who has given his vote as yes. and any other participant who has given vote as yes should not get the task back.

So how should i go about it..iam trying to write an expression to get which participant has given which vote but iam not getting any method for that in workflow.

Please help me as soon as possible.

Tags (2)
1 REPLY 1
Highlighted

Re: Expression to determine which participant has voted for which option.

Hello

for example in the Terminate transition of the activity you can use thise code

// get the user

wt.org.WTPrincipalReference user;

WfAssignedActivity activity= (wt.workflow.work.WfAssignedActivity)self.getObject();

java.util.Enumeration allassig2 = activity.getAssignments();

while (allassig2.hasMoreElements())
{
Object a2= allassig2.nextElement();
java.util.Enumeration balots = ((wt.workflow.work.WfAssignment)a2).getBallots();
while (balots .hasMoreElements())
{
Object bal= balots .nextElement();

user = ((WfBallot)bal).getVoter();

}
}

from the WFBallot , I think you're also able to get the value of the vote ...

regards

Announcements