Search in sources :

Example 6 with ProcessDefinitionEntityManager

use of org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityManager in project Activiti by Activiti.

the class BpmnDeployer method persistProcessDefinitionsAndAuthorizations.

/**
 * Saves each process definition.  It is assumed that the deployment is new, the definitions
 * have never been saved before, and that they have all their values properly set up.
 */
protected void persistProcessDefinitionsAndAuthorizations(ParsedDeployment parsedDeployment) {
    CommandContext commandContext = Context.getCommandContext();
    ProcessDefinitionEntityManager processDefinitionManager = commandContext.getProcessDefinitionEntityManager();
    for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
        processDefinitionManager.insert(processDefinition, false);
        bpmnDeploymentHelper.addAuthorizationsForNewProcessDefinition(parsedDeployment.getProcessModelForProcessDefinition(processDefinition), processDefinition);
    }
}
Also used : ProcessDefinitionEntityManager(org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityManager) CommandContext(org.activiti.engine.impl.interceptor.CommandContext) ProcessDefinitionEntity(org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity)

Aggregations

ProcessDefinitionEntity (org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity)6 ProcessDefinitionEntityManager (org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityManager)6 ActivitiException (org.activiti.engine.ActivitiException)2 CommandContext (org.activiti.engine.impl.interceptor.CommandContext)2 ProcessDefinition (org.activiti.engine.repository.ProcessDefinition)2 ArrayList (java.util.ArrayList)1 ActivitiIllegalArgumentException (org.activiti.engine.ActivitiIllegalArgumentException)1 ActivitiObjectNotFoundException (org.activiti.engine.ActivitiObjectNotFoundException)1 ProcessEngine (org.activiti.engine.ProcessEngine)1 RepositoryService (org.activiti.engine.RepositoryService)1 Group (org.activiti.engine.identity.Group)1 ProcessDefinitionQueryImpl (org.activiti.engine.impl.ProcessDefinitionQueryImpl)1 CommandExecutor (org.activiti.engine.impl.interceptor.CommandExecutor)1 ProcessDefinitionQuery (org.activiti.engine.repository.ProcessDefinitionQuery)1 IdentityLink (org.activiti.engine.task.IdentityLink)1 BPSGroupIdentityManager (org.wso2.carbon.bpmn.core.integration.BPSGroupIdentityManager)1 RestIdentityLink (org.wso2.carbon.bpmn.rest.model.common.RestIdentityLink)1 PrivilegedCarbonContext (org.wso2.carbon.context.PrivilegedCarbonContext)1