11-15-2010 01:28 AM
<process id="usecase_indexer_createwidget" name="Indexer Usecase">
<startEvent id="StartNoneEvent_2" activiti:form="org/activiti/examples/task/search_document.form"/>
<task name="Search Document on First Name, Last Name, SSN" id="searchdoc_on_fn_ln"/>
<task name="Push to Allocate" id="push_to_allocate"/>
<task name="Append Document to Existing Widget" id="append_doc_to_existing_widget"/>
<task name="Create Widget with FN, LN, SSN, and Networth as IndexFields"
activiti:form="org/activiti/examples/task/create_widget.form"
id="create_widget"/>
<exclusiveGateway gatewayDirection="Diverging" name="Document Exists?" id="is_document_existing"/>
<sequenceFlow targetRef="searchdoc_on_fn_ln" sourceRef="StartNoneEvent_2" id="SequenceFlow_3"/>
<sequenceFlow targetRef="is_document_existing" sourceRef="searchdoc_on_fn_ln" id="SequenceFlow_1"/>
<sequenceFlow targetRef="append_doc_to_existing_widget" sourceRef="is_document_existing" id="SequenceFlow_2">
<conditionExpression xsi:type="tFormalExpression" >${doc_found}</conditionExpression>
</sequenceFlow>
<sequenceFlow targetRef="create_widget" sourceRef="is_document_existing" id="SequenceFlow_4">
<conditionExpression xsi:type="tFormalExpression" >${!doc_found}</conditionExpression>
</sequenceFlow>
<sequenceFlow targetRef="push_to_allocate" sourceRef="append_doc_to_existing_widget" id="SequenceFlow_5"/>
<sequenceFlow targetRef="push_to_allocate" sourceRef="create_widget" id="SequenceFlow"/>
</process>
</definitions>
// Get start form
Object startForm = taskService.getRenderedStartFormByKey("usecase_indexer_createwidget");
assertNotNull(startForm);
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
assertEquals("org/activiti/examples/task/search_document.form", processDefinition.getStartFormResourceKey());
System.out.println("Start search form … "+ startForm);
// Define variables that would be filled in through the form
Map<String, Object> variables = new HashMap<String, Object>();
String fname = "app_fn";
String lname="app_ln";
variables.put("firstName", fname);
variables.put("lastName", lname);
variables.put("doc_found", Boolean.FALSE);
ProcessInstance pi = runtimeService.startProcessInstanceByKey("usecase_indexer_createwidget", variables);
//List<Task> tasks = query.list();
System.out.println("List of Tasks "+taskService.createTaskQuery()
.processInstanceId(pi.getId()).list());11-15-2010 02:58 AM
11-15-2010 03:12 AM
11-15-2010 03:38 AM
11-15-2010 03:48 AM
11-15-2010 04:11 AM
11-15-2010 04:18 AM
11-15-2010 04:30 AM
11-15-2010 02:55 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.