Previous  Next          Contents  Index  Glossary  Library

Voting Activity

The Voting activity lets you send a notification to a group of users in a role and tally the responses from those users. The results of the tally determine the activity that the process transitions to next.

In general, an activity can either send a notification message or perform a PL/SQL function. The special Voting activity, classified as a notification activity, does both by first sending a notification message to a group of users and then performing a PL/SQL function to tally the users' responses (votes).

The following four fields in the Activity properties page of the Voting activity determine how the Voting activity behaves:

Message Field

This field lists Default Voting Message as the message that the activity sends. The Default Voting Message includes a Respond message attribute with an Internal Name called RESULT. This attribute prompts the recipient to reply to the message using one of the possible responses listed in the lookup type specified.

You can edit the Default Voting Message or use your own custom message as long as you associate a Respond message attribute called RESULT with the message. Similarly, you can customize or use a different lookup type associated with RESULT to offer other possible responses to the recipient.

Result Type Field

This field contains the lookup type that lists the possible responses that the Voting activity would tally. You can update this field to use any lookup type as long as the lookup type matches the lookup type specified for the Respond message attribute called RESULT. The default lookup type is Yes/No.

Expand Roles Check Box

When Expand Roles is checked, an additional Function field appears. A checked value tells the Workflow Engine to poll for responses from the multiple users in a role rather than just from the first user that replies, as is typically the case.

Attention: The Expand Roles Check Box should also be checked when sending FYI Notifications.

Function Field

This field lists the function that is used to tally the responses from users. The Voting activity calls the PL/SQL procedure WF_STANDARD.VOTEFORRESULTTYPE as the default function.

WF_STANDARD.VOTEFORRESULTTYPE is a generic tallying function. The Result Type that you specify for the activity defines the possible responses for the function to tally and the activity attributes you define determine how the function tallies the responses.

Activity Attributes

When you use the Voting activity, you must define a custom activity attribute of type Number for each possible voting response. Note that each possible voting response is actually a lookup code associated with the Voting activity's result type. Hence, when you define your custom activity attribute, the internal name of the activity attribute must match the internal name of the lookup code, that is, the response value.

The value of the activity attribute can either be blank or a number that represents the percentage of votes required for a particular result. If you provide a percentage, then the result is matched if the actual tallied percentage for that response is greater than your specified percentage. If you leave an activity attribute value blank, then the Workflow Engine treats the response for that activity attribute as a default. In other words, if no particular percentage is satisfied after the votes are tallied, then the response that received the highest number of votes among those associated with a blank activity attribute becomes the result.

Note: If the tallied votes do not satisfy any response percentages and there are no default responses (blank activity attributes) specified, the result is #NOMATCH. If a <Default> transition from the Voting activity exists, then the Workflow Engine will take this transition, otherwise, it will raise an error that no transition for the result is available (ERROR:#NOTRANSITION).

Note: If the tallied votes satisfy more than one response percentage or if no response percentage is satisfied, but a tie occurs among the default responses, the result is #TIE. If a <Default> transition from the Voting activity exists, then the Workflow Engine will take this transition, otherwise, it will raise an error that no transition for the result is available (ERROR:#NOTRANSITION).

Note: If you have something specific in mind that you would like to happen if a tie or no match occurs in a Voting activity, you can model that into a custom activity and create a <Default> transition from the Voting activity to that custom activity.

In addition to defining your set of custom activity attributes, you must also set an activity attribute called Voting Option, whose internal name must be VOTING_OPTION, to specify how the votes are tallied. You can set Voting Option to one of three values:

Example Voting Methods

Response Custom Response Activity Attribute Value
A 50
B 50
C 50

Response Custom Response Activity Attribute Value
A 50
B 50
C blank

Response Custom Response Activity Attribute Value
A 50
B blank
C blank

Response Custom Response Activity Attribute Value
A blank
B blank
C blank

Response Custom Response Activity Attribute Value
YES 100
NO blank

Response Custom Response Activity Attribute Value
GUILTY 100
NOT_GUILTY 100


         Previous  Next          Contents  Index  Glossary  Library