Answered by:
CRM V4 Workflow - wait until task completed or wait 1 day then...

Question
-
Hi,
I'm struggling on getting my head round a particular workflow I'm writing.
We have a workflow, which assigns a User a Task. I then want the workflow to wait until the Task is completed, then go on to the next step, or/and wait 1 day and check if the Task is completed (and if so go on the same next step), but if it isn't completed then to Task another User as well (in case that initial User is away or whatever).
The problem I'm struggling with though is that we can't wait 1 day by default. i.e. If the task is assigned to the User and he/she does it within 5 minutes of it being created, we want the workflow to move on to the next step immediately and not wait for 1 day before checking the condition.
Does this make sense? And any thoughts on how I can achieve this?
Thanks very much for your help,
Matt
Matt ValentineThursday, October 28, 2010 7:18 AM
Answers
-
There is a way of doing an 'OR' for waiting using the parallel wait branch. Add a Wait Condition step, select it and set a parallel wait branch. You can then set these to Timeout until 1 day and Task status reason equals <appropriate values>. If my understanding is right, the moment one of these conditions is met, the workflow moves on. You will then have to add the next step twice (once for each branch) or reference the same child workflow.
Leon Tribe
Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe- Proposed as answer by Leon TribeMVP Monday, November 1, 2010 4:58 AM
- Marked as answer by Jim Glass Jr Monday, November 1, 2010 4:18 PM
Monday, November 1, 2010 4:58 AM
All replies
-
You need more than one workflow here. Create another workflow which gets fired on the change of the status of the task and make your logic accordingly.
MS CRM MVP :: uMar Khan :: Microsoft CRM Consultant (Blog :: http://umarkhan.wordpress.com)Thursday, October 28, 2010 9:50 AMModerator -
Thanks for the response,
So you're saying:
Workflow 1
Task User A with Task 1
Wait 1 Day
If Task 1 is not completed then:
Task User B with Task 2and Workflow 2 which is fired when Task 1 status is completed
That makes sense to me, I'll give that a go, thanks very much
Matt
Matt ValentineThursday, October 28, 2010 10:09 AM -
I had a similar problem in past:
You can't have wait condition : "Check if Task Status == 'Completed' OR Task is Created 1 day before"
Issue : We can't write "OR" condition in case of workflow.
It is always "AND" so you can't get both the things in one go.
Solution :
1. You can have child workflow running on Change Status of newly created Task where you will check if the workflow execution time is less than "Task Created Date + 1 day" then perform action
In Main workflow will have to check if workflow Execution time > "Task Created Date + 1 Day" AND "Task Status" is not completed
Thus you can execute atleast one codition any given point of time.
2. You can always write the code using Custom Workflow Activity to do above using single workflow
Jai Ho CRM http://mscrmkb.blogspot.com Skype - amol.gholap
Mark as answer if a post has answered the questionThursday, October 28, 2010 10:33 AM -
There is a way of doing an 'OR' for waiting using the parallel wait branch. Add a Wait Condition step, select it and set a parallel wait branch. You can then set these to Timeout until 1 day and Task status reason equals <appropriate values>. If my understanding is right, the moment one of these conditions is met, the workflow moves on. You will then have to add the next step twice (once for each branch) or reference the same child workflow.
Leon Tribe
Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe- Proposed as answer by Leon TribeMVP Monday, November 1, 2010 4:58 AM
- Marked as answer by Jim Glass Jr Monday, November 1, 2010 4:18 PM
Monday, November 1, 2010 4:58 AM