Class FlowExecutionListener
java.lang.Object
org.jenkinsci.plugins.workflow.flow.FlowExecutionListener
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
FlowExecutionList.ResumeStepExecutionListener
Listens for significant status updates for a
FlowExecution, such as started running or completed.- Since:
- 2.14
- Author:
- Andrew Bayer
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidfireCompleted(FlowExecution execution) Fires theonCompleted(FlowExecution)event.static voidfireCreated(FlowExecution execution) Fires theonCreated(FlowExecution)event.static voidfireResumed(FlowExecution execution) Fires theonResumed(FlowExecution)event.static voidfireRunning(FlowExecution execution) Fires theonRunning(FlowExecution)event.voidonCompleted(FlowExecution execution) Called when aFlowExecutionhas completed.voidonCreated(FlowExecution execution) Called when aFlowExecutionhas been created, but before it starts running.voidonResumed(FlowExecution execution) Called when aFlowExecutionhas resumed.voidonRunning(FlowExecution execution) Called when aFlowExecutionhas started running.
-
Constructor Details
-
FlowExecutionListener
public FlowExecutionListener()
-
-
Method Details
-
onCreated
Called when aFlowExecutionhas been created, but before it starts running. TheFlowExecutionwill already have been added to theFlowExecutionListby this point. Methods relating to in-progress execution state such asFlowExecution.getCurrentHeads()will not work as intended and should not be used.- Parameters:
execution- TheFlowExecutionthat has been created.
-
onRunning
Called when aFlowExecutionhas started running. TheFlowExecutionwill already have been added to theFlowExecutionListby this point.- Parameters:
execution- TheFlowExecutionthat has started running.
-
onResumed
Called when aFlowExecutionhas resumed.- Parameters:
execution- TheFlowExecutionthat has resumed.
-
onCompleted
Called when aFlowExecutionhas completed. TheFlowExecutionwill already have been removed from theFlowExecutionListby this point,GraphListener.onNewHead(FlowNode)will have already been called for theFlowEndNode,FlowExecution.getCurrentHeads()will have one element, aFlowEndNode, and if the Pipeline has failed,FlowExecution.getCauseOfFailure()will return non-null.- Parameters:
execution- TheFlowExecutionthat has completed.
-
fireCreated
Fires theonCreated(FlowExecution)event. -
fireRunning
Fires theonRunning(FlowExecution)event. -
fireResumed
Fires theonResumed(FlowExecution)event. -
fireCompleted
Fires theonCompleted(FlowExecution)event.
-