Skip to main content

Currently we are using the Flexi-Task control to assign tasks to users as new items are created. We are exploring the possibility of having tasks automatically be delegated based on whether or not they are on PTO. The PTO is tracked in a calendar within the same site collection. Is this something that Flexi-Task can handle? So far my searches have come up with nothing.

You could firstly Query your calendar and if your user is not on PTO you create the flexi task for your user , if NOT create it for the delegated


Drop in a "Run parallel actions" action. On one side drop your flexi-task, on the other a "Query list" action followed by a "Set a condition" that tests whether the person showed up on PTO. If yes, delegate, if no, do nothing. You could even add a loop to run daily in case the person goes on PTO before the task is complete. You will just need to store the task ID in a variable so that you can reference it in the delegate workflow task action. Also, may need to put a short pause before the query list so the left side of you parallel action does not outrun the right side and fail because it does not have the variable loaded yet.

141531_pastedImage_0.png


Hi Jason,

I see my solution was incomplete. The thing is, you need to associate the Action ID not the Task ID. They are different data types. The flexi task does not explicitly expose the Action ID since it has delegation built into it. There is a way around it though.

I found the workaround here (Issue Retrieving Flexi Task ID ) and I just tested it and it works for what you are trying to do.

Here is your Delegation branch...

142992_pastedImage_1.png

Create the following variables with the following data types:

142997_pastedImage_3.png

Here is the configuration of the Call Web Service...

(Use your credentials or build some stored credentials)

142993_pastedImage_2.png

Here is the Query XML configuration

(Here is the XPath as well: /defaultNS:UserTask/defaultNS:HumanWorkflowID)

142998_pastedImage_5.png

Now the variable swap...

142999_pastedImage_6.png

Now just delegate...

143000_pastedImage_7.png


Thanks for the info, it makes sense

One thing I've noticed is that the set condition is following the "No" path regardless of the value that is being returned from the Query List. Within the email body I have a reference to the On PTO variable, and I can see it's showing the correct value, but the email is always coming from the one side.

2015-11-16_14-55-45.png

2015-11-16_14-21-08.png

2015-11-16_14-20-26.png

2015-11-16_14-21-34.png


In your Query List action, are you filtering to the current primary approver, be it employee number, Name, User ID etc.? Also, I notice you have recursive checked. This is only needed if you are drilling into folders.


Reply