08-11-2014 07:21 AM
public classProcessTest1 {
@Rule
public ActivitiRule engine = new ActivitiRule();
@Test
@Deployment (resources={"bpmn/processOne.bpmn20.xml"})
public void startProcessCopy() throws Exception {
RuntimeService runtimeService = engine.getRuntimeService();
ProcessInstance instance = runtimeService.startProcessInstanceByKey("processOne");
assertNotNull(instance.getId());
List<Task> taskList = engine.getTaskService().createTaskQuery().processInstanceId(instance.getId()).taskAssignee("kermit").list();
assertTrue(taskList.size()==1);
Map<String, String> params = new HashMap<String, String>();
params.put("numberOne", "900");
params.put("numberTwo", "700");
engine.getFormService().submitTaskFormData(taskList.get(0).getId(), params);
}
}
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="processEngineConfiguration"
class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"
>
<property name="jdbcUrl" value="jdbc:h2:mem:activitiTesting;DB_CLOSE_DELAY=10;FILE_LOCK=FS" />
<property name="jdbcDriver" value="org.h2.Driver" />
<property name="jdbcUsername" value="sa" />
<property name="jdbcPassword" value="" />
<property name="databaseSchemaUpdate" value="drop-create" />
<property name="jobExecutorActivate" value="true" />
</bean>
</beans>
08-19-2014 04:49 AM
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.