views:

374

answers:

1

I'm monitoring for either

  • Workflow Task Change
  • Workflow Item Change

OnApprovalTaskChanged is being fired, but not onWorkflowItemChanged. Is this a known issue and what could be a workaround?

If i remove ListenActivity, onWorkflowItemChanged gets triggered!

Here is part of my workflow: Workflow diagram

A: 

Solved this issue. This article helped me.

What you must do is to set InitializeWorkflow activity and create new correlation token for that activity. Parent for this correlation token must be set parent sequence activity. Then use this new token on OnWorkflowItemChanged event.

Everything for me works as expected if activities put in following order:

-Replicator (i have to create multiple tasks)
--Sequence
--some stuff 
---InitializeWorkflow (this activity is for bugfix, create new token, parent=Sequence)
---While (in my case: while task changed or wf item changed)
----ListenActivity
-----EventDriven (OnTaskChanged)
-----EventDriven (OnWorkflowItemChanged, use newly created token)

Putting another sequence and initializeworkflow in WHILE loop resulted in OnWorkflowItemChanged being called only first time item changes.

Janis Veinbergs