Class ProcessDefinitionManager

    • Constructor Detail

      • ProcessDefinitionManager

        public ProcessDefinitionManager()
    • Method Detail

      • findLatestProcessDefinitionsByKey

        public java.util.List<ProcessDefinitionEntity> findLatestProcessDefinitionsByKey​(java.lang.String processDefinitionKey)
        Returns:
        the latest versions of the process definition with the given key (from any tenant), contains multiple elements if more than one tenant has a process definition with the given key
        See Also:
        findLatestProcessDefinitionByKey(String)
      • findLatestProcessDefinitionById

        public ProcessDefinitionEntity findLatestProcessDefinitionById​(java.lang.String processDefinitionId)
      • findProcessDefinitionCountByQueryCriteria

        public long findProcessDefinitionCountByQueryCriteria​(ProcessDefinitionQueryImpl processDefinitionQuery)
      • findProcessDefinitionByDeploymentAndKey

        public ProcessDefinitionEntity findProcessDefinitionByDeploymentAndKey​(java.lang.String deploymentId,
                                                                               java.lang.String processDefinitionKey)
      • findProcessDefinitionByKeyVersionAndTenantId

        public ProcessDefinitionEntity findProcessDefinitionByKeyVersionAndTenantId​(java.lang.String processDefinitionKey,
                                                                                    java.lang.Integer processDefinitionVersion,
                                                                                    java.lang.String tenantId)
      • findProcessDefinitionByKeyVersionTagAndTenantId

        public ProcessDefinitionEntity findProcessDefinitionByKeyVersionTagAndTenantId​(java.lang.String processDefinitionKey,
                                                                                       java.lang.String processDefinitionVersionTag,
                                                                                       java.lang.String tenantId)
      • findProcessDefinitionByKeyVersionOrVersionTag

        protected ProcessDefinitionEntity findProcessDefinitionByKeyVersionOrVersionTag​(java.lang.String processDefinitionKey,
                                                                                        java.lang.Integer processDefinitionVersion,
                                                                                        java.lang.String processDefinitionVersionTag,
                                                                                        java.lang.String tenantId)
      • findProcessDefinitionsByKey

        public java.util.List<ProcessDefinition> findProcessDefinitionsByKey​(java.lang.String processDefinitionKey)
      • findProcessDefinitionsStartableByUser

        public java.util.List<ProcessDefinition> findProcessDefinitionsStartableByUser​(java.lang.String user)
      • findPreviousProcessDefinitionId

        public java.lang.String findPreviousProcessDefinitionId​(java.lang.String processDefinitionKey,
                                                                java.lang.Integer version,
                                                                java.lang.String tenantId)
      • findProcessDefinitionsByDeploymentId

        public java.util.List<ProcessDefinition> findProcessDefinitionsByDeploymentId​(java.lang.String deploymentId)
      • findProcessDefinitionsByKeyIn

        public java.util.List<ProcessDefinition> findProcessDefinitionsByKeyIn​(java.lang.String... keys)
      • findDefinitionsByKeyAndTenantId

        public java.util.List<ProcessDefinition> findDefinitionsByKeyAndTenantId​(java.lang.String processDefinitionKey,
                                                                                 java.lang.String tenantId,
                                                                                 boolean isTenantIdSet)
      • findDefinitionsByIds

        public java.util.List<ProcessDefinition> findDefinitionsByIds​(java.util.Set<java.lang.String> processDefinitionIds)
      • updateProcessDefinitionSuspensionStateById

        public void updateProcessDefinitionSuspensionStateById​(java.lang.String processDefinitionId,
                                                               SuspensionState suspensionState)
      • updateProcessDefinitionSuspensionStateByKey

        public void updateProcessDefinitionSuspensionStateByKey​(java.lang.String processDefinitionKey,
                                                                SuspensionState suspensionState)
      • updateProcessDefinitionSuspensionStateByKeyAndTenantId

        public void updateProcessDefinitionSuspensionStateByKeyAndTenantId​(java.lang.String processDefinitionKey,
                                                                           java.lang.String tenantId,
                                                                           SuspensionState suspensionState)
      • cascadeDeleteProcessInstancesForProcessDefinition

        protected void cascadeDeleteProcessInstancesForProcessDefinition​(java.lang.String processDefinitionId,
                                                                         boolean skipCustomListeners,
                                                                         boolean skipIoMappings)
        Cascades the deletion of the process definition to the process instances. Skips the custom listeners if the flag was set to true.
        Parameters:
        processDefinitionId - the process definition id
        skipCustomListeners - true if the custom listeners should be skipped at process instance deletion
        skipIoMappings - specifies whether input/output mappings for tasks should be invoked
      • cascadeDeleteHistoryForProcessDefinition

        protected void cascadeDeleteHistoryForProcessDefinition​(java.lang.String processDefinitionId)
        Cascades the deletion of a process definition to the history, deletes the history.
        Parameters:
        processDefinitionId - the process definition id
      • deleteTimerStartEventsForProcessDefinition

        protected void deleteTimerStartEventsForProcessDefinition​(ProcessDefinition processDefinition)
        Deletes the timer start events for the given process definition.
        Parameters:
        processDefinition - the process definition
      • deleteSubscriptionsForProcessDefinition

        public void deleteSubscriptionsForProcessDefinition​(java.lang.String processDefinitionId)
        Deletes the subscriptions for the process definition, which is identified by the given process definition id.
        Parameters:
        processDefinitionId - the id of the process definition
      • deleteProcessDefinition

        public void deleteProcessDefinition​(ProcessDefinition processDefinition,
                                            java.lang.String processDefinitionId,
                                            boolean cascadeToHistory,
                                            boolean cascadeToInstances,
                                            boolean skipCustomListeners,
                                            boolean skipIoMappings)
        Deletes the given process definition from the database and cache. If cascadeToHistory and cascadeToInstances is set to true it deletes the history and the process instances. *Note*: If more than one process definition, from one deployment, is deleted in a single transaction and the cascadeToHistory and cascadeToInstances flag was set to true it can cause a dirty deployment cache. The process instances of ALL process definitions must be deleted, before every process definition can be deleted! In such cases the cascadeToInstances flag have to set to false! On deletion of all process instances, the task listeners will be deleted as well. Deletion of tasks and listeners needs the redeployment of deployments. It can cause to problems if is done sequential with the deletion of process definition in a single transaction. *For example*: Deployment contains two process definition. First process definition and instances will be removed, also cleared from the cache. Second process definition will be removed and his instances. Deletion of instances will cause redeployment this deploys again first into the cache. Only the second will be removed from cache and first remains in the cache after the deletion process.
        Parameters:
        processDefinition - the process definition which should be deleted
        processDefinitionId - the id of the process definition
        cascadeToHistory - if true the history will deleted as well
        cascadeToInstances - if true the process instances are deleted as well
        skipCustomListeners - if true skips the custom listeners on deletion of instances
        skipIoMappings - specifies whether input/output mappings for tasks should be invoked
      • createDefaultAuthorizations

        protected void createDefaultAuthorizations​(ProcessDefinition processDefinition)
      • configureParameterizedQuery

        protected ListQueryParameterObject configureParameterizedQuery​(java.lang.Object parameter)