Package com.cloudbees.workflow.flownode
Class FlowNodeUtil
java.lang.Object
com.cloudbees.workflow.flownode.FlowNodeUtil
- Author:
- tom.fennelly@gmail.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classThis is used to cover an obscure case where a WorkflowJob is renamed BUT a previous WorkflowJob existed with cached execution data. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidSimple debug utility for dumping a node list to sysout.static RunExtgetCachedRun(org.jenkinsci.plugins.workflow.job.WorkflowRun run) static org.jenkinsci.plugins.workflow.graph.FlowNodegetNodeAfter(org.jenkinsci.plugins.workflow.graph.FlowNode node) Find a node following this one, using an optimized approachstatic List<org.jenkinsci.plugins.workflow.graph.FlowNode>getStageNodes(org.jenkinsci.plugins.workflow.flow.FlowExecution execution) List the stage nodes for a FlowExecution -- needed for back-compat.static List<org.jenkinsci.plugins.workflow.graph.FlowNode>getStageNodes(org.jenkinsci.plugins.workflow.graph.FlowNode stageNode) Needed for back-compat, returns nodes inside a stage Note: far more efficient than existing implementation because it uses the cache of run info.static StatusExtgetStatus(org.jenkinsci.plugins.workflow.graph.FlowNode node) static org.jenkinsci.plugins.workflow.job.WorkflowRungetWorkflowRunForExecution(org.jenkinsci.plugins.workflow.flow.FlowExecution exec) static booleanisNotPartOfRunningBuild(org.jenkinsci.plugins.workflow.flow.FlowExecution execution) static booleanisPauseNode(org.jenkinsci.plugins.workflow.graph.FlowNode flowNode) Is the supplied node causing the workflow to pause at that point.
-
Method Details
-
getCachedRun
@CheckForNull public static RunExt getCachedRun(@NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) -
cacheRun
-
isNotPartOfRunningBuild
public static boolean isNotPartOfRunningBuild(org.jenkinsci.plugins.workflow.flow.FlowExecution execution) -
getNodeAfter
@CheckForNull public static org.jenkinsci.plugins.workflow.graph.FlowNode getNodeAfter(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node) Find a node following this one, using an optimized approach -
isPauseNode
public static boolean isPauseNode(org.jenkinsci.plugins.workflow.graph.FlowNode flowNode) Is the supplied node causing the workflow to pause at that point.- Parameters:
flowNode- The node.- Returns:
- True if the node is causing the workflow to pause, otherwise false.
-
getStatus
-
getWorkflowRunForExecution
@CheckForNull public static org.jenkinsci.plugins.workflow.job.WorkflowRun getWorkflowRunForExecution(@CheckForNull org.jenkinsci.plugins.workflow.flow.FlowExecution exec) -
getStageNodes
@NonNull public static List<org.jenkinsci.plugins.workflow.graph.FlowNode> getStageNodes(@CheckForNull org.jenkinsci.plugins.workflow.flow.FlowExecution execution) throws RuntimeException List the stage nodes for a FlowExecution -- needed for back-compat. Note: far more efficient than existing implementation because it uses the cache of run info.- Throws:
RuntimeException
-
getStageNodes
@NonNull public static List<org.jenkinsci.plugins.workflow.graph.FlowNode> getStageNodes(@CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode stageNode) Needed for back-compat, returns nodes inside a stage Note: far more efficient than existing implementation because it uses the cache of run info. -
dumpNodes
Simple debug utility for dumping a node list to sysout.- Parameters:
nodeList- The list to dump.
-