K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
Adding a Role using a SmartObject

Adding a Role using a SmartObject

The following scenario illustrates how the GetList method of a SmartObject can be used as a Role Item. The Role will execute which will activate the Getlist Method of the SmartObject which will return the list of names for the Role

  1. Create the RoleDemo SmartObject containing the following Properties:
    • id (type Autonumber)
    • Name (type Text)
    • Surname (type Text)
    • Department ID (type Text)
  2. Create user entries for the SmartObject. We used the following users:
    • K2:K2DEMO\Bob, Department ID =  1
    • K2:K2DEMO\Brian, Department ID =  1 
    • K2:K2DEMO\Joe, Department ID =  2 
    • K2:K2DEMO\Sam, Department ID =  2 
  3. Navigate to Management Console>Server>Workflow Server>Roles
  4. Right click Roles and select Add New Role
  5. Click on Add Role Item and select the SmartObjects tab

    Fig. 1. SmartObjects tab

  6. Select the RoleDemo SmartObject

    Fig. 2. SmartObject selected

  7. Select the GetList Method and then the Name property.  

    Fig. 3. Method and Property selected

  8. Click OK, provide a Role Name and click Save. Your Role is now available to be used as a destination set.

    Fig. 4. New Role added

  9. Create a K2 workflow process and use the Role as a destination user. Save and deploy the process

    Fig. 5. Destination set

  10. Start a new instance of the process, then navigate to Management Console>Server>Workflow Server>Worklists. Note that the Role can be expanded and the users of the SmartObject is listed. When the Role is executed, the Getlist Method of the SmartObject is actioned and the user names are retrieved. The users will each receive a worklist item, but the destination set will still be treated as a Role.

    Fig. 6. Management Console - Worklists

For in-depth technical information on Roles and Advanced Destinations, visit the following link http://k2underground.com/files/folders/technical_product_documents/entry20948.aspx

 

 


K2 blackpearl Help 4.6.10 (4.12060.1690.0)