Package org.jbpm.services.api
Interface DeploymentService
-
- All Known Subinterfaces:
DeploymentServiceEJBLocal
- All Known Implementing Classes:
AbstractDeploymentService
,DeploymentServiceCDIImpl
,DeploymentServiceEJBImpl
,KModuleDeploymentService
public interface DeploymentService
DeploysDeploymentUnit
s into the runtime engine by buildingRuntimeManager
instance for the deployment unit. Upon successful deploymentDeployedUnit
instance is created and cached for further usage.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activate(String deploymentId)
Activates given deployment by making sure it will be available for execution.void
deactivate(String deploymentId)
Deactivates given deployment by making it only available for already running instances.void
deploy(DeploymentUnit unit)
Performs deployment operation of givenunit
.DeployedUnit
getDeployedUnit(String deploymentUnitId)
ReturnsDeployedUnit
instance for given deployment id if existsCollection<DeployedUnit>
getDeployedUnits()
Returns all (currently) deployed units.org.kie.api.runtime.manager.RuntimeManager
getRuntimeManager(String deploymentUnitId)
ReturnsRuntimeManager
instance dedicated to deployment unit identified by given idboolean
isDeployed(String deploymentUnitId)
Performs a check if given deployment is already activevoid
undeploy(DeploymentUnit unit)
Performs undeployment operation of givenunit
.void
undeploy(DeploymentUnit unit, Function<DeploymentUnit,Boolean> beforeUndeploy)
Performs undeployment operation of givenunit
aborting existing process instances if needed.
-
-
-
Method Detail
-
deploy
void deploy(DeploymentUnit unit)
Performs deployment operation of givenunit
.- Parameters:
unit
- deployment unit to be deployed to runtime- Throws:
RuntimeException
- in case of problems encountered while deploying unit
-
undeploy
void undeploy(DeploymentUnit unit)
Performs undeployment operation of givenunit
.- Parameters:
unit
- deployment unit to be undeployed from runtime- Throws:
RuntimeException
- in case of problems encountered while undeploying unit
-
undeploy
void undeploy(DeploymentUnit unit, Function<DeploymentUnit,Boolean> beforeUndeploy)
Performs undeployment operation of givenunit
aborting existing process instances if needed.- Parameters:
unit
- deployment unit to be undeployed from runtimebeforeUndeploy
- a function to run custom actions before undeploying a givenDeploymentUnit
. It should return if the unit can be deployed or not determining if the deployment can continue.- Throws:
RuntimeException
- in case of problems encountered while undeploying unit
-
getRuntimeManager
org.kie.api.runtime.manager.RuntimeManager getRuntimeManager(String deploymentUnitId)
ReturnsRuntimeManager
instance dedicated to deployment unit identified by given id- Parameters:
deploymentUnitId
- identifier of deployment unit- Returns:
RuntimeManager
if exists for given deployment id otherwise null
-
getDeployedUnit
DeployedUnit getDeployedUnit(String deploymentUnitId)
ReturnsDeployedUnit
instance for given deployment id if exists- Parameters:
deploymentUnitId
- identifier of deployment unit- Returns:
DeployedUnit
instance if exists for given deployment id otherwise null
-
getDeployedUnits
Collection<DeployedUnit> getDeployedUnits()
Returns all (currently) deployed units.- Returns:
- collections of all existing deployed units
-
activate
void activate(String deploymentId)
Activates given deployment by making sure it will be available for execution.- Parameters:
deploymentId
-
-
deactivate
void deactivate(String deploymentId)
Deactivates given deployment by making it only available for already running instances.- Parameters:
deploymentId
-
-
isDeployed
boolean isDeployed(String deploymentUnitId)
Performs a check if given deployment is already active- Parameters:
deploymentUnitId
-- Returns:
- true if deployment is active, false if not
-
-