How can I stop a stax job execution when I cancel a Build Forge Job
I have a build forge project that will trigger the execution of a Stax job that takes a long time to run.
If I cancel the build forge project run, the stax job execution will not stop. I'm looking for ideas to solve that.
Is there a way to trigger something else when a BF execution is cancelled ?
If I cancel the build forge project run, the stax job execution will not stop. I'm looking for ideas to solve that.
Is there a way to trigger something else when a BF execution is cancelled ?
One answer
There is no 'hook' for a user cancel event. Also there is no native way to interrupt the Agent once it has started its execution. The agent is not looking for more input once it has the command. It will run that command to completion and if the project is already canceled then the data from the step is just lost. The only thing I can really think of would be a class modification to have a "on purge entry" project that would go to the agent, check for the process that is known to be long running, and running a kill command on that process. I think that would force the agent process to return and clean itself up. However this would require that the cancel job be purged afterward as well.
~Spencer
Comments
Hi Spencer, thanks for your reply. Do you know how I could make it a feature request for the build forge development team ? I have the impression that this "cancel hook" would be a very usefull feature to be implemented in future releases.
1 vote
You can enter the enhancement here:
Make sure to mark it as an enhancement.
~SpencerĀ
1 vote