It's all about the answers!

Ask a question

How can I stop a stax job execution when I cancel a Build Forge Job

Leandro David (721719) | asked Feb 27 '13, 7:37 p.m.
edited Feb 28 '13, 8:40 a.m. by Spencer Murata (2.3k115970)
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 ?

One answer

permanent link
Spencer Murata (2.3k115970) | answered Feb 28 '13, 8:40 a.m.
 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.


Leandro David commented Feb 28 '13, 9:41 a.m.

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.

Spencer Murata commented Feb 28 '13, 10:09 a.m.

You can enter the enhancement here:

Make sure to mark it as an enhancement.


Your answer

Register or to post your answer.