cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Engine Deployment

dimitarkostakev
Champ in-the-making
Champ in-the-making
Hi,
I am new to Activiti and do not understand the concept clearly.
My question is when we call from a JUnit test:

repositoryService.createDeployment().addInputStream("simpleProcess.bpmn20.xml",
            new FileInputStream(filename)).deploy();

what happens? - the process is being persisted in the repository - in this case H2 localhost instance.

Why isn't the process being visible in "http://localhost:8080/activiti-explorer/" when they are both using same repository H2 configuration?
4 REPLIES 4

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

They are not using the same H2 DB instance. You can configure it to use the same but I do not see any reason to do that.

Regards
Martin

dimitarkostakev
Champ in-the-making
Champ in-the-making
Please explain with more details why they are not using the same DB since the configuration is pointing to localhost

i.e.
     property name="databaseType" value="h2"
     property name="jdbcUrl" value="jdbc:h2:tcp://localhost/activiti"
     property name="jdbcDriver" value="org.h2.Driver"
     property name="jdbcUsername" value="sa"
     property name="jdbcPassword" value=""
     property name="databaseSchemaUpdate" value="true"

The http://localhost:8080/activiti-explorer/ is configured to use the same DB instance.

The reason I am asking is because I want to create a process from the Activiti Designer and deploy it in a repository and when I connect from the web modeller to be able to open the same process without the need to import it since they use the same DB instance.
Please give more information how to do that if supported.

redgee34
Champ in-the-making
Champ in-the-making
Do you have your process xml in your process engine config?
That would explain the duplicates, unless 'enableDuplicateFiltering' is set to true.

It compares the strings of the xml as-is.

jbarrez
Star Contributor
Star Contributor
If they are truly pointing to the same database, you should see the process definitions both in the unit test and in Explorer. There is no magic going on there. Did you check the H2 contents of the database with the H2 web viewer?