cancel
Showing results for 
Search instead for 
Did you mean: 

I can't deploy my process

activititest
Champ in-the-making
Champ in-the-making
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>



3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Did you deploy the process?

Regards
Martin

No… That is my final purpose. I want to deploy it but i can't. By activiti example it should already be deployed, after my run code

activititest
Champ in-the-making
Champ in-the-making
I found the solution for deployment.
I should have written
<java>
processConfig = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration()
     .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
     .setJdbcUrl("jdbc:h2:tcp://localhost/activiti")
     .setJdbcUsername("sa")
     .setJdbcPassword("")
     .setAsyncExecutorEnabled(true)
     .setAsyncExecutorActivate(false);
</java>
Getting started

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.