Petals-SE-Activiti 1.0.3+

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (6)

View Page History

First, you must embedd an Activiti engine for your test, adding an dependency on it with scope {{test}} into your POM file. Don't forget to add also the JDBC driver, H2 for example:
{code:xml}
<project>
...
<dependencies>
...
<dependency>
<groupId>org.ow2.petals.activiti</groupId>
<scope>test</scope>
</dependency>
...
</dependencies>
...
</project>
{code}
{tip}Caution to use the same version of the Activiti engine as the one embedded into the Petals SE Activiti{tip}

Next, your database must be linked to the Activiti engine through a Spring configuration located into the file {{src/test/resources/activiti.cfg.xml}} containing something like:
{code:xml}
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

So, with this, you will be able to test the deployment of your process definition and check process instance creations using the Activiti JUnit framework:
{code:java}
public class ProcessDeploymentTest {


If your process definition includes Petals service invocations, you must use mocks for these services. These mocks can be SoapUI mock services invoked as standard web-services, using HTTP/SOAP. The URLs of these mock services must be mapped on the endpoint names define in service provider WSDLs used in the process definition. The mapping is declared in the Spring configuration file as following:
{code:xml}
<bean id="archiveEndpoint" class="javax.xml.namespace.QName">
<constructor-arg index="0" value="http://petals.ow2.org/samples/se-bpmn/archiveService" />