Class WorkflowRepositoryOperations


  • public class WorkflowRepositoryOperations
    extends Object
    • Constructor Detail

      • WorkflowRepositoryOperations

        public WorkflowRepositoryOperations()
    • 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 new ProcessApplicationDeployment.
        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 no Permissions.DELETE permission on Resources.DEPLOYMENT.
      • deleteDeploymentCascade

        public static void deleteDeploymentCascade​(String deploymentId)
        Deprecated.
        use deleteDeployment(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 no Permissions.DELETE permission on Resources.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 no Permissions.DELETE permission on Resources.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 deleted
        skipCustomListeners - if true, only the built-in ExecutionListeners are notified with the ExecutionListener.EVENTNAME_END event.
        Throws:
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.DELETE permission on Resources.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 deleted
        skipCustomListeners - if true, only the built-in ExecutionListeners are notified with the ExecutionListener.EVENTNAME_END event.
        skipIoMappings - specifies whether input/output mappings for tasks should be invoked
        Throws:
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.DELETE permission on Resources.DEPLOYMENT.
      • deleteProcessDefinition

        public static void deleteProcessDefinition​(String processDefinitionId)
        Deletes the process definition which belongs to the given process definition id. Same behavior as RepositoryService.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 exist
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.DELETE permission on Resources.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 as RepositoryService.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 definition
        cascade - if set to true, all process instances (including) history are deleted
        Throws:
        org.camunda.bpm.engine.ProcessEngineException - If the process definition does not exist
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.DELETE permission on Resources.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 definition
        cascade - if set to true, all process instances (including) history are deleted
        skipCustomListeners - if true, only the built-in ExecutionListeners are notified with the ExecutionListener.EVENTNAME_END event. Is only used if cascade set to true.
        Throws:
        org.camunda.bpm.engine.ProcessEngineException - If the process definition does not exist
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.DELETE permission on Resources.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 definition
        cascade - if set to true, all process instances (including) history are deleted
        skipCustomListeners - if true, only the built-in ExecutionListeners are notified with the ExecutionListener.EVENTNAME_END event. 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 exist
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.DELETE permission on Resources.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 no Permissions.READ permission on Resources.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 no Permissions.READ permission on Resources.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 no Permissions.READ permission on Resources.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 no Permissions.READ permission on Resources.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 no Permissions.UPDATE permission on Resources.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 - String
        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!
        Throws:
        org.camunda.bpm.engine.ProcessEngineException - If no such processDefinition can be found.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.UPDATE permission on Resources.PROCESS_DEFINITION and if suspendProcessInstances is set to true and the user have no Permissions.UPDATE permission on Resources.PROCESS_INSTANCE or no Permissions.UPDATE_INSTANCE permission on Resources.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 no Permissions.UPDATE permission on Resources.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 - String
        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!
        Throws:
        org.camunda.bpm.engine.ProcessEngineException - If no such processDefinition can be found.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.UPDATE permission on Resources.PROCESS_DEFINITION and if suspendProcessInstances is set to true and the user have no Permissions.UPDATE permission on Resources.PROCESS_INSTANCE or no Permissions.UPDATE_INSTANCE permission on Resources.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 no Permissions.UPDATE permission on Resources.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 - String
        activateProcessInstances - boolean
        activationDate - 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 no Permissions.UPDATE permission on Resources.PROCESS_DEFINITION and if activateProcessInstances is set to true and the user have no Permissions.UPDATE permission on Resources.PROCESS_INSTANCE or no Permissions.UPDATE_INSTANCE permission on Resources.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 no Permissions.UPDATE permission on Resources.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 - String
        activateProcessInstances - boolean
        activationDate - 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 no Permissions.UPDATE permission on Resources.PROCESS_DEFINITION and if activateProcessInstances is set to true and the user have no Permissions.UPDATE permission on Resources.PROCESS_INSTANCE or no Permissions.UPDATE_INSTANCE permission on Resources.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 call UpdateProcessDefinitionSuspensionStateBuilder.activate() or UpdateProcessDefinitionSuspensionStateBuilder.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 - String
        historyTimeToLive - Integerv
        Throws:
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.UPDATE permission on Resources.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 - String
        historyTimeToLive - Integer
        Throws:
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.UPDATE permission on Resources.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 - String
        historyTimeToLive - 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 a ProcessDefinition, 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 no Permissions.READ permission on Resources.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 a ProcessDefinition, cannot be null.
        Returns:
        null when the diagram resource name of a ProcessDefinition is null.
        Throws:
        org.camunda.bpm.engine.ProcessEngineException - when the process diagram doesn't exist.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.PROCESS_DEFINITION.
      • getProcessDefinition

        public static org.camunda.bpm.engine.repository.ProcessDefinition getProcessDefinition​(String processDefinitionId)
        Returns the ProcessDefinition including all BPMN information like additional Properties (e.g. documentation).
        Parameters:
        processDefinitionId - String
        Returns:
        ProcessDefinition
        Throws:
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.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 by RepositoryService.getProcessDiagram(String).

        This method requires a process model and a diagram image to be deployed.

        Parameters:
        processDefinitionId - id of a ProcessDefinition, 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 no Permissions.READ permission on Resources.PROCESS_DEFINITION.
      • getBpmnModelInstance

        public static org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance​(String processDefinitionId)
        Returns the BpmnModelInstance for the given processDefinitionId.
        Parameters:
        processDefinitionId - the id of the Process Definition for which the BpmnModelInstance should be retrieved.
        Returns:
        the BpmnModelInstance
        Throws:
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.PROCESS_DEFINITION.
      • getCmmnModelInstance

        public static org.camunda.bpm.model.cmmn.CmmnModelInstance getCmmnModelInstance​(String caseDefinitionId)
        Returns the CmmnModelInstance for the given caseDefinitionId.
        Parameters:
        caseDefinitionId - the id of the Case Definition for which the CmmnModelInstance should 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 null
        org.camunda.bpm.engine.exception.NotFoundException - when no CMMN model instance or deployment resource is found for the given case definition id
        org.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 the DmnModelInstance for the given decisionDefinitionId.
        Parameters:
        decisionDefinitionId - the id of the Decision Definition for which the DmnModelInstance should 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 null
        org.camunda.bpm.engine.exception.NotFoundException - when no DMN model instance or deployment resource is found for the given decision definition id
        org.camunda.bpm.engine.ProcessEngineException - when an internal exception happens during the execution of the command.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.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 the IdentityLinks associated with the given process definition. Such an IdentityLink informs 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 the CaseDefinition.
        Parameters:
        caseDefinitionId - String
        Returns:
        CaseDefinition
        Throws:
        org.camunda.bpm.engine.exception.NotValidException - when the given case definition id is null
        org.camunda.bpm.engine.exception.NotFoundException - when no case definition is found for the given case definition id
        org.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 a CaseDefinition, 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 null
        org.camunda.bpm.engine.exception.NotFoundException - when no case definition or deployment resource is found for the given case definition id
        org.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 a CaseDefinition, cannot be null.
        Returns:
        null when the diagram resource name of a CaseDefinition is 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 the DecisionDefinition.
        Parameters:
        decisionDefinitionId - String
        Returns:
        DecisionDefinition
        Throws:
        org.camunda.bpm.engine.exception.NotValidException - when the given decision definition id is null
        org.camunda.bpm.engine.exception.NotFoundException - when no decision definition is found for the given decision definition id
        org.camunda.bpm.engine.ProcessEngineException - when an internal exception happens during the execution of the command.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.DECISION_DEFINITION.
      • getDecisionRequirementsDefinition

        public static org.camunda.bpm.engine.repository.DecisionRequirementsDefinition getDecisionRequirementsDefinition​(String decisionRequirementsDefinitionId)
        Returns the DecisionRequirementsDefinition.
        Parameters:
        decisionRequirementsDefinitionId - String
        Returns:
        DecisionRequirementsDefinition
        Throws:
        org.camunda.bpm.engine.exception.NotValidException - when the given decision requirements definition id is null
        org.camunda.bpm.engine.exception.NotFoundException - when no decision requirements definition is found for the given decision requirements definition id
        org.camunda.bpm.engine.ProcessEngineException - when an internal exception happens during the execution of the command.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.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 a DecisionDefinition, 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 null
        org.camunda.bpm.engine.exception.NotFoundException - when no decision definition or deployment resource is found for the given decision definition id
        org.camunda.bpm.engine.ProcessEngineException - when an internal exception happens during the execution of the command
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.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 a DecisionRequirementsDefinition, 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 null
        org.camunda.bpm.engine.exception.NotFoundException - when no decision requirements definition or deployment resource is found for the given decision requirements definition id
        org.camunda.bpm.engine.ProcessEngineException - when an internal exception happens during the execution of the command
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.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 a DecisionDefinition, cannot be null.
        Returns:
        null when the diagram resource name of a DecisionDefinition is null.
        Throws:
        org.camunda.bpm.engine.ProcessEngineException - when the decision diagram doesn't exist.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.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 a DecisionRequirementsDefinition, cannot be null.
        Returns:
        null when the diagram resource name of a DecisionRequirementsDefinition is null.
        Throws:
        org.camunda.bpm.engine.ProcessEngineException - when the decision requirements diagram doesn't exist.
        org.camunda.bpm.engine.AuthorizationException - If the user has no Permissions.READ permission on Resources.DECISION_REQUIREMENTS_DEFINITION.