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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
fireCompleted
(FlowExecution execution) Fires theonCompleted(FlowExecution)
event.static void
fireCreated
(FlowExecution execution) Fires theonCreated(FlowExecution)
event.static void
fireResumed
(FlowExecution execution) Fires theonResumed(FlowExecution)
event.static void
fireRunning
(FlowExecution execution) Fires theonRunning(FlowExecution)
event.void
onCompleted
(FlowExecution execution) Called when aFlowExecution
has completed.void
onCreated
(FlowExecution execution) Called when aFlowExecution
has been created, but before it starts running.void
onResumed
(FlowExecution execution) Called when aFlowExecution
has resumed.void
onRunning
(FlowExecution execution) Called when aFlowExecution
has started running.
-
Constructor Details
-
FlowExecutionListener
public FlowExecutionListener()
-
-
Method Details
-
onCreated
Called when aFlowExecution
has been created, but before it starts running. TheFlowExecution
will already have been added to theFlowExecutionList
by this point. Methods relating to in-progress execution state such asFlowExecution.getCurrentHeads()
will not work as intended and should not be used.- Parameters:
execution
- TheFlowExecution
that has been created.
-
onRunning
Called when aFlowExecution
has started running. TheFlowExecution
will already have been added to theFlowExecutionList
by this point.- Parameters:
execution
- TheFlowExecution
that has started running.
-
onResumed
Called when aFlowExecution
has resumed.- Parameters:
execution
- TheFlowExecution
that has resumed.
-
onCompleted
Called when aFlowExecution
has completed. TheFlowExecution
will already have been removed from theFlowExecutionList
by 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
- TheFlowExecution
that has completed.
-
fireCreated
Fires theonCreated(FlowExecution)
event. -
fireRunning
Fires theonRunning(FlowExecution)
event. -
fireResumed
Fires theonResumed(FlowExecution)
event. -
fireCompleted
Fires theonCompleted(FlowExecution)
event.
-