What's up guys?I need your help for my first try to deploy a process. I try to implement the example from activiti user guide.I run my code with Eclipse IDE and there is no errors. Despite that, in activiti explorer i can't see my process. What is happening??My code is :
public static void main(String[] args) {
// TODO Auto-generated method stub
ProcessEngine processEngine = null;
ProcessEngineConfiguration processConfig= null;
//Create Activiti process engine
processConfig = ProcessEngineConfiguration
.createStandaloneProcessEngineConfiguration();
processEngine = processConfig.buildProcessEngine();
//Get Activiti services
RepositoryService repositoryService = processEngine.getRepositoryService();
RuntimeService runtimeService = processEngine.getRuntimeService();
//Deploy the process definition
repositoryService.createDeployment()
.addClasspathResource("diagrams/FinancialReportProcess.bpmn20.xml")
.deploy();
//Start a process instance
runtimeService.startProcessInstanceByKey("financialReport");
and for my process the xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
targetNamespace="http://activiti.org/bpmn20"
xmlns:activiti="http://activiti.org/bpmn"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">
<process id="financialReport" name="Monthly financial report reminder process">
<startEvent id="theStart" />
<sequenceFlow id='flow1' sourceRef='theStart' targetRef='writeReportTask' />
<userTask id="writeReportTask" name="Write monthly financial report" >
<documentation>
Write monthly financial report for publication to shareholders.
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>accountancy</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id='flow2' sourceRef='writeReportTask' targetRef='verifyReportTask' />
<userTask id="verifyReportTask" name="Verify monthly financial report" >
<documentation>
Verify monthly financial report composed by the accountancy department.
This financial report is going to be sent to all the company shareholders.
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id='flow3' sourceRef='verifyReportTask' targetRef='theEnd' />
<endEvent id="theEnd" />
</process>
</definitions>