How to implement rejection in a parallel approval process?

I am developing a SharePoint workflow with Replicator activity to replicate user activity for each approver. User activity implements the approval branch for a specific user. It has a classic form with the functions CreateTask, While, OnTaskChanged and CompleteTask.

I set UntilCondition on the replicator to cancel execution after one of the approvers decides to reject the statement and then completes the workflow. The problem arises with other unfinished tasks that โ€œfreezeโ€ in their current state. The user does not see this state when opening a task.

I placed UpdateAllTasks after the placeholder replaced the task status with Canceled. But since there are no event actions between CompleteTask (for the rejected task) and UpdateAllTasks, the UpdateAllTask โ€‹โ€‹action is also canceled for the rejected task.

The question is, what can I do to clear the pending changes made by CompleteTask to UpdateAllTasks?

Or maybe there is another way to implement such a workflow. I was thinking about how to implement a cancel handler for user activity using UpdateTask. But I donโ€™t know how to implement it and tell the cancellation handler that it is executed in case of a rejection.

+3
source share
4

, , , . .

  • , SequenceActivity ReviewActivity
  • ReviewActivity CreateTask โ†’ While โ†’ OnTaskChanged โ†’ CompleteTask
  • Replicator, ReviewActivity (, , ).
  • UntilCondition, , ( ChildCompleted)
  • Replicator UpdateAllTasks,

- , , UpdateAllTasks , "CompleteTask" . , (ReviewActivity), PersistOnClose.

[Designer(typeof(ActivityDesigner), typeof(IDesigner))]
[PersistOnClose]
public partial class ReviewActivity : SequenceActivity

, ReviewActivity . ReviewActivity - "CompleteTask", . UpdateAllTasks .

, -.

+3

updatealltasks?

0

: โ†’ OnTaskChanged โ†’ If/Else Activity ( true, acceptver "" ) โ†’ ( If) UpdateAllTasks Activity ( Activity) โ†’ (Outside If) CompleteTask.

, WF . , , , " " "".

0

. :

  • variableCancelled to true ontaskchanged, ( %Completed)
  • The updateAllTasks method is launched to cancel each task after each ontaskchanged event (in the sequence inside the replicator), only if the taskCancelled variable is true
  • until the condition for the replicator is true if the taskCancelled variable is true
0
source

All Articles