use of org.jenkinsci.plugins.workflow.actions.BodyInvocationAction in project workflow-cps-plugin by jenkinsci.
the class CpsBodyExecution method addBodyEndFlowNode.
/**
* Inserts the flow node that indicates the beginning of the body invocation.
*
* @see #addBodyStartFlowNode(FlowHead)
*/
@Nonnull
private StepEndNode addBodyEndFlowNode() {
try {
FlowHead head = CpsThread.current().head;
StepEndNode end = new StepEndNode(head.getExecution(), getBodyStartNode(), head.get());
head.getExecution().cacheNode(end);
end.addAction(new BodyInvocationAction());
head.setNewHead(end);
return end;
} catch (IOException e) {
LOGGER.log(WARNING, "Failed to grow the flow graph", e);
throw new Error(e);
}
}
use of org.jenkinsci.plugins.workflow.actions.BodyInvocationAction in project workflow-cps-plugin by jenkinsci.
the class CpsBodyExecution method addBodyStartFlowNode.
/**
* Inserts the flow node that indicates the beginning of the body invocation.
*
* @see #addBodyEndFlowNode()
*/
@Nonnull
private StepStartNode addBodyStartFlowNode(FlowHead head) {
CpsFlowExecution.maybeAutoPersistNode(head.get());
StepStartNode start = new StepStartNode(head.getExecution(), context.getStepDescriptor(), head.get());
head.getExecution().cacheNode(start);
this.startNodeId = start.getId();
start.addAction(new BodyInvocationAction());
return start;
}
Aggregations