Package org.jbpm.kie.services.impl.utils
Class PreUndeployOperations
- java.lang.Object
-
- org.jbpm.kie.services.impl.utils.PreUndeployOperations
-
public class PreUndeployOperations extends Object
Utility class to provide default functions to use onDeploymentService#undeploy(DeploymentUnit, Function)
-
-
Constructor Summary
Constructors Constructor Description PreUndeployOperations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Function<DeploymentUnit,Boolean>abortUnitActiveProcessInstances(RuntimeDataService runtimeDataService, DeploymentService deploymentService)Returns a function that checks if a givenDeploymentUnithas active process instances instances, aborts them and, if nothing wrong happened, lets the undeployment operation continue.static Function<DeploymentUnit,Boolean>checkActiveProcessInstances(RuntimeDataService runtimeDataService)Returns a function that checks if a givenDeploymentUnithas active process instances and prevents its undeployment.static Function<DeploymentUnit,Boolean>doNothing()Returns a function that bypasses the check and always allows to undeploy.
-
-
-
Method Detail
-
checkActiveProcessInstances
public static Function<DeploymentUnit,Boolean> checkActiveProcessInstances(RuntimeDataService runtimeDataService)
Returns a function that checks if a givenDeploymentUnithas active process instances and prevents its undeployment. That's the default operation when no other is supplied.- Parameters:
runtimeDataService- aRuntimeDataServiceto query the process instances
-
abortUnitActiveProcessInstances
public static Function<DeploymentUnit,Boolean> abortUnitActiveProcessInstances(RuntimeDataService runtimeDataService, DeploymentService deploymentService)
Returns a function that checks if a givenDeploymentUnithas active process instances instances, aborts them and, if nothing wrong happened, lets the undeployment operation continue.- Parameters:
runtimeDataService- aRuntimeDataServiceto query the process instancesdeploymentService- aDeploymentServiceto provide access to the deployed unit.
-
doNothing
public static Function<DeploymentUnit,Boolean> doNothing()
Returns a function that bypasses the check and always allows to undeploy.
-
-