Hi there,
I want to run a series of commands, but if one of them fails, I still want the other ones to be executed. Async execution of the cmd looks like what I would need.
Is there a simple way to plan a command for asynchronous execution without registering at application startup a custom JobHandler for the execution of each one of the commands I want to run asynchronously? I would rather have to create as little new classes as possible for the execution of existing Flowable cmds.
Best,
Tiffany
No, as far as I can see a custom job handler would be the way to do it. What’s the goal: run them in parallel or sequence? Why not using a standard ExecutorService?
Hi Joram,
Thank you for your fast reply. I do not care much whether the commands are executed in parallel or in sequence, since they do not depend on one another. I just need all the non-failing ones to be executed within a pre-defined time window (a few hours) in a non-blocking way for my application, while being able to leverage the job logging and retry mechanisms I already implemented in my project: for example, I would like to know at the of the time-window which proportion of the commands failed, and to be able to easily re-trigger one or all of them at a later time.
It is true that it is quite tempting to want to use Flowable job management for all kind of things.
Would you be able to advise for which kind of situations you think it is better to use Java ExecutorService, Flowable JobHandler with Flowable Commands, Flowable JobHandler with Flowable BatchParts, or even maybe Spring Batch if you think it can compare for this kind of use cases?
Best,
Tiffany