public interface RepositoryService
Modifier and Type | Method and 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 to
activateProcessDefinitionByKey(String, boolean, Date) , but only applicable for the given tenant identifier. |
void |
activateProcessDefinitionByKey(String processDefinitionKey,
String tenantId)
Similar to
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 model
|
void |
addModelEditorSourceExtra(String modelId,
byte[] bytes)
Saves the model editor source extra for a model
|
void |
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 information
changeDeploymentTenantId(String, String) |
void |
changeDeploymentTenantId(String deploymentId,
String newTenantId,
MergeMode mergeMode)
EXPERIMENTAL FEATURE!
See more usage information
changeDeploymentTenantId(String, String) |
DeploymentBuilder |
createDeployment()
Starts creating a new deployment
|
DeploymentQuery |
createDeploymentQuery()
Query deployment.
|
ModelQuery |
createModelQuery()
Query models.
|
NativeDeploymentQuery |
createNativeDeploymentQuery()
Returns a new
NativeQuery for deployment. |
NativeModelQuery |
createNativeModelQuery()
Returns a new
NativeQuery for process definitions. |
NativeProcessDefinitionQuery |
createNativeProcessDefinitionQuery()
Returns a new
NativeQuery 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 |
deleteModel(String modelId) |
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 the
BpmnModel corresponding with the process definition with the provided process definition id. |
List<DmnDecision> |
getDecisionsForProcessDefinition(String processDefinitionId)
Retrieves the
DmnDecision s associated with the given process definition. |
List<DmnDecision> |
getDecisionTablesForProcessDefinition(String processDefinitionId)
Deprecated.
replaced by getDecisionsForProcessDefinition(String processDefinitionId)
|
List<String> |
getDeploymentResourceNames(String deploymentId)
Retrieves a list of deployment resources for the given deployment, ordered alphabetically.
|
List<FormDefinition> |
getFormDefinitionsForProcessDefinition(String processDefinitionId)
Retrieves the
FormDefinition s associated with the given process definition. |
List<org.flowable.identitylink.api.IdentityLink> |
getIdentityLinksForProcessDefinition(String processDefinitionId)
Retrieves the
IdentityLink s associated with the given process definition. |
Model |
getModel(String modelId)
Returns the
Model |
byte[] |
getModelEditorSource(String modelId)
Returns the model editor source as a byte array
|
byte[] |
getModelEditorSourceExtra(String modelId)
Returns the model editor source extra as a byte array
|
ProcessDefinition |
getProcessDefinition(String processDefinitionId)
Returns the
ProcessDefinition 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 by
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 to
suspendProcessDefinitionByKey(String, boolean, Date) , but only applicable for the given tenant identifier. |
void |
suspendProcessDefinitionByKey(String processDefinitionKey,
String tenantId)
Similar to
suspendProcessDefinitionByKey(String) , but only applicable for the given tenant identifier. |
List<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.
|
DeploymentBuilder createDeployment()
void deleteDeployment(String deploymentId)
deploymentId
- id of the deployment, cannot be null.RuntimeException
- if there are still runtime or history process instances or jobs.void deleteDeployment(String deploymentId, boolean cascade)
deploymentId
- id of the deployment, cannot be null.void setDeploymentCategory(String deploymentId, String category)
DeploymentQuery.deploymentCategory(String)
.FlowableObjectNotFoundException
- if no deployment with the provided id can be found.void setDeploymentKey(String deploymentId, String key)
DeploymentQuery.deploymentKey(String)
.FlowableObjectNotFoundException
- if no deployment with the provided id can be found.List<String> getDeploymentResourceNames(String deploymentId)
deploymentId
- id of the deployment, cannot be null.InputStream getResourceAsStream(String deploymentId, String resourceName)
deploymentId
- id of the deployment, cannot be null.resourceName
- name of the resource, cannot be null.FlowableObjectNotFoundException
- when the resource doesn't exist in the given deployment or when no deployment exists for the given deploymentId.void changeDeploymentTenantId(String deploymentId, String newTenantId)
deploymentId
- The id of the deployment of which the tenant identifier will be changed.newTenantId
- The new tenant identifier.void changeDeploymentTenantId(String deploymentId, String newTenantId, MergeMode mergeMode)
changeDeploymentTenantId(String, String)
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 keyvoid changeDeploymentTenantId(String deploymentId, String newTenantId, DeploymentMergeStrategy deploymentMergeStrategy)
changeDeploymentTenantId(String, String)
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 keyvoid changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId)
deploymentId
- The id of the deployment of which the parent deployment identifier will be changed.newParentDeploymentId
- The new parent deployment identifier.ProcessDefinitionQuery createProcessDefinitionQuery()
NativeProcessDefinitionQuery createNativeProcessDefinitionQuery()
NativeQuery
for process definitions.DeploymentQuery createDeploymentQuery()
NativeDeploymentQuery createNativeDeploymentQuery()
NativeQuery
for deployment.void suspendProcessDefinitionById(String processDefinitionId)
FlowableObjectNotFoundException
- if no such processDefinition can be foundFlowableException
- if the process definition is already in state suspended.void suspendProcessDefinitionById(String processDefinitionId, boolean suspendProcessInstances, Date suspensionDate)
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!FlowableObjectNotFoundException
- if no such processDefinition can be found.FlowableException
- if the process definition is already in state suspended.void suspendProcessDefinitionByKey(String processDefinitionKey)
FlowableObjectNotFoundException
- if no such processDefinition can be foundFlowableException
- if the process definition is already in state suspended.void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate)
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!FlowableObjectNotFoundException
- if no such processDefinition can be foundFlowableException
- if the process definition is already in state suspended.void suspendProcessDefinitionByKey(String processDefinitionKey, String tenantId)
suspendProcessDefinitionByKey(String)
, but only applicable for the given tenant identifier.void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate, String tenantId)
suspendProcessDefinitionByKey(String, boolean, Date)
, but only applicable for the given tenant identifier.void activateProcessDefinitionById(String processDefinitionId)
FlowableObjectNotFoundException
- if no such processDefinition can be found or if the process definition is already in state active.void activateProcessDefinitionById(String processDefinitionId, boolean activateProcessInstances, Date activationDate)
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!FlowableObjectNotFoundException
- if no such processDefinition can be found.FlowableException
- if the process definition is already in state active.void activateProcessDefinitionByKey(String processDefinitionKey)
FlowableObjectNotFoundException
- if no such processDefinition can be found.FlowableException
- if the process definition is already in state active.void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate)
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!FlowableObjectNotFoundException
- if no such processDefinition can be found.FlowableException
- if the process definition is already in state active.void activateProcessDefinitionByKey(String processDefinitionKey, String tenantId)
activateProcessDefinitionByKey(String)
, but only applicable for the given tenant identifier.void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate, String tenantId)
activateProcessDefinitionByKey(String, boolean, Date)
, but only applicable for the given tenant identifier.void setProcessDefinitionCategory(String processDefinitionId, String category)
ProcessDefinitionQuery.processDefinitionCategory(String)
.FlowableObjectNotFoundException
- if no process definition with the provided id can be found.InputStream getProcessModel(String processDefinitionId)
processDefinitionId
- id of a ProcessDefinition
, cannot be null.FlowableObjectNotFoundException
- when the process model doesn't exist.InputStream getProcessDiagram(String processDefinitionId)
processDefinitionId
- id of a ProcessDefinition
, cannot be null.ProcessDefinition
is null.FlowableObjectNotFoundException
- when the process diagram doesn't exist.ProcessDefinition getProcessDefinition(String processDefinitionId)
ProcessDefinition
including all BPMN information like additional Properties (e.g. documentation).Boolean isFlowable5ProcessDefinition(String processDefinitionId)
boolean isProcessDefinitionSuspended(String processDefinitionId)
org.flowable.bpmn.model.BpmnModel getBpmnModel(String processDefinitionId)
BpmnModel
corresponding with the process definition with the provided process definition id. The BpmnModel
is a pojo versions of the BPMN 2.0 xml and can be used to
introspect the process definition using regular Java.DiagramLayout getProcessDiagramLayout(String processDefinitionId)
getProcessDiagram(String)
.
This method requires a process model and a diagram image to be deployed.processDefinitionId
- id of a ProcessDefinition
, cannot be null.FlowableObjectNotFoundException
- when the process model or diagram doesn't exist.Object getAppResourceObject(String deploymentId)
AppModel getAppResourceModel(String deploymentId)
Model newModel()
saveModel(Model)
.void saveModel(Model model)
model
- model to save, cannot be null.void deleteModel(String modelId)
modelId
- id of model to delete, cannot be null. When an id is passed for a non-existent model, this operation is ignored.void addModelEditorSource(String modelId, byte[] bytes)
modelId
- id of model to delete, cannot be null. When an id is passed for a non-existent model, this operation is ignored.void addModelEditorSourceExtra(String modelId, byte[] bytes)
modelId
- id of model to delete, cannot be null. When an id is passed for an unexisting model, this operation is ignored.ModelQuery createModelQuery()
NativeModelQuery createNativeModelQuery()
NativeQuery
for process definitions.byte[] getModelEditorSource(String modelId)
modelId
- id of modelbyte[] getModelEditorSourceExtra(String modelId)
modelId
- id of modelvoid addCandidateStarterUser(String processDefinitionId, String userId)
processDefinitionId
- id of the process definition, cannot be null.userId
- id of the user involve, cannot be null.FlowableObjectNotFoundException
- when the process definition or user doesn't exist.void addCandidateStarterGroup(String processDefinitionId, String groupId)
processDefinitionId
- id of the process definition, cannot be null.groupId
- id of the group involve, cannot be null.FlowableObjectNotFoundException
- when the process definition or group doesn't exist.void deleteCandidateStarterUser(String processDefinitionId, String userId)
processDefinitionId
- id of the process definition, cannot be null.userId
- id of the user involve, cannot be null.FlowableObjectNotFoundException
- when the process definition or user doesn't exist.void deleteCandidateStarterGroup(String processDefinitionId, String groupId)
processDefinitionId
- id of the process definition, cannot be null.groupId
- id of the group involve, cannot be null.FlowableObjectNotFoundException
- when the process definition or group doesn't exist.List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForProcessDefinition(String processDefinitionId)
IdentityLink
s associated with the given process definition. Such an IdentityLink
informs how a certain identity (eg. group or user) is authorized for a certain
process definitionList<ValidationError> validateProcess(org.flowable.bpmn.model.BpmnModel bpmnModel)
BpmnModel
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);List<DmnDecision> getDecisionsForProcessDefinition(String processDefinitionId)
DmnDecision
s associated with the given process definition.processDefinitionId
- id of the process definition, cannot be null.@Deprecated List<DmnDecision> getDecisionTablesForProcessDefinition(String processDefinitionId)
DmnDecision
s associated with the given process definition.processDefinitionId
- id of the process definition, cannot be null.List<FormDefinition> getFormDefinitionsForProcessDefinition(String processDefinitionId)
FormDefinition
s associated with the given process definition.processDefinitionId
- id of the process definition, cannot be null.Copyright © 2021 Flowable. All rights reserved.