Task users from a repeating node

Say you have an XML document with the following structure:

And you want to assign a task to users from the node <User> of the Repeating node <TaskUsers>

In K2, you would set this up as follows:

In your Activity which has the client event, click on destination rule:

On the wizard page, click the “back” button:

Then check the Advanced settings check box and click Next:

Select all at once option:

configure the “required responses” – slots:

Now you will see a default destination set created on the next screen:

Click edit and then click Add to create a destination. On the destination textbog, drag and drop the repeating XML node <User> from the XMLDocument which you have defined as a Process XMLField. This is grabbed from the context browser’s Data tab:

You are done. Deploy and run the process. You will realise that K2 only resolves the first of the repeating node values and only assigns to that user 😦 The issue is K2 destination rule can handle this scenario if the node being used as the destination is a repeating node itself. Not a child of a repeating parent node.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s