Welcome to K2 Underground Sign In | Join | Help
Activity Destination Users based upon a Repeating XML element

One of the lesser known new features of the expanded Destination Rule functionality of K2 blackpearl is the ability to very easily base Destination Users from a repeating XML node that contains a User ID. In K2 2003 this required a bit of coding in the Destination Rule for each Activity for which you wished to do something like this. With K2 blackpearl this is now a drag and drop experience in the process design canvas.  This can be a very useful feature in a schema driven process development effort.

In this example I will show how an InfoPath form can be leveraged to capture a list of users that will then become the basis for the next step’s Destination Rule.

1. Create an InfoPath form and InfoPath integrated K2 process as normal.

2. Design the form as per normal.

3. Add a new repeating Text (string) element to the Main data source (in this example I’ve named the field “Reviewers”)

clip_image002[8]

4. I then drag out the repeating text field onto the desired InfoPath view:

clip_image004[19]

5. In this example I did the following:

  • a. Selected “Repeating Table” when prompted
  • b. Changed the text box to a Drop Down List
  • c. Added following content to the Drop Down List to allow users to select reviewers from an easily readable drop down list (with actual Domain\userID as the hidden value):

clip_image006[8]

6. Save and close the InfoPath form.

7. You should now be back at the Process design canvas and see the following message:

clip_image008[8]

8. Click OK and then Finish

9. In this example, I then want to change the destination rule for the desired activity:

clip_image010[8]

10. With the Destination Rule window open Navigate to the Destination Users window:

clip_image012[8]

11. Click the Add button

12. Click the ellipse (“…”)button

13. Navigate to the Process/Activity Data tab within the Context Browser then expand the XML Fields node until you find the “Reviewers” node.

14. Either drag and drop the Reviewers node or select and click the Add button.

clip_image014[8]

15. Once this has been selected it should look like:

clip_image016[8]

Now if we deploy the process and then open the form we can select multiple users:

clip_image018[8]

When the process hits the Destination we setup it will create task rights for each user that appears in that reviewer repeating section. If we review the Out of the Box “Activity Instance Destinations Report” for this instance we can see that the three users we selected in the InfoPath form are now destination users for this activity.

clip_image020[8]

Published Thursday, May 22, 2008 2:14 PM by Bob

Comments

# re: Activity Destination Users based upon a Repeating XML element @ Wednesday, July 23, 2008 10:59 PM

When was this functionality added?  Previous versions of black pearl still required a bit of coding to read the repeating field properly, other wise it would only use the first node and ignore the rest

gonemad

# re: Activity Destination Users based upon a Repeating XML element @ Wednesday, August 27, 2008 6:23 AM

I believe this functionality has existed since RTM.  I don't recall ever having to write code in blackpearl to do this scenario.  K2.net 2003 is a different story... this definately requried code in the process defintion.

Bob

Anonymous comments are disabled
Powered by Community Server (Commercial Edition), by Telligent Systems