Class WorkflowRepositoryOperations
- java.lang.Object
-
- cronapi.workflow.WorkflowRepositoryOperations
-
public class WorkflowRepositoryOperations extends Object
-
-
Constructor Summary
Constructors Constructor Description WorkflowRepositoryOperations()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidactivateProcessDefinitionById(String processDefinitionId)Activates the process definition with the given id.static voidactivateProcessDefinitionById(String processDefinitionId, boolean activateProcessInstances, Date activationDate)Activates the process definition with the given id.static voidactivateProcessDefinitionByKey(String processDefinitionKey)Activates the process definition with the given key (=id in the bpmn20.xml file).static voidactivateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate)Activates the process definition with the given key (=id in the bpmn20.xml file).static voidaddCandidateStarterGroup(String processDefinitionId, String groupId)Deprecated.Use authorization mechanism instead.static voidaddCandidateStarterUser(String processDefinitionId, String userId)Deprecated.Use authorization mechanism instead.static org.camunda.bpm.engine.repository.CaseDefinitionQuerycreateCaseDefinitionQuery()Query case definitions.static org.camunda.bpm.engine.repository.DecisionDefinitionQuerycreateDecisionDefinitionQuery()Query decision definitions.static org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuerycreateDecisionRequirementsDefinitionQuery()Query decision requirements definition.static org.camunda.bpm.engine.repository.DeploymentBuildercreateDeployment()Starts creating a new deploymentstatic org.camunda.bpm.engine.repository.ProcessApplicationDeploymentBuildercreateDeployment(org.camunda.bpm.application.ProcessApplicationReference processApplication)Starts creating a newProcessApplicationDeployment.static org.camunda.bpm.engine.repository.DeploymentQuerycreateDeploymentQuery()Query process definitions.static org.camunda.bpm.engine.repository.ProcessDefinitionQuerycreateProcessDefinitionQuery()Query process definitions.static voiddeleteCandidateStarterGroup(String processDefinitionId, String groupId)Deprecated.Use authorization mechanism instead.static voiddeleteCandidateStarterUser(String processDefinitionId, String userId)Deprecated.Use authorization mechanism instead.static voiddeleteDeployment(String deploymentId)Deletes the given deployment.static voiddeleteDeployment(String deploymentId, boolean cascade)Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.static voiddeleteDeployment(String deploymentId, boolean cascade, boolean skipCustomListeners)Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.static voiddeleteDeployment(String deploymentId, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings)Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.static voiddeleteDeploymentCascade(String deploymentId)Deprecated.static voiddeleteProcessDefinition(String processDefinitionId)Deletes the process definition which belongs to the given process definition id.static voiddeleteProcessDefinition(String processDefinitionId, boolean cascade)Deletes the process definition which belongs to the given process definition id.static voiddeleteProcessDefinition(String processDefinitionId, boolean cascade, boolean skipCustomListeners)Deletes the process definition which belongs to the given process definition id.static voiddeleteProcessDefinition(String processDefinitionId, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings)Deletes the process definition which belongs to the given process definition id.static org.camunda.bpm.engine.repository.DeleteProcessDefinitionsSelectBuilderdeleteProcessDefinitions()Fluent builder to delete process definitions.static org.camunda.bpm.model.bpmn.BpmnModelInstancegetBpmnModelInstance(String processDefinitionId)Returns theBpmnModelInstancefor the given processDefinitionId.static org.camunda.bpm.engine.repository.CaseDefinitiongetCaseDefinition(String caseDefinitionId)Returns theCaseDefinition.static InputStreamgetCaseDiagram(String caseDefinitionId)Gives access to a deployed case diagram, e.g., a PNG image, through a stream of bytes.static InputStreamgetCaseModel(String caseDefinitionId)Gives access to a deployed case model, e.g., a CMMN 1.0 XML file, through a stream of bytes.static org.camunda.bpm.model.cmmn.CmmnModelInstancegetCmmnModelInstance(String caseDefinitionId)Returns theCmmnModelInstancefor the given caseDefinitionId.static org.camunda.bpm.engine.repository.DecisionDefinitiongetDecisionDefinition(String decisionDefinitionId)Returns theDecisionDefinition.static InputStreamgetDecisionDiagram(String decisionDefinitionId)Gives access to a deployed decision diagram, e.g., a PNG image, through a stream of bytes.static InputStreamgetDecisionModel(String decisionDefinitionId)Gives access to a deployed decision model, e.g., a DMN 1.1 XML file, through a stream of bytes.static org.camunda.bpm.engine.repository.DecisionRequirementsDefinitiongetDecisionRequirementsDefinition(String decisionRequirementsDefinitionId)Returns theDecisionRequirementsDefinition.static InputStreamgetDecisionRequirementsDiagram(String decisionRequirementsDefinitionId)Gives access to a deployed decision requirements diagram, e.g., a PNG image, through a stream of bytes.static InputStreamgetDecisionRequirementsModel(String decisionRequirementsDefinitionId)Gives access to a deployed decision requirements model, e.g., a DMN 1.1 XML file, through a stream of bytes.static List<String>getDeploymentResourceNames(String deploymentId)Retrieves a list of deployment resource names for the given deployment, ordered alphabetically.static List<org.camunda.bpm.engine.repository.Resource>getDeploymentResources(String deploymentId)Retrieves a list of deployment resources for the given deployment, ordered alphabetically by name.static org.camunda.bpm.model.dmn.DmnModelInstancegetDmnModelInstance(String decisionDefinitionId)Returns theDmnModelInstancefor the given decisionDefinitionId.static List<org.camunda.bpm.engine.task.IdentityLink>getIdentityLinksForProcessDefinition(String processDefinitionId)Deprecated.Use authorization mechanism instead.static org.camunda.bpm.engine.repository.ProcessDefinitiongetProcessDefinition(String processDefinitionId)Returns theProcessDefinitionincluding all BPMN information like additional Properties (e.g.static InputStreamgetProcessDiagram(String processDefinitionId)Gives access to a deployed process diagram, e.g., a PNG image, through a stream of bytes.static org.camunda.bpm.engine.repository.DiagramLayoutgetProcessDiagramLayout(String processDefinitionId)Provides positions and dimensions of elements in a process diagram as provided byRepositoryService.getProcessDiagram(String).static InputStreamgetProcessModel(String processDefinitionId)Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes.static InputStreamgetResourceAsStream(String deploymentId, String resourceName)Gives access to a deployment resource through a stream of bytes.static InputStreamgetResourceAsStreamById(String deploymentId, String resourceId)Gives access to a deployment resource through a stream of bytes.static voidsuspendProcessDefinitionById(String processDefinitionId)Suspends the process definition with the given id.static voidsuspendProcessDefinitionById(String processDefinitionId, boolean suspendProcessInstances, Date suspensionDate)Suspends the process definition with the given id.static voidsuspendProcessDefinitionByKey(String processDefinitionKey)Suspends the all process definitions with the given key (= id in the bpmn20.xml file).static voidsuspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate)Suspends the all process definitions with the given key (= id in the bpmn20.xml file).static voidupdateCaseDefinitionHistoryTimeToLive(String caseDefinitionId, Integer historyTimeToLive)Updates time to live of case definition.static voidupdateDecisionDefinitionHistoryTimeToLive(String decisionDefinitionId, Integer historyTimeToLive)Updates time to live of decision definition.static voidupdateProcessDefinitionHistoryTimeToLive(String processDefinitionId, Integer historyTimeToLive)Updates time to live of process definition.static org.camunda.bpm.engine.repository.UpdateProcessDefinitionSuspensionStateSelectBuilderupdateProcessDefinitionSuspensionState()Activate or suspend process definitions using a fluent builder.
-
-
-
Method Detail
-
createDeployment
public static org.camunda.bpm.engine.repository.DeploymentBuilder createDeployment()
Starts creating a new deployment- Returns:
- DeploymentBuilder
-
createDeployment
public static org.camunda.bpm.engine.repository.ProcessApplicationDeploymentBuilder createDeployment(org.camunda.bpm.application.ProcessApplicationReference processApplication)
Starts creating a newProcessApplicationDeployment.- Parameters:
processApplication- ProcessApplicationReference- Returns:
- ProcessApplicationDeploymentBuilder
- See Also:
ProcessApplicationDeploymentBuilder
-
deleteDeployment
public static void deleteDeployment(String deploymentId)
Deletes the given deployment.- Parameters:
deploymentId- id of the deployment, cannot be null.- Throws:
RuntimeException- If there are still runtime or history process instances or jobs.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.DEPLOYMENT.
-
deleteDeploymentCascade
public static void deleteDeploymentCascade(String deploymentId)
Deprecated.usedeleteDeployment(String, boolean). This methods may be deleted from 5.3.Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.- Parameters:
deploymentId- id of the deployment, cannot be null.- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.DEPLOYMENT.
-
deleteDeployment
public static void deleteDeployment(String deploymentId, boolean cascade)
Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.- Parameters:
deploymentId- id of the deployment, cannot be null.cascade- boolean- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.DEPLOYMENT.
-
deleteDeployment
public static void deleteDeployment(String deploymentId, boolean cascade, boolean skipCustomListeners)
Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.- Parameters:
deploymentId- id of the deployment, cannot be null.cascade- if set to true, all process instances (including) history are deletedskipCustomListeners- if true, only the built-inExecutionListeners are notified with theExecutionListener.EVENTNAME_ENDevent.- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.DEPLOYMENT.
-
deleteDeployment
public static void deleteDeployment(String deploymentId, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings)
Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.- Parameters:
deploymentId- id of the deployment, cannot be null.cascade- if set to true, all process instances (including) history are deletedskipCustomListeners- if true, only the built-inExecutionListeners are notified with theExecutionListener.EVENTNAME_ENDevent.skipIoMappings- specifies whether input/output mappings for tasks should be invoked- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.DEPLOYMENT.
-
deleteProcessDefinition
public static void deleteProcessDefinition(String processDefinitionId)
Deletes the process definition which belongs to the given process definition id. Same behavior asRepositoryService.deleteProcessDefinition(String, boolean, boolean)Both boolean parameters of this method are per default false. The deletion is in this case not cascading.- Parameters:
processDefinitionId- the id, which corresponds to the process definition- Throws:
org.camunda.bpm.engine.ProcessEngineException- If the process definition does not existorg.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.PROCESS_DEFINITION.- See Also:
RepositoryService.deleteProcessDefinition(String, boolean, boolean)
-
deleteProcessDefinition
public static void deleteProcessDefinition(String processDefinitionId, boolean cascade)
Deletes the process definition which belongs to the given process definition id. Cascades the deletion if the cascade is set to true. Same behavior asRepositoryService.deleteProcessDefinition(String, boolean, boolean)The skipCustomListeners parameter is per default false. The custom listeners are called if the cascading flag is set to true and the process instances are deleted.- Parameters:
processDefinitionId- the id, which corresponds to the process definitioncascade- if set to true, all process instances (including) history are deleted- Throws:
org.camunda.bpm.engine.ProcessEngineException- If the process definition does not existorg.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.PROCESS_DEFINITION.- See Also:
RepositoryService.deleteProcessDefinition(String, boolean, boolean)
-
deleteProcessDefinition
public static void deleteProcessDefinition(String processDefinitionId, boolean cascade, boolean skipCustomListeners)
Deletes the process definition which belongs to the given process definition id. Cascades the deletion if the cascade is set to true the custom listener can be skipped if the third parameter is set to true.- Parameters:
processDefinitionId- the id, which corresponds to the process definitioncascade- if set to true, all process instances (including) history are deletedskipCustomListeners- if true, only the built-inExecutionListeners are notified with theExecutionListener.EVENTNAME_ENDevent. Is only used if cascade set to true.- Throws:
org.camunda.bpm.engine.ProcessEngineException- If the process definition does not existorg.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.PROCESS_DEFINITION.
-
deleteProcessDefinition
public static void deleteProcessDefinition(String processDefinitionId, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings)
Deletes the process definition which belongs to the given process definition id. Cascades the deletion if the cascade is set to true, the custom listener can be skipped if the third parameter is set to true, io mappings can be skipped if the forth parameter is set to true.- Parameters:
processDefinitionId- the id, which corresponds to the process definitioncascade- if set to true, all process instances (including) history are deletedskipCustomListeners- if true, only the built-inExecutionListeners are notified with theExecutionListener.EVENTNAME_ENDevent. Is only used if cascade set to true.skipIoMappings- Specifies whether input/output mappings for tasks should be invoked- Throws:
org.camunda.bpm.engine.ProcessEngineException- If the process definition does not existorg.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.DELETEpermission onResources.PROCESS_DEFINITION.
-
deleteProcessDefinitions
public static org.camunda.bpm.engine.repository.DeleteProcessDefinitionsSelectBuilder deleteProcessDefinitions()
Fluent builder to delete process definitions.- Returns:
- the builder to delete process definitions
-
getDeploymentResourceNames
public static List<String> getDeploymentResourceNames(String deploymentId)
Retrieves a list of deployment resource names for the given deployment, ordered alphabetically.- Parameters:
deploymentId- id of the deployment, cannot be null.- Returns:
- Lista
- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DEPLOYMENT.
-
getDeploymentResources
public static List<org.camunda.bpm.engine.repository.Resource> getDeploymentResources(String deploymentId)
Retrieves a list of deployment resources for the given deployment, ordered alphabetically by name.- Parameters:
deploymentId- id of the deployment, cannot be null.- Returns:
- Lista
- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DEPLOYMENT.
-
getResourceAsStream
public static InputStream getResourceAsStream(String deploymentId, String resourceName)
Gives access to a deployment resource through a stream of bytes.- Parameters:
deploymentId- id of the deployment, cannot be null.resourceName- name of the resource, cannot be null.- Returns:
- InputStream
- Throws:
org.camunda.bpm.engine.ProcessEngineException- When the resource doesn't exist in the given deployment or when no deployment exists for the given deploymentId.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DEPLOYMENT.
-
getResourceAsStreamById
public static InputStream getResourceAsStreamById(String deploymentId, String resourceId)
Gives access to a deployment resource through a stream of bytes.- Parameters:
deploymentId- id of the deployment, cannot be null.resourceId- id of the resource, cannot be null.- Returns:
- InputStream
- Throws:
org.camunda.bpm.engine.ProcessEngineException- When the resource doesn't exist in the given deployment or when no deployment exists for the given deploymentId.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DEPLOYMENT.
-
createProcessDefinitionQuery
public static org.camunda.bpm.engine.repository.ProcessDefinitionQuery createProcessDefinitionQuery()
Query process definitions.- Returns:
- ProcessDefinitionQuery
-
createCaseDefinitionQuery
public static org.camunda.bpm.engine.repository.CaseDefinitionQuery createCaseDefinitionQuery()
Query case definitions.- Returns:
- CaseDefinitionQuery
-
createDecisionDefinitionQuery
public static org.camunda.bpm.engine.repository.DecisionDefinitionQuery createDecisionDefinitionQuery()
Query decision definitions.- Returns:
- DecisionDefinitionQuery
-
createDecisionRequirementsDefinitionQuery
public static org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery createDecisionRequirementsDefinitionQuery()
Query decision requirements definition.- Returns:
- DecisionRequirementsDefinitionQuery
-
createDeploymentQuery
public static org.camunda.bpm.engine.repository.DeploymentQuery createDeploymentQuery()
Query process definitions.- Returns:
- DeploymentQuery
-
suspendProcessDefinitionById
public static void suspendProcessDefinitionById(String processDefinitionId)
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)!
Note: for more complex suspend commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionId- String- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITION.
-
suspendProcessDefinitionById
public static void suspendProcessDefinitionById(String processDefinitionId, boolean suspendProcessInstances, Date suspensionDate)
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: for more complex suspend commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionId- StringsuspendProcessInstances- 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!- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITIONand ifsuspendProcessInstancesis set totrueand the user have noPermissions.UPDATEpermission onResources.PROCESS_INSTANCEor noPermissions.UPDATE_INSTANCEpermission onResources.PROCESS_DEFINITION.- See Also:
RuntimeService.suspendProcessInstanceById(String)
-
suspendProcessDefinitionByKey
public static void suspendProcessDefinitionByKey(String processDefinitionKey)
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)!
Note: for more complex suspend commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionKey- String- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITION.
-
suspendProcessDefinitionByKey
public static void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate)
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: for more complex suspend commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionKey- StringsuspendProcessInstances- 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!- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITIONand ifsuspendProcessInstancesis set totrueand the user have noPermissions.UPDATEpermission onResources.PROCESS_INSTANCEor noPermissions.UPDATE_INSTANCEpermission onResources.PROCESS_DEFINITION.- See Also:
RuntimeService.suspendProcessInstanceById(String)
-
activateProcessDefinitionById
public static void activateProcessDefinitionById(String processDefinitionId)
Activates the process definition with the given id.Note: for more complex activate commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionId- String- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found or if the process definition is already in state active.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITION.
-
activateProcessDefinitionById
public static void activateProcessDefinitionById(String processDefinitionId, boolean activateProcessInstances, Date activationDate)
Activates the process definition with the given id.Note: for more complex activate commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionId- StringactivateProcessInstances- booleanactivationDate- The date on which the process definition will be activated. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITIONand ifactivateProcessInstancesis set totrueand the user have noPermissions.UPDATEpermission onResources.PROCESS_INSTANCEor noPermissions.UPDATE_INSTANCEpermission onResources.PROCESS_DEFINITION.- See Also:
RuntimeService.activateProcessInstanceById(String)
-
activateProcessDefinitionByKey
public static void activateProcessDefinitionByKey(String processDefinitionKey)
Activates the process definition with the given key (=id in the bpmn20.xml file).Note: for more complex activate commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionKey- String- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITION.
-
activateProcessDefinitionByKey
public static void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate)
Activates the process definition with the given key (=id in the bpmn20.xml file).Note: for more complex activate commands use
updateProcessDefinitionSuspensionState().- Parameters:
processDefinitionKey- StringactivateProcessInstances- booleanactivationDate- The date on which the process definition will be activated. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!- Throws:
org.camunda.bpm.engine.ProcessEngineException- If no such processDefinition can be found.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITIONand ifactivateProcessInstancesis set totrueand the user have noPermissions.UPDATEpermission onResources.PROCESS_INSTANCEor noPermissions.UPDATE_INSTANCEpermission onResources.PROCESS_DEFINITION.- See Also:
RuntimeService.activateProcessInstanceById(String)
-
updateProcessDefinitionSuspensionState
public static org.camunda.bpm.engine.repository.UpdateProcessDefinitionSuspensionStateSelectBuilder updateProcessDefinitionSuspensionState()
Activate or suspend process definitions using a fluent builder. Specify the definitions by calling one of the by methods, like byProcessDefinitionId. To update the suspension state callUpdateProcessDefinitionSuspensionStateBuilder.activate()orUpdateProcessDefinitionSuspensionStateBuilder.suspend().- Returns:
- the builder to update the suspension state
-
updateProcessDefinitionHistoryTimeToLive
public static void updateProcessDefinitionHistoryTimeToLive(String processDefinitionId, Integer historyTimeToLive)
Updates time to live of process definition. The field is used within history cleanup process.- Parameters:
processDefinitionId- StringhistoryTimeToLive- Integerv- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.PROCESS_DEFINITION.
-
updateDecisionDefinitionHistoryTimeToLive
public static void updateDecisionDefinitionHistoryTimeToLive(String decisionDefinitionId, Integer historyTimeToLive)
Updates time to live of decision definition. The field is used within history cleanup process.- Parameters:
decisionDefinitionId- StringhistoryTimeToLive- Integer- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.UPDATEpermission onResources.DECISION_DEFINITION.
-
updateCaseDefinitionHistoryTimeToLive
public static void updateCaseDefinitionHistoryTimeToLive(String caseDefinitionId, Integer historyTimeToLive)
Updates time to live of case definition. The field is used within history cleanup process.- Parameters:
caseDefinitionId- StringhistoryTimeToLive- Integer
-
getProcessModel
public static InputStream getProcessModel(String processDefinitionId)
Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes.- Parameters:
processDefinitionId- id of aProcessDefinition, cannot be null.- Returns:
- InputStream
- Throws:
org.camunda.bpm.engine.ProcessEngineException- when the process model doesn't exist.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.PROCESS_DEFINITION.
-
getProcessDiagram
public static InputStream getProcessDiagram(String processDefinitionId)
Gives access to a deployed process diagram, e.g., a PNG image, through a stream of bytes.- Parameters:
processDefinitionId- id of aProcessDefinition, cannot be null.- Returns:
- null when the diagram resource name of a
ProcessDefinitionis null. - Throws:
org.camunda.bpm.engine.ProcessEngineException- when the process diagram doesn't exist.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.PROCESS_DEFINITION.
-
getProcessDefinition
public static org.camunda.bpm.engine.repository.ProcessDefinition getProcessDefinition(String processDefinitionId)
Returns theProcessDefinitionincluding all BPMN information like additional Properties (e.g. documentation).- Parameters:
processDefinitionId- String- Returns:
- ProcessDefinition
- Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.PROCESS_DEFINITION.
-
getProcessDiagramLayout
public static org.camunda.bpm.engine.repository.DiagramLayout getProcessDiagramLayout(String processDefinitionId)
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.
- Parameters:
processDefinitionId- id of aProcessDefinition, cannot be null.- Returns:
- null when the input stream of a process diagram is null.
- Throws:
org.camunda.bpm.engine.ProcessEngineException- When the process model or diagram doesn't exist.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.PROCESS_DEFINITION.
-
getBpmnModelInstance
public static org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance(String processDefinitionId)
Returns theBpmnModelInstancefor the given processDefinitionId.- Parameters:
processDefinitionId- the id of the Process Definition for which theBpmnModelInstanceshould be retrieved.- Returns:
- the
BpmnModelInstance - Throws:
org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.PROCESS_DEFINITION.
-
getCmmnModelInstance
public static org.camunda.bpm.model.cmmn.CmmnModelInstance getCmmnModelInstance(String caseDefinitionId)
Returns theCmmnModelInstancefor the given caseDefinitionId.- Parameters:
caseDefinitionId- the id of the Case Definition for which theCmmnModelInstanceshould be retrieved.- Returns:
- the
CmmnModelInstance - Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given case definition id or deployment id or resource name is nullorg.camunda.bpm.engine.exception.NotFoundException- when no CMMN model instance or deployment resource is found for the given case definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the command.
-
getDmnModelInstance
public static org.camunda.bpm.model.dmn.DmnModelInstance getDmnModelInstance(String decisionDefinitionId)
Returns theDmnModelInstancefor the given decisionDefinitionId.- Parameters:
decisionDefinitionId- the id of the Decision Definition for which theDmnModelInstanceshould be retrieved.- Returns:
- the
DmnModelInstance - Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given decision definition id or deployment id or resource name is nullorg.camunda.bpm.engine.exception.NotFoundException- when no DMN model instance or deployment resource is found for the given decision definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the command.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DECISION_DEFINITION.
-
addCandidateStarterUser
public static void addCandidateStarterUser(String processDefinitionId, String userId)
Deprecated.Use authorization mechanism instead.Authorizes a candidate user for a process definition.- Parameters:
processDefinitionId- id of the process definition, cannot be null.userId- id of the user involve, cannot be null.- Throws:
org.camunda.bpm.engine.ProcessEngineException- When the process definition or user doesn't exist.
-
addCandidateStarterGroup
public static void addCandidateStarterGroup(String processDefinitionId, String groupId)
Deprecated.Use authorization mechanism instead.Authorizes a candidate group for a process definition.- Parameters:
processDefinitionId- id of the process definition, cannot be null.groupId- id of the group involve, cannot be null.- Throws:
org.camunda.bpm.engine.ProcessEngineException- When the process definition or group doesn't exist.
-
deleteCandidateStarterUser
public static void deleteCandidateStarterUser(String processDefinitionId, String userId)
Deprecated.Use authorization mechanism instead.Removes the authorization of a candidate user for a process definition.- Parameters:
processDefinitionId- id of the process definition, cannot be null.userId- id of the user involve, cannot be null.- Throws:
org.camunda.bpm.engine.ProcessEngineException- When the process definition or user doesn't exist.
-
deleteCandidateStarterGroup
public static void deleteCandidateStarterGroup(String processDefinitionId, String groupId)
Deprecated.Use authorization mechanism instead.Removes the authorization of a candidate group for a process definition.- Parameters:
processDefinitionId- id of the process definition, cannot be null.groupId- id of the group involve, cannot be null.- Throws:
org.camunda.bpm.engine.ProcessEngineException- When the process definition or group doesn't exist.
-
getIdentityLinksForProcessDefinition
public static List<org.camunda.bpm.engine.task.IdentityLink> getIdentityLinksForProcessDefinition(String processDefinitionId)
Deprecated.Use authorization mechanism instead.Retrieves theIdentityLinks associated with the given process definition. Such anIdentityLinkinforms how a certain identity (eg. group or user) is authorized for a certain process definition- Parameters:
processDefinitionId- String- Returns:
- Lista
-
getCaseDefinition
public static org.camunda.bpm.engine.repository.CaseDefinition getCaseDefinition(String caseDefinitionId)
Returns theCaseDefinition.- Parameters:
caseDefinitionId- String- Returns:
- CaseDefinition
- Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given case definition id is nullorg.camunda.bpm.engine.exception.NotFoundException- when no case definition is found for the given case definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the command.
-
getCaseModel
public static InputStream getCaseModel(String caseDefinitionId)
Gives access to a deployed case model, e.g., a CMMN 1.0 XML file, through a stream of bytes.- Parameters:
caseDefinitionId- id of aCaseDefinition, cannot be null.- Returns:
- InputStream
- Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given case definition id or deployment id or resource name is nullorg.camunda.bpm.engine.exception.NotFoundException- when no case definition or deployment resource is found for the given case definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the command
-
getCaseDiagram
public static InputStream getCaseDiagram(String caseDefinitionId)
Gives access to a deployed case diagram, e.g., a PNG image, through a stream of bytes.- Parameters:
caseDefinitionId- id of aCaseDefinition, cannot be null.- Returns:
- null when the diagram resource name of a
CaseDefinitionis null. - Throws:
org.camunda.bpm.engine.ProcessEngineException- when the process diagram doesn't exist.
-
getDecisionDefinition
public static org.camunda.bpm.engine.repository.DecisionDefinition getDecisionDefinition(String decisionDefinitionId)
Returns theDecisionDefinition.- Parameters:
decisionDefinitionId- String- Returns:
- DecisionDefinition
- Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given decision definition id is nullorg.camunda.bpm.engine.exception.NotFoundException- when no decision definition is found for the given decision definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the command.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DECISION_DEFINITION.
-
getDecisionRequirementsDefinition
public static org.camunda.bpm.engine.repository.DecisionRequirementsDefinition getDecisionRequirementsDefinition(String decisionRequirementsDefinitionId)
Returns theDecisionRequirementsDefinition.- Parameters:
decisionRequirementsDefinitionId- String- Returns:
- DecisionRequirementsDefinition
- Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given decision requirements definition id is nullorg.camunda.bpm.engine.exception.NotFoundException- when no decision requirements definition is found for the given decision requirements definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the command.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DECISION_REQUIREMENTS_DEFINITION.
-
getDecisionModel
public static InputStream getDecisionModel(String decisionDefinitionId)
Gives access to a deployed decision model, e.g., a DMN 1.1 XML file, through a stream of bytes.- Parameters:
decisionDefinitionId- id of aDecisionDefinition, cannot be null.- Returns:
- InputStream
- Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given decision definition id or deployment id or resource name is nullorg.camunda.bpm.engine.exception.NotFoundException- when no decision definition or deployment resource is found for the given decision definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the commandorg.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DECISION_DEFINITION.
-
getDecisionRequirementsModel
public static InputStream getDecisionRequirementsModel(String decisionRequirementsDefinitionId)
Gives access to a deployed decision requirements model, e.g., a DMN 1.1 XML file, through a stream of bytes.- Parameters:
decisionRequirementsDefinitionId- id of aDecisionRequirementsDefinition, cannot be null.- Returns:
- InputStream
- Throws:
org.camunda.bpm.engine.exception.NotValidException- when the given decision requirements definition id or deployment id or resource name is nullorg.camunda.bpm.engine.exception.NotFoundException- when no decision requirements definition or deployment resource is found for the given decision requirements definition idorg.camunda.bpm.engine.ProcessEngineException- when an internal exception happens during the execution of the commandorg.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DECISION_REQUIREMENTS_DEFINITION.
-
getDecisionDiagram
public static InputStream getDecisionDiagram(String decisionDefinitionId)
Gives access to a deployed decision diagram, e.g., a PNG image, through a stream of bytes.- Parameters:
decisionDefinitionId- id of aDecisionDefinition, cannot be null.- Returns:
- null when the diagram resource name of a
DecisionDefinitionis null. - Throws:
org.camunda.bpm.engine.ProcessEngineException- when the decision diagram doesn't exist.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DECISION_DEFINITION.
-
getDecisionRequirementsDiagram
public static InputStream getDecisionRequirementsDiagram(String decisionRequirementsDefinitionId)
Gives access to a deployed decision requirements diagram, e.g., a PNG image, through a stream of bytes.- Parameters:
decisionRequirementsDefinitionId- id of aDecisionRequirementsDefinition, cannot be null.- Returns:
- null when the diagram resource name of a
DecisionRequirementsDefinitionis null. - Throws:
org.camunda.bpm.engine.ProcessEngineException- when the decision requirements diagram doesn't exist.org.camunda.bpm.engine.AuthorizationException- If the user has noPermissions.READpermission onResources.DECISION_REQUIREMENTS_DEFINITION.
-
-