cancel
Showing results for 
Search instead for 
Did you mean: 

How to cancel a work (Schecduled or running )

atul_
Champ on-the-rise
Champ on-the-rise

I have requirement where i need to cancel the my custom Work (sub class of AbstractWork) in The WorkManager i don't find any method for this specific requirement .

What i need to to to implement this feature ? any suggestion will be help full.

My Use case :

We are using two workers in our application as described below

  1. Import a large amount of data in the nuxeo data base (as per our business rules ) .
  2. Export the data in zip format from the database (as per our business rules )

In above both the cases the user see the progress of the work done on the GUI (custom) . Currently There is no way to stop the work .

So now we are adding a cancel button for each work if you want to cancle the import or export before it is completed you can cancel .

I hope i am clear .

Thanks Atul

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

There is no provision for canceling Work instances today through the WorkManager. What you could do is set a flag somewhere, and when your Work starts executing just check the flag and do nothing if it's present.

Also please could you describe your use case? (Edit the original question.) Understanding the use case would help us decide if this an API that we should add, if it's possible.

hello Florent ,

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.