Class DeploymentOperation
java.lang.Object
org.camunda.bpm.container.impl.spi.DeploymentOperation
A DeploymentOperation allows bundling multiple deployment steps into a composite operation that succeeds or fails atomically.
The DeploymentOperation is composed of a list of individual steps (
DeploymentOperationStep
). Each step may or may not install new
services into the container. If one of the steps fails, the operation makes
sure that
- all successfully completed steps are notified by calling their
DeploymentOperationStep.cancelOperationStep(DeploymentOperation)
method. - all services installed in the context of the operation are removed from the container.
- Author:
- Daniel Meyer
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptiona list of attachments allows to pass state from one operation to anotherprotected DeploymentOperationStep
the list of services installed by this operation.protected boolean
protected final String
the name of this composite operationprotected final PlatformServiceContainer
the service containerprotected final List<DeploymentOperationStep>
the list of steps that make up this composite operationprotected final List<DeploymentOperationStep>
a list of steps that completed successfully -
Constructor Summary
ConstructorDescriptionDeploymentOperation
(String name, PlatformServiceContainer container, List<DeploymentOperationStep> steps) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(String name, Object value) void
Add a new atomic step to the composite operation.void
execute()
<S> S
getAttachment
(String name) protected void
void
serviceAdded
(String serviceName)
-
Field Details
-
name
the name of this composite operation -
serviceContainer
the service container -
steps
the list of steps that make up this composite operation -
successfulSteps
a list of steps that completed successfully -
installedServices
the list of services installed by this operation. TherollbackOperation()
must make sure all these services are removed if the operation fails. -
attachments
a list of attachments allows to pass state from one operation to another -
isRollbackOnFailure
protected boolean isRollbackOnFailure -
currentStep
-
-
Constructor Details
-
DeploymentOperation
public DeploymentOperation(String name, PlatformServiceContainer container, List<DeploymentOperationStep> steps)
-
-
Method Details
-
getAttachment
-
addAttachment
-
addStep
Add a new atomic step to the composite operation. If the operation is currently executing a step, the step is added after the current step. -
serviceAdded
-
getServiceContainer
-
execute
public void execute() -
rollbackOperation
protected void rollbackOperation() -
getInstalledServices
-