Hi Tijs,
I am deploying :
getRepositoryService().createDeployment()
.addClasspathResource("resources/tpmbda.bpmn20.xml").deploy();
ProcessInstance processInstance = getRuntimeService().startProcessInstanceByKey("tpmbda");
It working fine for initial restart of my server (added Activiti engine in my application).
If I restart the my server then (above statements are not executing):
But I am trying get the task definition:
getRepositoryService().createDeployment().addClasspathResource("resources/tpmbda.bpmn20.xml").deploy();
Task task = getTaskbyId(MSDIUtil.getUserName(), taskid);
ProcessDefinition processDefinition = getRepositoryService().createProcessDefinitionQuery()
.processDefinitionId(task.getProcessDefinitionId()).singleResult();
Map<String, String> formProperties =
new HashMap<String, String>();
formProperties.put("remarks", remarks);
formProperties.put("requestApproved", requestApproved);
getFormService().submitTaskFormData(taskid, formProperties);
It is throwing following exception:
Nov 11, 2012 7:41:50 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource resources/tpmbda.bpmn20.xml
Nov 11, 2012 7:41:50 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.activiti.engine.ActivitiException: couldn't parse 'resources/tpmbda.bpmn20.xml': Content is not allowed in prolog.
at org.activiti.engine.impl.util.xml.Parse.execute(Parse.java:136)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:210)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:38)
at org.activiti.engine.impl.persistence.deploy.DeploymentCache.resolveProcessDefinition(DeploymentCache.java:91)
at org.activiti.engine.impl.persistence.deploy.DeploymentCache.findDeployedProcessDefinitionById(DeploymentCache.java:53)
Please can you help me to fix this issue.
Regards
Bhimanna