Utilising the ‘Destination User’ as an input to an event in K2 [blackpearl]

The destination user can be a fairly common artifact that you need to retrieve during a workflow, however, even though you may have specified a destination user in your form, ASPX or SharePoint integration event you may find that the contents of the user in the activity instance is blank because of the way you configured the destination rule.

Figure 1: The activity strip

Open the activity strip (something I didn’t know existed till a K2 guru pointed it out to me) and select Destination Rules

Figure 2: Advanced Destination rule configuration (1)

You’ll need to scroll back one item on the wizard to ensure the wizard runs in advanced mode before you’ll see the screens shown in Figure 2 and 3.

By default K2 [blackpearl] will be in ‘plan just once’ mode. This wont create you a destination user, it will create an activity that can be filled in by any user, just once. Select plan per destination, and you’ll guarantee that one or more specific users get the activity only!

Figure 3: Advanced Destination rule configuration (2)

Clicking next on the wizard will bring you the screen shown in Figure 3, this allows you to specify the number of ’slots’ that this activity will have.

End the wizard, and you should find that you can now use the activity destination instance as an input to another event on your workflow. I believe this may only work if you specify one slot and one user, but will try it out to see what exactly happens when I specify multiple slots and multiple users in the destination rule wizard.

Figure 4: Location of the destination user inside the Activity Destination Instance

Figure 4 shows the location of the ‘Destination User’. This can be used to assign a task if integrating with SharePoint task workflow, or for filling in a field on an infopath form to create and audit of who filled in the form.



You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Utilising the ‘Destination User’ as an input to an event in K2 [blackpearl]”

  1. SpittingCAML » Blog Archive » Modifying the contents of a SmartObject using the SmartObject event, and then loading the SmartObject into InfoPath Says:

    [...] with the Activity Instance Destination User (how to get this particular value is explained on this blog too :-)) and current role with a string "Review" and the ‘documentAutoNumber’ [...]

  2. Tim Says:

    Have you ever done this in K2.net 2003?

    I have my destination users updated in K2 Activitiy data fields; however, whenever I try to copy them to my infopath XML fields, I only get one of my destination users populated. The remaining 3 are blank.

    I tried to find the fields you mentioned from BlackPearl and can’t find them in 2003. Any ideas?

  3. SpittingCAML Says:

    Hi Tim, I wish I could help, but I only really started using K2 products when the beta version of BlackPearl became available. I would recommend Jason Apergis’s blog http://k2distillery.blogspot.com and K2 Underground for people in the know.

    kind regards

Leave a Reply