Class FlowExecutionListener
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.flow.FlowExecutionListener
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
FlowExecutionList.ResumeStepExecutionListener
public abstract class FlowExecutionListener extends Object implements ExtensionPoint
Listens for significant status updates for aFlowExecution
, 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 Constructor Description FlowExecutionListener()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
onCreated
public void onCreated(@NonNull FlowExecution execution)
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
public void onRunning(@NonNull FlowExecution execution)
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
public void onResumed(@NonNull FlowExecution execution)
Called when aFlowExecution
has resumed.- Parameters:
execution
- TheFlowExecution
that has resumed.
-
onCompleted
public void onCompleted(@NonNull FlowExecution execution)
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
public static void fireCreated(@NonNull FlowExecution execution)
Fires theonCreated(FlowExecution)
event.
-
fireRunning
public static void fireRunning(@NonNull FlowExecution execution)
Fires theonRunning(FlowExecution)
event.
-
fireResumed
public static void fireResumed(@NonNull FlowExecution execution)
Fires theonResumed(FlowExecution)
event.
-
fireCompleted
public static void fireCompleted(@NonNull FlowExecution execution)
Fires theonCompleted(FlowExecution)
event.
-
-