01-06-2020 01:48 PM
Hi,
I'm making tests locally with "AIO - SDK 4.0". I want to cancel a user task after receiving a signal, this is a snippet of the bpmn:
<?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" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="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"> <signal id="mySignal" name="mySignalName" /> <process id="myProcess" name="My process" isExecutable="true"> ... <userTask id="usertask1" name="Task 1" activiti:assignee="${initiator.properties.username}"> <extensionElements> <activiti:formProperty id="taskValue1" name="Task Value 1" type="string"></activiti:formProperty> </extensionElements> </userTask> <sequenceFlow id="flow2" sourceRef="scripttask1" targetRef="usertask1"></sequenceFlow> <boundaryEvent id="boundarysignal1" name="Signal" attachedToRef="usertask1" cancelActivity="true"> <signalEventDefinition signalRef="mySignal" /> </boundaryEvent> <sequenceFlow id="flow4" sourceRef="boundarysignal1" targetRef="scripttask1"></sequenceFlow> ... </process> <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess"> ... </bpmndi:BPMNDiagram> </definitions>
Here is the process diagram:
I have a service which is called from a webscript, the definition in service-context.xml is:
<bean id="myActivitiUtil" class="com.someco.bean.MyActivitiUtil"> <property name="runtimeService" ref="activitiRuntimeService" /> </bean>
So far so good, the runtimeService correctly retrieves me the only instance I have with the boundary event, with;
List<Execution> executions = runtimeService.createExecutionQuery().signalEventSubscriptionName(signal).list(); for (Execution execution : executions) { ... }
The problem is when inside the loop I call:
runtimeService.signalEventReceived(signal, execution.getId());
I get the error:
content-tutorial-acs_1 | 2020-01-06 16:22:19,763 ERROR [impl.interceptor.CommandContext] [http-nio-8080-exec-3] Error while closing command context content-tutorial-acs_1 | org.apache.ibatis.exceptions.PersistenceException: content-tutorial-acs_1 | ### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class java.util.ArrayList with invalid types () or values (). Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers") content-tutorial-acs_1 | ### The error may exist in org/activiti/db/mapping/entity/HistoricVariableInstance.xml content-tutorial-acs_1 | ### The error may involve org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId content-tutorial-acs_1 | ### The error occurred while handling results content-tutorial-acs_1 | ### SQL: select * from ACT_HI_VARINST where ID_ = ? content-tutorial-acs_1 | ### Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class java.util.ArrayList with invalid types () or values (). Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers") content-tutorial-acs_1 | at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ...
Any help would be much appreciate. Thanks.
Explore our Alfresco products with the links below. Use labels to filter content by product module.