09-26-2014 10:14 AM
09-29-2014 03:02 AM
09-29-2014 05:04 AM
@Deployment(resources = { ExecuteMultiinstanceSubprocess.bpmn" })
public void test_ExecuteMultiSubprocess_should_acess_instance_elementvariable()
{
Map<String, Object> variables = new HashMap<String, Object>();
List<String> collectionVariables = new ArrayList<String>();
collectionVariables.add("elementVariable1");
collectionVariables.add("elementVariable2");
collectionVariables.add("elementVariable3");
variables.put("collectionVariables", collectionVariables);
ProcessInstance process = activitiRule.getRuntimeService().startProcessInstanceByKey("processAcsessSubprocessMultiinstanceVariable", variables);
List<Execution> subProccesInstances = activitiRule
.getRuntimeService()
.createExecutionQuery()
.activityId("subprocessMultiinstance")
.processInstanceId(process.getProcessInstanceId())
.list();
Assertions.assertThat(subProccesInstances.size()).as("number of parallel sub-processes instances").isEqualTo(3);
String elementVariable1 = (String) activitiRule.getRuntimeService().getVariable(subProccesInstances.get(0).getId(), "elementVariable");
Assertions.assertThat(elementVariable1).as("elementVariable should be elementVariable1 but get null").isEqualTo("elementVariable1");
}
09-30-2014 03: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.