10-30-2013 02:39 PM
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions"
targetNamespace="http://activiti.org/bpmn20"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn">
<process id="ResultAndExceptionTest">
<startEvent id="start"/>
<sequenceFlow id="_1" sourceRef="start" targetRef="putValue"/>
<sequenceFlow id="_2" sourceRef="putValue" targetRef="printValue"/>
<sequenceFlow id="_end" sourceRef="printValue" targetRef="end"/>
<scriptTask id="putValue"
scriptFormat="groovy"
activiti:async="true">
<script>
def map = execution.getVariable( 'references' )
map.put( 'myValue1', 'asdf' )
execution.setVariable( 'references', map )
</script>
</scriptTask>
<scriptTask id="printValue"
scriptFormat="groovy">
<script>
def map = execution.getVariable( 'references' )
map.put( 'myValue2', 'asdf' )
execution.setVariable( 'references', map )
throw new IllegalArgumentException("whoops")
</script>
</scriptTask>
<endEvent id="end"/>
</process>
</definitions>
List<HistoricProcessInstance> results = historyService.createHistoricProcessInstanceQuery()
.includeProcessVariables()
.processInstanceBusinessKey( context.jobId )
.list()
10-31-2013 02:44 AM
10-31-2013 08:46 PM
11-01-2013 03:35 AM
What's the best way via the HistoryService (or another service) to determine if a process has failed?
I want to be able to retrieve process variables from a process if it failed.HistoryService, RuntimeService?
11-02-2013 04:08 PM
11-05-2013 08:15 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.