How to schedule an automation-chain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2017 05:24 AM
Hi 🙂 I want to schedule an automation chain . I have created the operation which deletes the trash .Then i used the following extension to set up a scheduler to be executed every 1 minute but nothing happens.This is the extension:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2017 05:36 AM
You need to setup an event handler that will catch the event you created (DeleteTrash) and call your automation chain (DeleteTrashOperation)
<extension target="org.nuxeo.ecm.core.operation.OperationServiceComponent" point="event-handlers">
<handler chainId="DeleteTrashOperation" postCommit="true">
<event>DeleteTrash</event>
</handler>
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 05:32 AM
I dont understand this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 05:41 AM
Now it recognises the Scheduler..It turned out that the problem was Cron Expression..But now i have another problem.It throws an exception saying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 10:33 AM
Can you show us your custom operation DeleteTrashOperation ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 10:36 AM
@Operation(id = DeleteTrash.ID, category = Constants.CAT_DOCUMENT, label = "DeleteTrash", description = "")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 10:39 AM
I test it with a user Action so the code is fine..i dont understand why it doesnt work with the scheduler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2019 04:19 AM
Not sure if OP's problem was solved. If not, the reason why it wasn't working was because CoreSession is not injected when using Schedulers as mentioned in here
