In meinem Projekt gibt es eine bestehende old.jpdl.xml-Definition. Es funktioniert gut. Jetzt möchte ich eine andere new.jpdl.xml-Definition ausführen. Nach der Bereitstellung der EAR-Datei habe ich versucht, new.jpdl.xml mit neuer ProcessDefinitionId mit Hilfe von unten Code zu lesen.Wie bekomme ich ProcessDefinition mit jpdl für JBPM 4.4?
Ich glaube, dass ich Deployment-Schritte vermisse. Kann mir jemand sagen, wie man new.jpdl.xml bereitstellt oder liest?
public String getProcessInstanceID(ProcessEngine processEngine,
FlowControl flowcontrol, String processDefinitionID)
{
String processInstanceID = null;
log.debug("Entering method - getProcessInstanceID");
ProcessDefinitionQuery pdq = processEngine.getRepositoryService()
.createProcessDefinitionQuery();
pdq.deploymentId(processDefinitionID);
ProcessDefinition procDef = pdq.uniqueResult();
if (null == procDef)
{
log.error("Process Definition could not be found for the deployment ID: "
+ processDefinitionID);
}
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("flowcontrol", flowcontrol);
ProcessInstance processInstance = processEngine.getExecutionService()
.startProcessInstanceByKey(procDef.getKey(), variables);
log.debug("Process Instance ID:" + processInstance.getId());
processInstanceID = processInstance.getId();
log.debug("Exiting method - getProcessInstanceID");
return processInstanceID;
}
Es scheint, als würde Ihre Frage hier nicht viele Ansichten bekommen. Sie können versuchen, im [Offiziellen JBPM-Forum] (https://developer.jboss.org/en/jbpm/content) Fragen zu stellen. – Mike
Hallo Mike, ich habe die Lösung dieses Problems. Danke für die Hilfe. Ich werde dieses Forum für andere Fragen verwenden. –