An approval task gets assigned to ‘Approver A’
If ‘Approver A’ approves, the workflow continues
If ‘Approver A’ rejects, the approver enters a reason for rejection in a ‘Comments’ column.
On rejection, ‘User A’ gets a task to review and complete the task once ready to resubmit for approval.
The requirement: ‘User A’ needs to be able to quickly see why their item (i.e. document) was rejected – ‘User A’ should be able to see the rejection reason as part of their ‘review’ task description.
| Action | Multiple Assignees | Single Assignee | Returns Values |
| Start a Task Process | YES | YES | Task Outcome |
| Assign a Task | NO | YES | Task Outcome Task ID |
In SharePoint Designer you can directly access the workflow task list related columns under ‘Association: Task List’ if you have the Task ID of the particular task. Having this option was both fortunate and unfortunate at the time. Fortunate, since it allowed me to quickly accomplish my requirement with an OOTB solution. Unfortunate, because I did not have the Task ID. If you have created SPD2013 workflows, you may have noticed that the ‘Assign a Task’ action returns the Task ID. You also may or may have noticed that in 2013, there is also an action called ‘Start a Task Process.’
Let’s take a look at the main differences between these 2 types of actions:
Note: Only differences relevant to the context of this post have been listed.
Note that both of these actions are very similar, and in essence, do the same thing – assign an approval task. The way I see it, if you need to assign the same task to multiple people or to be able to assign a task to each individual person within a group (SharePoint or AD), consider using the ‘Start a Task Process.’ If not, the latter might come in handier if you need the Task ID for anything.
In my case, there was a requirement where I needed to assign the task to multiple people and take the first response as the outcome for the task. In this scenario, the ‘Start a Task Process’ was the right way to go. It was also the cause of the issue, this action did not return the key piece of information I needed, a Task ID. At the time, I turned to finding an alternative solution. I considered more complex routes such as using the ‘Call HTTP Web Service’ to get all tasks related to the current instance of the workflow but such options came with a variety of unnecessary complexities.
As I was concluding that a more complex solution may be unavoidable, between conversations with the client, it was noted that the business process could be tweaked. Turns out that while the particular task could have multiple approvers, 99% of the times it only had 1. Considering this, the client was ok with making it a part of the business process to only allow 1 approver. Luckily for me, tweaking the business process allowed me to use the ‘Assign a Task’ action and put me back in the OOTB business: Use the Task ID to locate the task of interest, get the value needed and save it in a variable. Add the variable to the next task’s description and there you go, requirement met.




THE VERY INFORMATIVE BLOG ITS GOOD TO READ
ReplyDeleteAzure Training in Chennai | Certification | Azure Online Training Course | Azure Training in Bangalore | Certification | Azure Online Training Course | Azure Training in Hyderabad | Certification | Azure Online Training Course | Azure Training in Pune | Certification | Azure Online Training Course | Azure Training | microsoft azure certification | Azure Online Training Course