Jump to content

How to cancel tasks assigned to a user


StephC
 Share

Recommended Posts

Hello, 

We have had someone leave and would like to remove their license but cannot do so as they have a number of tasks assigned to them still. 

We tried using the task cancellation utility but it isn't going very well.

 

C:\goHornbillTaskCanceller>taskCanceller.exe -instance=**** -api=******************************** -listfile=C:\goHornbillTaskCanceller\tasks.txt
[TSK20200214000091] METHOD FAIL taskCancel: The task specified is of type BPM Approval, which can not be cancelled
0  Tasks Cancelled Successfully
1  Task Cancellation Failures

C:\goHornbillTaskCanceller>taskCanceller.exe -instance=**** -api=********************************* -listfile=C:\goHornbillTaskCanceller\tasks.txt -delete=True
[TSK20200214000091] METHOD FAIL taskDelete: This task can not be deleted because a running business process workflow has a dependency on the outcome of this task. Use taskComplete instead
0  Tasks Cancelled Successfully
1  Task Cancellation Failures

Could someone advise please? Is taskComplete a different utility or a different parameter we could use on the cancel utility? Is there another way we could do this? We just want to get rid of the tasks so we can remove the user/ license. There are about 600 tasks assigned to the user currently.

Link to comment
Share on other sites

6 minutes ago, StephC said:

This task can not be deleted because a running business process workflow has a dependency on the outcome of this task.

This is the important error.

You will need to identify which Workflow/Request this Task (ID: TSK20200214000091) is attached to, reassign the Task if required, and complete it so the Workflow can progress.

Details on the requirements for re-assigning/completing Tasks are available on this wiki page.

Link to comment
Share on other sites

Thanks for the reply Steve! Is there a way we can just get rid of all these tasks? I did just test it on the one task but the ticket was long since closed, so I'm fairly confident the other tasks will be the same. 

Or alternatively, is there a way to mass re-assign tasks? 

I understand we may have set these up incorrectly to begin with, so tasks are assigned to individuals rather than groups but as it stands we are stuck with these accounts that have 600-700 tasks assigned to them.

  • Sad 1
Link to comment
Share on other sites

2 hours ago, Steve Giller said:

This is the important error.

You will need to identify which Workflow/Request this Task (ID: TSK20200214000091) is attached to, reassign the Task if required, and complete it so the Workflow can progress.

Details on the requirements for re-assigning/completing Tasks are available on this wiki page.

Hi Steve, for context the tasks are quite old - over two years in some instances - and can no longer be completed manually. 

Even if we could complete them manually, between two leavers we're pushing one thousand tasks. 

 

Link to comment
Share on other sites

@Alistair Young @StephC

Requests themselves have no play here... They might very well not exist. The important entity is the workflow. When those requests were created they have also spawned associated workflows. It is possible the that request was progressed (to closure) independent of their associated workflow in which case the workflow itself might still be active. This is indicated by the task still being active. That is one thing. Another thing is what tasks do you have in tasks.txt? Have you perhaps included tasks that were completed? If so these tasks should stay. So have a look or confirm what tasks you have in tasks.txt and then have a look on what workflows you still have active. The way to action on the later is to actually cancel the workflow (assuming the correspondent request has be completed/close since).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...