Class Step
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Step>
-
- org.jenkinsci.plugins.workflow.steps.Step
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Step>
- Direct Known Subclasses:
AbstractStepImpl
public abstract class Step extends AbstractDescribableImpl<Step> implements ExtensionPoint
One thing that can be done, perhaps asynchronously. AStep
is merely the definition of how this task is configured;StepExecution
represents any state associated with one actual run of it.Extends from
Describable
to support UI-based instantiation. Your step should have aconfig.jelly
allowing a user to configure its properties, and may have ahelp.html
and/orhelp-fieldName.html
, plusdoEtc
methods on theStepDescriptor
for form validation, completion, and so on. It should have aDataBoundConstructor
specifying mandatory properties. It may also useDataBoundSetter
for optional properties. All properties also need public getters (or to be public fields) for data binding to work.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description Step()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StepDescriptor
getDescriptor()
abstract StepExecution
start(StepContext context)
Start execution of something and report the end result back to the given callback.
-
-
-
Method Detail
-
start
public abstract StepExecution start(StepContext context) throws Exception
Start execution of something and report the end result back to the given callback. Arguments are passed when instantiating steps.- Returns:
- true if the execution of this step has synchronously completed before this method returns.
It is the callee's responsibility to set the return value via
StepContext.onSuccess(Object)
orFutureCallback.onFailure(Throwable)
. false if the asynchronous execution has started and thatStepContext
will be notified when the result comes in. (Note that the nature of asynchrony is such that it is possible for theStepContext
to be already notified before this method returns.) - Throws:
Exception
- if any exception is thrown,Step
is assumed to have completed abnormally synchronously (as ifFutureCallback.onFailure(java.lang.Throwable)
is called and the method returned true.)
-
getDescriptor
public StepDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Step>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<Step>
-
-