07-24-2014 04:29 PM
ProcessDefinition processDefinition = repositoryService
.createProcessDefinitionQuery()
.processDefinitionKey("invoice")
.singleResult();
Map<String, String> formProperties = new HashMap<String, String>();
formProperties.put("key", value);
ProcessInstance processInstance = formService
.submitStartFormData(processDefinition.getId(), formProperties);
com.vaadin.event.ListenerMethod$MethodException: Invocation of method valueChange in org.activiti.explorer.ui.process.ProcessInstancePage$1 failed.
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
…
Caused by: java.lang.NullPointerException
at org.activiti.explorer.ui.management.processinstance.ProcessInstanceDetailPanel.<init>(ProcessInstanceDetailPanel.java:107)
at org.activiti.explorer.ui.process.ProcessInstancePage$1.valueChange(ProcessInstancePage.java:60)
at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
… 33 more
java.lang.NullPointerException
at org.activiti.rest.diagram.services.ProcessInstanceHighlightsResource.getHighlighted(ProcessInstanceHighlightsResource.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
07-25-2014 04:11 AM
08-19-2014 06:53 AM
08-20-2014 10:39 AM
08-20-2014 11:04 AM
08-21-2014 05:34 AM
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
<process id="sleepSeries" name="Sleep Series" isExecutable="true">
<startEvent id="startEvent"/>
<scriptTask id="sleep1" name="Sleep 1" activiti:async="true" activiti:exclusive="false" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>Thread.sleep(10000)</script>
</scriptTask>
<scriptTask id="sleep2" name="Sleep 2" activiti:async="true" activiti:exclusive="false" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>Thread.sleep(10000)</script>
</scriptTask>
<scriptTask id="sleep3" name="Sleep 3" activiti:async="true" activiti:exclusive="false" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>Thread.sleep(10000)</script>
</scriptTask>
<scriptTask id="sleep4" name="Sleep 4" activiti:async="true" activiti:exclusive="false" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>Thread.sleep(10000)</script>
</scriptTask>
<endEvent id="sid-0BD85755-4505-4802-BE88-0F2BE37B0074"/>
<sequenceFlow id="sid-A245CE56-5A98-41F4-9CBF-E5CDD9C4CA70" sourceRef="startEvent" targetRef="sleep1"/>
<sequenceFlow id="sid-8D30CB86-6C2A-4E40-BC11-CDFF536A8AC4" sourceRef="sleep1" targetRef="sleep2"/>
<sequenceFlow id="sid-35BD5D2C-1FE2-4B49-AA2E-DFD3A82F71D7" sourceRef="sleep2" targetRef="sleep3"/>
<sequenceFlow id="sid-276DE07B-B7F4-46E4-BFFB-2A02DC2D069F" sourceRef="sleep3" targetRef="sleep4"/>
<sequenceFlow id="sid-2ABFDEB2-CB75-4846-A00A-49586EA0CE2F" sourceRef="sleep4" targetRef="sid-0BD85755-4505-4802-BE88-0F2BE37B0074"/>
</process>
</definitions>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="exampleProcessLauncher" name="Example Process Launcher" isExecutable="true">
<startEvent id="startEvent" name="Start" activiti:initiator="initiator">
<extensionElements>
<activiti:formProperty id="cardinality" name="Cardinality" type="long" required="true"></activiti:formProperty>
</extensionElements>
</startEvent>
<sequenceFlow id="flow1" sourceRef="startEvent" targetRef="parseInputs"></sequenceFlow>
<scriptTask id="parseInputs" name="Parse Policy IDs" activiti:async="true" activiti:exclusive="false" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>
<![CDATA[
// this step normally parses user inputs
]]>
</script>
</scriptTask>
<sequenceFlow id="flow2" sourceRef="parseInputs" targetRef="launchProcesses"></sequenceFlow>
<serviceTask id="launchProcesses" name="Service Task" activiti:async="true" activiti:exclusive="false" activiti:class="examples.ExampleProcessLauncher">
<multiInstanceLoopCharacteristics isSequential="false">
<loopCardinality>${cardinality}</loopCardinality>
</multiInstanceLoopCharacteristics>
</serviceTask>
<sequenceFlow id="flow3" sourceRef="launchProcesses" targetRef="endevent1"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
</process>
</definitions>
package examples;
import org.activiti.engine.FormService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
public class ExampleProcessLauncher implements JavaDelegate {
private static final Logger log = LoggerFactory.getLogger(ExampleProcessLauncher.class);
@Override
public void execute(DelegateExecution execution) throws Exception {
RepositoryService repositoryService = execution.getEngineServices().getRepositoryService();
FormService formService = execution.getEngineServices().getFormService();
IdentityService identityService = execution.getEngineServices().getIdentityService();
String initiator = (String) execution.getVariable("initiator");
identityService.setAuthenticatedUserId(initiator);
ProcessDefinition processDefinition = repositoryService
.createProcessDefinitionQuery()
.processDefinitionKey("sleepSeries")
.latestVersion()
.singleResult();
Map<String, String> formProperties = new HashMap<>();
ProcessInstance processInstance = formService
.submitStartFormData(processDefinition.getId(), formProperties);
}
}
08-22-2014 05:59 AM
08-30-2014 01:00 PM
09-02-2014 03:59 PM
09-03-2014 07:17 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.