12-11-2012 05:07 AM
@Override
public Void execute(CommandContext commandContext) {
DbSqlSession dbSqlSession = commandContext.getSession(DbSqlSession.class);
DeploymentEntity deploymentEntity = new DeploymentEntity();
deploymentEntity.setName(toDeploy.getName());
deploymentEntity.setNew(true);
dbSqlSession.insert(deploymentEntity);
int versionNumber = computeVersion(commandContext);
toDeploy.setVersion(versionNumber);
toDeploy.setDeploymentId(deploymentEntity.getId());
dbSqlSession.insert(toDeploy);
Context.getProcessEngineConfiguration().getDeploymentCache().addProcessDefinition(toDeploy);
return null;
}
ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
I use my command this way:
((ProcessEngineConfigurationImpl) processEngineConfiguration).getCommandExecutorTxRequired().execute(
myDeployCommand);
12-18-2012 11:10 AM
12-18-2012 12:08 PM
Context
.getProcessEngineConfiguration()
.getDeploymentCache()
.addProcessDefinition(processDefinition);
12-18-2012 01:15 PM
My question is, why does it work when I use my process in the same process engine execution as my deployment, but does not work when I deploy my process, then start a new process engine, then try to use the previously deployed process (which does appear in the database)?
Maybe you could give me more info as to when/how the DeploymentCache is initialized with the already deployed process definitions when the process engine is started?
12-19-2012 03:33 AM
12-19-2012 03:38 AM
Is there already a functionality to write the bpmn file from the process definition entity, or is it only the other way around and I should write my own xml writer?
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.