05-06-2016 08:46 PM
<startEvent id="startevent1" name="Start">
<extensionElements>
<activiti:formProperty id="customerName" name="Name" type="string" required="true"></activiti:formProperty>
<activiti:formProperty id="customerEmail" name="email" type="string" required="true"></activiti:formProperty>
<activiti:formProperty id="trainingTopic" name="Topic for Training" type="string" required="true"></activiti:formProperty>
<activiti:formProperty id="trainingDate" name="Training Date" type="date" datePattern="dd-MM-yy" required="true"></activiti:formProperty>
<activiti:formProperty id="loopCounter" name="Contador" type="long"></activiti:formProperty>
</extensionElements>
</startEvent>
<userTask id="usertask1" name="Business Development Executive" activiti:assignee="gonzo">
<extensionElements>
<activiti:formProperty id="custName" name="Customer Name" type="string" expression="${customerName}" writable="false"></activiti:formProperty>
<activiti:formProperty id="trainTopic" name="Training Topic" type="string" expression="${trainingTopic}" writable="false"></activiti:formProperty>
<activiti:formProperty id="trainDate" name="Training Date" type="date" expression="${trainingDate}" datePattern="dd-MM-yy" writable="false"></activiti:formProperty>
<activiti:formProperty id="trainerName" name="Trainer Name" type="string" required="true"></activiti:formProperty>
<activiti:formProperty id="trainerMailId" name="Trainer ID" type="string" required="true"></activiti:formProperty>
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="true">
<loopCardinality>${loopCounter}</loopCardinality>
</multiInstanceLoopCharacteristics>
</userTask>
User Task Should not be signalled before complete
05-09-2016 07:51 PM
05-10-2016 04:35 AM
05-12-2016 06:03 PM
05-15-2016 08:34 AM
05-15-2016 12:04 PM
loopCounter
is reserved key word by default (see doc). You have two options:
public void test() {
Date date = new Date();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("customerName", "Calimba");
variables.put("customerEmail",
"kecondezo@gmail.com");
variables.put("trainingTopic", "Activiti");
variables.put("trainingDate", date);
variables.put("trainerName", "Kennyman");
variables.put("trainerMailId","kecondezo@gmail.com");
variables.put("loopC",5);
//ProcessInstance processInstance = activitiRule.getRuntimeService().startProcessInstanceByKey("my-process");
ProcessInstance processInstance = activitiRule.getRuntimeService().startProcessInstanceByKey("trainingProcess", variables);
assertNotNull(processInstance);
Task task = activitiRule.getTaskService().createTaskQuery().singleResult();
assertEquals("Business Development Executive", task.getName());
}
<multiInstanceLoopCharacteristics isSequential="true">
<loopCardinality>${loopC}</loopCardinality>
</multiInstanceLoopCharacteristics>
05-15-2016 01:50 PM
05-15-2016 03:47 PM
ProcessInstance processInstance = activitiRule.getRuntimeService().startProcessInstanceByKey("trainingProcess", variables);
05-15-2016 07:53 PM
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.