How "OnTaskChanged" and "OnWorkFlowItemChanged" work together?
-
Monday, April 30, 2012 9:19 AM
Hello all,
I have created a sequential workflow in visual studio 2010. I have little problem in that. Generally when we change a task "OnTaskChanged" actvity runs and when we change or update any field on the form "OnWorkFlowItemChanged" activity runs.
When i place these both activities in the same workflow. only "OnTaskChanged" activity runs when i change a task. But "OnWorkFlowItemChanged" does not run when i change any field on the form.
Can anyone please draw a model/diagram in visual studio 2010 sequential workflow in which both the activities are placed in the order that if we change any task "OnTaskChanged" activity should run, or if we change any field on the form then "OnWorkFlowItemChanged" activity should run.
Thanks in advance.
All Replies
-
Monday, April 30, 2012 2:11 PM
Read the following article and see if that helps.
Amit
- Edited by Amit V Monday, April 30, 2012 2:11 PM
-
Wednesday, May 02, 2012 11:37 AM
Thanks for the reply vasu,
I worked alot to solve my problem but no luck. Actually the thing is simple. I try to explain again.
A user can change field on the form and in this case "OnWorkFlowItemChanged" activity runs. And user may also change task, in this case "OnTaskChanged" activity runs.
Now i need both activities in the same workflow. Whatever a user change (task or form field) thier respective activities/events should runs. Which i am failing. The purpose of this to only update the task whatever the activity runs.
If you understand my scanario you can please draw a workflow diagram in visual stduio and can send me a snapshot of this. I shall be very thankful for your kind response.
Thanks.
-
Wednesday, May 02, 2012 6:10 PM
Marreena
You might be running into issue when Workflow is watching Task Update and someone updates the form. In this case your workflow will stop responding.
I would highly recommend reading the following article. This article has the code with the resolution.
Amit
- Marked As Answer by Marreena Thursday, May 03, 2012 9:27 AM
-
Thursday, May 03, 2012 5:35 AM
Thanks vasu,
I have some work arround according to my logic. I use parallel actvity which is working. I have a little problem in it please click on the url to view this thread, really thanks for your help :).

