Package org.flowable.engine.impl
Class RepositoryServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl>
-
- org.flowable.engine.impl.RepositoryServiceImpl
-
- All Implemented Interfaces:
RepositoryService
public class RepositoryServiceImpl extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl> implements RepositoryService
- Author:
- Tom Baeyens, Falko Menge, Joram Barrez
-
-
Constructor Summary
Constructors Constructor Description RepositoryServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateProcessDefinitionById(String processDefinitionId)
Activates the process definition with the given id.void
activateProcessDefinitionById(String processDefinitionId, boolean activateProcessInstances, Date activationDate)
Activates the process definition with the given id.void
activateProcessDefinitionByKey(String processDefinitionKey)
Activates the process definition with the given key (=id in the bpmn20.xml file).void
activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate)
Activates the process definition with the given key (=id in the bpmn20.xml file).void
activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate, String tenantId)
Similar toRepositoryService.activateProcessDefinitionByKey(String, boolean, Date)
, but only applicable for the given tenant identifier.void
activateProcessDefinitionByKey(String processDefinitionKey, String tenantId)
Similar toRepositoryService.activateProcessDefinitionByKey(String)
, but only applicable for the given tenant identifier.void
addCandidateStarterGroup(String processDefinitionId, String groupId)
Authorizes a candidate group for a process definition.void
addCandidateStarterUser(String processDefinitionId, String userId)
Authorizes a candidate user for a process definition.void
addModelEditorSource(String modelId, byte[] bytes)
Saves the model editor source for a modelvoid
addModelEditorSourceExtra(String modelId, byte[] bytes)
Saves the model editor source extra for a modelvoid
changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId)
Changes the parent deployment id of a deployment.void
changeDeploymentTenantId(String deploymentId, String newTenantId)
EXPERIMENTAL FEATURE! Changes the tenant identifier of a deployment to match the given tenant identifier.void
changeDeploymentTenantId(String deploymentId, String newTenantId, DeploymentMergeStrategy deploymentMergeStrategy)
EXPERIMENTAL FEATURE! See more usage informationRepositoryService.changeDeploymentTenantId(String, String)
void
changeDeploymentTenantId(String deploymentId, String newTenantId, MergeMode mergeMode)
EXPERIMENTAL FEATURE! See more usage informationRepositoryService.changeDeploymentTenantId(String, String)
DeploymentBuilder
createDeployment()
Starts creating a new deploymentDeploymentQuery
createDeploymentQuery()
Query deployment.ModelQuery
createModelQuery()
Query models.NativeDeploymentQuery
createNativeDeploymentQuery()
Returns a newNativeQuery
for deployment.NativeModelQuery
createNativeModelQuery()
Returns a newNativeQuery
for process definitions.NativeProcessDefinitionQuery
createNativeProcessDefinitionQuery()
Returns a newNativeQuery
for process definitions.ProcessDefinitionQuery
createProcessDefinitionQuery()
Query process definitions.void
deleteCandidateStarterGroup(String processDefinitionId, String groupId)
Removes the authorization of a candidate group for a process definition.void
deleteCandidateStarterUser(String processDefinitionId, String userId)
Removes the authorization of a candidate user for a process definition.void
deleteDeployment(String deploymentId)
Deletes the given deployment.void
deleteDeployment(String deploymentId, boolean cascade)
Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.void
deleteDeploymentCascade(String deploymentId)
void
deleteModel(String modelId)
Deployment
deploy(org.flowable.engine.impl.repository.DeploymentBuilderImpl deploymentBuilder)
AppModel
getAppResourceModel(String deploymentId)
Returns the app model object (.app file) for a deployment.Object
getAppResourceObject(String deploymentId)
Returns the app resource object (.app file) for a deployment.org.flowable.bpmn.model.BpmnModel
getBpmnModel(String processDefinitionId)
Returns theBpmnModel
corresponding with the process definition with the provided process definition id.List<org.flowable.dmn.api.DmnDecision>
getDecisionsForProcessDefinition(String processDefinitionId)
Retrieves theDmnDecision
s associated with the given process definition.List<org.flowable.dmn.api.DmnDecision>
getDecisionTablesForProcessDefinition(String processDefinitionId)
Retrieves theDmnDecision
s associated with the given process definition.ProcessDefinition
getDeployedProcessDefinition(String processDefinitionId)
List<String>
getDeploymentResourceNames(String deploymentId)
Retrieves a list of deployment resources for the given deployment, ordered alphabetically.List<org.flowable.form.api.FormDefinition>
getFormDefinitionsForProcessDefinition(String processDefinitionId)
Retrieves theFormDefinition
s associated with the given process definition.List<org.flowable.identitylink.api.IdentityLink>
getIdentityLinksForProcessDefinition(String processDefinitionId)
Retrieves theIdentityLink
s associated with the given process definition.Model
getModel(String modelId)
Returns theModel
byte[]
getModelEditorSource(String modelId)
Returns the model editor source as a byte arraybyte[]
getModelEditorSourceExtra(String modelId)
Returns the model editor source extra as a byte arrayProcessDefinition
getProcessDefinition(String processDefinitionId)
Returns theProcessDefinition
including all BPMN information like additional Properties (e.g.InputStream
getProcessDiagram(String processDefinitionId)
Gives access to a deployed process diagram, e.g., a PNG image, through a stream of bytes.DiagramLayout
getProcessDiagramLayout(String processDefinitionId)
Provides positions and dimensions of elements in a process diagram as provided byRepositoryService.getProcessDiagram(String)
.InputStream
getProcessModel(String processDefinitionId)
Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes.InputStream
getResourceAsStream(String deploymentId, String resourceName)
Gives access to a deployment resource through a stream of bytes.Boolean
isFlowable5ProcessDefinition(String processDefinitionId)
Checks if the process definition should be executed by the V5 engine.boolean
isProcessDefinitionSuspended(String processDefinitionId)
Checks if the process definition is suspended.Model
newModel()
Creates a new model.void
saveModel(Model model)
Saves the model.void
setDeploymentCategory(String deploymentId, String category)
Sets the category of the deployment.void
setDeploymentKey(String deploymentId, String key)
Sets the key of the deployment.void
setProcessDefinitionCategory(String processDefinitionId, String category)
Sets the category of the process definition.void
suspendProcessDefinitionById(String processDefinitionId)
Suspends the process definition with the given id.void
suspendProcessDefinitionById(String processDefinitionId, boolean suspendProcessInstances, Date suspensionDate)
Suspends the process definition with the given id.void
suspendProcessDefinitionByKey(String processDefinitionKey)
Suspends the all process definitions with the given key (= id in the bpmn20.xml file).void
suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate)
Suspends the all process definitions with the given key (= id in the bpmn20.xml file).void
suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate, String tenantId)
Similar toRepositoryService.suspendProcessDefinitionByKey(String, boolean, Date)
, but only applicable for the given tenant identifier.void
suspendProcessDefinitionByKey(String processDefinitionKey, String tenantId)
Similar toRepositoryService.suspendProcessDefinitionByKey(String)
, but only applicable for the given tenant identifier.List<org.flowable.validation.ValidationError>
validateProcess(org.flowable.bpmn.model.BpmnModel bpmnModel)
Validates the given process definition against the rules for executing a process definition on the process engine.-
Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
-
-
-
Method Detail
-
createDeployment
public DeploymentBuilder createDeployment()
Description copied from interface:RepositoryService
Starts creating a new deployment- Specified by:
createDeployment
in interfaceRepositoryService
-
deploy
public Deployment deploy(org.flowable.engine.impl.repository.DeploymentBuilderImpl deploymentBuilder)
-
deleteDeployment
public void deleteDeployment(String deploymentId)
Description copied from interface:RepositoryService
Deletes the given deployment.- Specified by:
deleteDeployment
in interfaceRepositoryService
- Parameters:
deploymentId
- id of the deployment, cannot be null.
-
deleteDeploymentCascade
public void deleteDeploymentCascade(String deploymentId)
-
deleteDeployment
public void deleteDeployment(String deploymentId, boolean cascade)
Description copied from interface:RepositoryService
Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.- Specified by:
deleteDeployment
in interfaceRepositoryService
- Parameters:
deploymentId
- id of the deployment, cannot be null.
-
setDeploymentCategory
public void setDeploymentCategory(String deploymentId, String category)
Description copied from interface:RepositoryService
Sets the category of the deployment. Deployments can be queried by category: seeDeploymentQuery.deploymentCategory(String)
.- Specified by:
setDeploymentCategory
in interfaceRepositoryService
-
setDeploymentKey
public void setDeploymentKey(String deploymentId, String key)
Description copied from interface:RepositoryService
Sets the key of the deployment. Deployments can be queried by key: seeDeploymentQuery.deploymentKey(String)
.- Specified by:
setDeploymentKey
in interfaceRepositoryService
-
changeDeploymentParentDeploymentId
public void changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId)
Description copied from interface:RepositoryService
Changes the parent deployment id of a deployment. This is used to move deployments to a different app deployment parent.- Specified by:
changeDeploymentParentDeploymentId
in interfaceRepositoryService
- Parameters:
deploymentId
- The id of the deployment of which the parent deployment identifier will be changed.newParentDeploymentId
- The new parent deployment identifier.
-
createProcessDefinitionQuery
public ProcessDefinitionQuery createProcessDefinitionQuery()
Description copied from interface:RepositoryService
Query process definitions.- Specified by:
createProcessDefinitionQuery
in interfaceRepositoryService
-
createNativeProcessDefinitionQuery
public NativeProcessDefinitionQuery createNativeProcessDefinitionQuery()
Description copied from interface:RepositoryService
Returns a newNativeQuery
for process definitions.- Specified by:
createNativeProcessDefinitionQuery
in interfaceRepositoryService
-
getDeploymentResourceNames
public List<String> getDeploymentResourceNames(String deploymentId)
Description copied from interface:RepositoryService
Retrieves a list of deployment resources for the given deployment, ordered alphabetically.- Specified by:
getDeploymentResourceNames
in interfaceRepositoryService
- Parameters:
deploymentId
- id of the deployment, cannot be null.
-
getResourceAsStream
public InputStream getResourceAsStream(String deploymentId, String resourceName)
Description copied from interface:RepositoryService
Gives access to a deployment resource through a stream of bytes.- Specified by:
getResourceAsStream
in interfaceRepositoryService
- Parameters:
deploymentId
- id of the deployment, cannot be null.resourceName
- name of the resource, cannot be null.
-
changeDeploymentTenantId
public void changeDeploymentTenantId(String deploymentId, String newTenantId)
Description copied from interface:RepositoryService
EXPERIMENTAL FEATURE! Changes the tenant identifier of a deployment to match the given tenant identifier. This change will cascade to any related entity: - process definitions related to the deployment - process instances related to those process definitions - executions related to those process instances - tasks related to those process instances - jobs related to the process definitions and process instances This method can be used in the case that there was no tenant identifier set on the deployment or those entities before. This method can be used to remove a tenant identifier from the deployment and related entities (simply pass null). Important: no optimistic locking will be done while executing the tenant identifier change! This is an experimental feature, mainly because it WILL NOT work properly in a clustered environment without special care: suppose some process instance is in flight. The process definition is in the process definition cache. When a task or job is created when continuing the process instance, the process definition cache will be consulted to get the process definition and from it the tenant identifier. Since it's cached, it will not be the new tenant identifier. This method does clear the cache for this engineinstance , but it will not be cleared on other nodes in a cluster (unless using a shared process definition cache).- Specified by:
changeDeploymentTenantId
in interfaceRepositoryService
- Parameters:
deploymentId
- The id of the deployment of which the tenant identifier will be changed.newTenantId
- The new tenant identifier.
-
changeDeploymentTenantId
public void changeDeploymentTenantId(String deploymentId, String newTenantId, MergeMode mergeMode)
Description copied from interface:RepositoryService
EXPERIMENTAL FEATURE! See more usage informationRepositoryService.changeDeploymentTenantId(String, String)
- Specified by:
changeDeploymentTenantId
in interfaceRepositoryService
- Parameters:
deploymentId
- The id of the deployment of which the tenant identifier will be changed.newTenantId
- The new tenant identifier.mergeMode
- Mode which is used to merge the deployment into the new tenant, in case the second tenant already has the same deployment key
-
changeDeploymentTenantId
public void changeDeploymentTenantId(String deploymentId, String newTenantId, DeploymentMergeStrategy deploymentMergeStrategy)
Description copied from interface:RepositoryService
EXPERIMENTAL FEATURE! See more usage informationRepositoryService.changeDeploymentTenantId(String, String)
- Specified by:
changeDeploymentTenantId
in interfaceRepositoryService
- Parameters:
deploymentId
- The id of the deployment of which the tenant identifier will be changed.newTenantId
- The new tenant identifier.deploymentMergeStrategy
- Strategy to be used to merge the deployment into the new tenant, in case the second tenant already has this deployment key
-
createDeploymentQuery
public DeploymentQuery createDeploymentQuery()
Description copied from interface:RepositoryService
Query deployment.- Specified by:
createDeploymentQuery
in interfaceRepositoryService
-
createNativeDeploymentQuery
public NativeDeploymentQuery createNativeDeploymentQuery()
Description copied from interface:RepositoryService
Returns a newNativeQuery
for deployment.- Specified by:
createNativeDeploymentQuery
in interfaceRepositoryService
-
getProcessDefinition
public ProcessDefinition getProcessDefinition(String processDefinitionId)
Description copied from interface:RepositoryService
Returns theProcessDefinition
including all BPMN information like additional Properties (e.g. documentation).- Specified by:
getProcessDefinition
in interfaceRepositoryService
-
isFlowable5ProcessDefinition
public Boolean isFlowable5ProcessDefinition(String processDefinitionId)
Description copied from interface:RepositoryService
Checks if the process definition should be executed by the V5 engine.- Specified by:
isFlowable5ProcessDefinition
in interfaceRepositoryService
-
getBpmnModel
public org.flowable.bpmn.model.BpmnModel getBpmnModel(String processDefinitionId)
Description copied from interface:RepositoryService
Returns theBpmnModel
corresponding with the process definition with the provided process definition id. TheBpmnModel
is a pojo versions of the BPMN 2.0 xml and can be used to introspect the process definition using regular Java.- Specified by:
getBpmnModel
in interfaceRepositoryService
-
getDeployedProcessDefinition
public ProcessDefinition getDeployedProcessDefinition(String processDefinitionId)
-
isProcessDefinitionSuspended
public boolean isProcessDefinitionSuspended(String processDefinitionId)
Description copied from interface:RepositoryService
Checks if the process definition is suspended.- Specified by:
isProcessDefinitionSuspended
in interfaceRepositoryService
-
suspendProcessDefinitionById
public void suspendProcessDefinitionById(String processDefinitionId)
Description copied from interface:RepositoryService
Suspends the process definition with the given id. If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition. Note: all the process instances of the process definition will still be active (ie. not suspended)!- Specified by:
suspendProcessDefinitionById
in interfaceRepositoryService
-
suspendProcessDefinitionById
public void suspendProcessDefinitionById(String processDefinitionId, boolean suspendProcessInstances, Date suspensionDate)
Description copied from interface:RepositoryService
Suspends the process definition with the given id. If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition.- Specified by:
suspendProcessDefinitionById
in interfaceRepositoryService
suspendProcessInstances
- If true, all the process instances of the provided process definition will be suspended too.suspensionDate
- The date on which the process definition will be suspended. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!
-
suspendProcessDefinitionByKey
public void suspendProcessDefinitionByKey(String processDefinitionKey)
Description copied from interface:RepositoryService
Suspends the all process definitions with the given key (= id in the bpmn20.xml file). If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition. Note: all the process instances of the process definition will still be active (ie. not suspended)!- Specified by:
suspendProcessDefinitionByKey
in interfaceRepositoryService
-
suspendProcessDefinitionByKey
public void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate)
Description copied from interface:RepositoryService
Suspends the all process definitions with the given key (= id in the bpmn20.xml file). If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition.- Specified by:
suspendProcessDefinitionByKey
in interfaceRepositoryService
suspendProcessInstances
- If true, all the process instances of the provided process definition will be suspended too.suspensionDate
- The date on which the process definition will be suspended. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!
-
suspendProcessDefinitionByKey
public void suspendProcessDefinitionByKey(String processDefinitionKey, String tenantId)
Description copied from interface:RepositoryService
Similar toRepositoryService.suspendProcessDefinitionByKey(String)
, but only applicable for the given tenant identifier.- Specified by:
suspendProcessDefinitionByKey
in interfaceRepositoryService
-
suspendProcessDefinitionByKey
public void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate, String tenantId)
Description copied from interface:RepositoryService
Similar toRepositoryService.suspendProcessDefinitionByKey(String, boolean, Date)
, but only applicable for the given tenant identifier.- Specified by:
suspendProcessDefinitionByKey
in interfaceRepositoryService
-
activateProcessDefinitionById
public void activateProcessDefinitionById(String processDefinitionId)
Description copied from interface:RepositoryService
Activates the process definition with the given id.- Specified by:
activateProcessDefinitionById
in interfaceRepositoryService
-
activateProcessDefinitionById
public void activateProcessDefinitionById(String processDefinitionId, boolean activateProcessInstances, Date activationDate)
Description copied from interface:RepositoryService
Activates the process definition with the given id.- Specified by:
activateProcessDefinitionById
in interfaceRepositoryService
activationDate
- The date on which the process definition will be activated. If null, the process definition is activated immediately. Note: The job executor needs to be active to use this!
-
activateProcessDefinitionByKey
public void activateProcessDefinitionByKey(String processDefinitionKey)
Description copied from interface:RepositoryService
Activates the process definition with the given key (=id in the bpmn20.xml file).- Specified by:
activateProcessDefinitionByKey
in interfaceRepositoryService
-
activateProcessDefinitionByKey
public void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate)
Description copied from interface:RepositoryService
Activates the process definition with the given key (=id in the bpmn20.xml file).- Specified by:
activateProcessDefinitionByKey
in interfaceRepositoryService
activationDate
- The date on which the process definition will be activated. If null, the process definition is activated immediately. Note: The job executor needs to be active to use this!
-
activateProcessDefinitionByKey
public void activateProcessDefinitionByKey(String processDefinitionKey, String tenantId)
Description copied from interface:RepositoryService
Similar toRepositoryService.activateProcessDefinitionByKey(String)
, but only applicable for the given tenant identifier.- Specified by:
activateProcessDefinitionByKey
in interfaceRepositoryService
-
activateProcessDefinitionByKey
public void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate, String tenantId)
Description copied from interface:RepositoryService
Similar toRepositoryService.activateProcessDefinitionByKey(String, boolean, Date)
, but only applicable for the given tenant identifier.- Specified by:
activateProcessDefinitionByKey
in interfaceRepositoryService
-
setProcessDefinitionCategory
public void setProcessDefinitionCategory(String processDefinitionId, String category)
Description copied from interface:RepositoryService
Sets the category of the process definition. Process definitions can be queried by category: seeProcessDefinitionQuery.processDefinitionCategory(String)
.- Specified by:
setProcessDefinitionCategory
in interfaceRepositoryService
-
getProcessModel
public InputStream getProcessModel(String processDefinitionId)
Description copied from interface:RepositoryService
Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes.- Specified by:
getProcessModel
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of aProcessDefinition
, cannot be null.
-
getProcessDiagram
public InputStream getProcessDiagram(String processDefinitionId)
Description copied from interface:RepositoryService
Gives access to a deployed process diagram, e.g., a PNG image, through a stream of bytes.- Specified by:
getProcessDiagram
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of aProcessDefinition
, cannot be null.- Returns:
- null when the diagram resource name of a
ProcessDefinition
is null.
-
getProcessDiagramLayout
public DiagramLayout getProcessDiagramLayout(String processDefinitionId)
Description copied from interface:RepositoryService
Provides positions and dimensions of elements in a process diagram as provided byRepositoryService.getProcessDiagram(String)
. This method requires a process model and a diagram image to be deployed.- Specified by:
getProcessDiagramLayout
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of aProcessDefinition
, cannot be null.- Returns:
- DiagramLayout instance containing diagram info, null when the input stream of a process diagram is null.
-
getAppResourceObject
public Object getAppResourceObject(String deploymentId)
Description copied from interface:RepositoryService
Returns the app resource object (.app file) for a deployment.- Specified by:
getAppResourceObject
in interfaceRepositoryService
-
getAppResourceModel
public AppModel getAppResourceModel(String deploymentId)
Description copied from interface:RepositoryService
Returns the app model object (.app file) for a deployment.- Specified by:
getAppResourceModel
in interfaceRepositoryService
-
newModel
public Model newModel()
Description copied from interface:RepositoryService
Creates a new model. The model is transient and must be saved usingRepositoryService.saveModel(Model)
.- Specified by:
newModel
in interfaceRepositoryService
-
saveModel
public void saveModel(Model model)
Description copied from interface:RepositoryService
Saves the model. If the model already existed, the model is updated otherwise a new model is created.- Specified by:
saveModel
in interfaceRepositoryService
- Parameters:
model
- model to save, cannot be null.
-
deleteModel
public void deleteModel(String modelId)
- Specified by:
deleteModel
in interfaceRepositoryService
- Parameters:
modelId
- id of model to delete, cannot be null. When an id is passed for a non-existent model, this operation is ignored.
-
addModelEditorSource
public void addModelEditorSource(String modelId, byte[] bytes)
Description copied from interface:RepositoryService
Saves the model editor source for a model- Specified by:
addModelEditorSource
in interfaceRepositoryService
- Parameters:
modelId
- id of model to delete, cannot be null. When an id is passed for a non-existent model, this operation is ignored.
-
addModelEditorSourceExtra
public void addModelEditorSourceExtra(String modelId, byte[] bytes)
Description copied from interface:RepositoryService
Saves the model editor source extra for a model- Specified by:
addModelEditorSourceExtra
in interfaceRepositoryService
- Parameters:
modelId
- id of model to delete, cannot be null. When an id is passed for an unexisting model, this operation is ignored.
-
createModelQuery
public ModelQuery createModelQuery()
Description copied from interface:RepositoryService
Query models.- Specified by:
createModelQuery
in interfaceRepositoryService
-
createNativeModelQuery
public NativeModelQuery createNativeModelQuery()
Description copied from interface:RepositoryService
Returns a newNativeQuery
for process definitions.- Specified by:
createNativeModelQuery
in interfaceRepositoryService
-
getModel
public Model getModel(String modelId)
Description copied from interface:RepositoryService
Returns theModel
- Specified by:
getModel
in interfaceRepositoryService
- Parameters:
modelId
- id of model
-
getModelEditorSource
public byte[] getModelEditorSource(String modelId)
Description copied from interface:RepositoryService
Returns the model editor source as a byte array- Specified by:
getModelEditorSource
in interfaceRepositoryService
- Parameters:
modelId
- id of model
-
getModelEditorSourceExtra
public byte[] getModelEditorSourceExtra(String modelId)
Description copied from interface:RepositoryService
Returns the model editor source extra as a byte array- Specified by:
getModelEditorSourceExtra
in interfaceRepositoryService
- Parameters:
modelId
- id of model
-
addCandidateStarterUser
public void addCandidateStarterUser(String processDefinitionId, String userId)
Description copied from interface:RepositoryService
Authorizes a candidate user for a process definition.- Specified by:
addCandidateStarterUser
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of the process definition, cannot be null.userId
- id of the user involve, cannot be null.
-
addCandidateStarterGroup
public void addCandidateStarterGroup(String processDefinitionId, String groupId)
Description copied from interface:RepositoryService
Authorizes a candidate group for a process definition.- Specified by:
addCandidateStarterGroup
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of the process definition, cannot be null.groupId
- id of the group involve, cannot be null.
-
deleteCandidateStarterGroup
public void deleteCandidateStarterGroup(String processDefinitionId, String groupId)
Description copied from interface:RepositoryService
Removes the authorization of a candidate group for a process definition.- Specified by:
deleteCandidateStarterGroup
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of the process definition, cannot be null.groupId
- id of the group involve, cannot be null.
-
deleteCandidateStarterUser
public void deleteCandidateStarterUser(String processDefinitionId, String userId)
Description copied from interface:RepositoryService
Removes the authorization of a candidate user for a process definition.- Specified by:
deleteCandidateStarterUser
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of the process definition, cannot be null.userId
- id of the user involve, cannot be null.
-
getIdentityLinksForProcessDefinition
public List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForProcessDefinition(String processDefinitionId)
Description copied from interface:RepositoryService
Retrieves theIdentityLink
s associated with the given process definition. Such anIdentityLink
informs how a certain identity (eg. group or user) is authorized for a certain process definition- Specified by:
getIdentityLinksForProcessDefinition
in interfaceRepositoryService
-
validateProcess
public List<org.flowable.validation.ValidationError> validateProcess(org.flowable.bpmn.model.BpmnModel bpmnModel)
Description copied from interface:RepositoryService
Validates the given process definition against the rules for executing a process definition on the process engine. To create such aBpmnModel
from a String, following code may be used: XMLInputFactory xif = XMLInputFactory.newInstance(); InputStreamReader in = new InputStreamReader(new ByteArrayInputStream(myProcess.getBytes()), "UTF-8"); // Change to other streams for eg from classpath XMLStreamReader xtr = xif.createXMLStreamReader(in); bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr);- Specified by:
validateProcess
in interfaceRepositoryService
-
getDecisionsForProcessDefinition
public List<org.flowable.dmn.api.DmnDecision> getDecisionsForProcessDefinition(String processDefinitionId)
Description copied from interface:RepositoryService
Retrieves theDmnDecision
s associated with the given process definition.- Specified by:
getDecisionsForProcessDefinition
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of the process definition, cannot be null.
-
getDecisionTablesForProcessDefinition
public List<org.flowable.dmn.api.DmnDecision> getDecisionTablesForProcessDefinition(String processDefinitionId)
Description copied from interface:RepositoryService
Retrieves theDmnDecision
s associated with the given process definition.- Specified by:
getDecisionTablesForProcessDefinition
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of the process definition, cannot be null.
-
getFormDefinitionsForProcessDefinition
public List<org.flowable.form.api.FormDefinition> getFormDefinitionsForProcessDefinition(String processDefinitionId)
Description copied from interface:RepositoryService
Retrieves theFormDefinition
s associated with the given process definition.- Specified by:
getFormDefinitionsForProcessDefinition
in interfaceRepositoryService
- Parameters:
processDefinitionId
- id of the process definition, cannot be null.
-
-