ActiveVOS Designer BPEL for People User’s Guide

Using Expressions for Role Assignments

Use the Expression option to write a conditional expression for selecting task or notification-related roles. The expression can be based on the input data of a People activity. For example, if you are invoking a service to retrieve identities, you can pass them into the potential owners or administrators identities.

The expression can include a process variable or it can be composed using WS-HT custom XPath functions, described in Custom Functions.

To add an expression for a task or notification role:

  1. From the Outline View, select task or notification.
  2. In the Assignment tab of the Properties view, select a role, such as potential owners.
  3. In the Value column, select the Dialog Button at the end of the row.
  4. Select Expression as the Source, and then select Expression Builder.
  5. In the Expression Builder, select a Human Task (WS-HT) custom function or other variable in creating an expression.
  6. Select the users or groups for the role.

XML Syntax

<htd:from expressionLanguage="anyURI"?>
    expression
</htd:from>

Example Expression for a Task’s Role Assignment

<htd:potentialOwners>
   <htd:from>$voters/users/user[i]</htd:from>
</htd:potentialOwners>

In the example above, the potential owners definition is contained within a For Each activity.

Example using a WS-HT custom function:

<htd:potentialOwners>
    <htd:from>
        htd:getInput("part1")/approvers
    </htd:from>
</htd:potentialOwners>
<htd:businessAdministrators>
    <htd:from>
        htd:except(htd:getInput("part1")/admins, 
        htd:getInput("part1")/globaladmins[0])
    </htd:from>
</htd:businessAdministrators>

In the example above, the WS-HT custom function getInput returns a list of potential owners defined as the child element approvers in part1 of the task’s input message. The business administrators group includes globaladmins and excludes admins.

Example for a notification’s role assignment

<htd:peopleAssignments>
  <htd:recipients>
   <htd:from>
     htd:getPotentialOwners("ApproveClaim")
   </htd:from>
  </htd:recipients>
</htd:peopleAssignments>