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);
}
}
Aggregations