<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue sending a signal in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/issue-sending-a-signal/m-p/27253#M11725</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;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"&amp;gt;
  &amp;lt;signal id="mySignal" name="mySignalName" /&amp;gt;
  &amp;lt;process id="myProcess" name="My process" isExecutable="true"&amp;gt;
    ...
    &amp;lt;userTask id="usertask1" name="Task 1" activiti:assignee="${initiator.properties.username}"&amp;gt;
      &amp;lt;extensionElements&amp;gt;
        &amp;lt;activiti:formProperty id="taskValue1" name="Task Value 1" type="string"&amp;gt;&amp;lt;/activiti:formProperty&amp;gt;
      &amp;lt;/extensionElements&amp;gt;
    &amp;lt;/userTask&amp;gt;
    &amp;lt;sequenceFlow id="flow2" sourceRef="scripttask1" targetRef="usertask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;
    &amp;lt;boundaryEvent id="boundarysignal1" name="Signal" attachedToRef="usertask1" cancelActivity="true"&amp;gt;
      &amp;lt;signalEventDefinition signalRef="mySignal" /&amp;gt;
    &amp;lt;/boundaryEvent&amp;gt;
    &amp;lt;sequenceFlow id="flow4" sourceRef="boundarysignal1" targetRef="scripttask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;
    ...
  &amp;lt;/process&amp;gt;
  &amp;lt;bpmndi:BPMNDiagram id="BPMNDiagram_myProcess"&amp;gt;
    ...
  &amp;lt;/bpmndi:BPMNDiagram&amp;gt;
&amp;lt;/definitions&amp;gt;&lt;/PRE&gt;&lt;P&gt;Here is the process diagram:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="myProcess.png" style="width: 595px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/168i9977B381D1E3BFC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have a service which is called from a webscript, the definition in service-context.xml is:&lt;/P&gt;&lt;PRE&gt;&amp;lt;bean id="myActivitiUtil" class="com.someco.bean.MyActivitiUtil"&amp;gt;
    &amp;lt;property name="runtimeService" ref="activitiRuntimeService" /&amp;gt;
&amp;lt;/bean&amp;gt;&lt;/PRE&gt;&lt;P&gt;So far so good, the runtimeService correctly retrieves me the only instance I have with the boundary event, with;&lt;/P&gt;&lt;PRE&gt;List&amp;lt;Execution&amp;gt; executions = runtimeService.createExecutionQuery().signalEventSubscriptionName(signal).list();
for (Execution execution : executions) {
    ...
}&lt;/PRE&gt;&lt;P&gt;The problem is when inside the loop I call:&lt;/P&gt;&lt;PRE&gt;runtimeService.signalEventReceived(signal, execution.getId());&lt;/PRE&gt;&lt;P&gt;I get the error:&lt;/P&gt;&lt;PRE&gt;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)
...&lt;/PRE&gt;&lt;P&gt;Any help would be much appreciate. Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2020 18:48:19 GMT</pubDate>
    <dc:creator>jperejor</dc:creator>
    <dc:date>2020-01-06T18:48:19Z</dc:date>
    <item>
      <title>Issue sending a signal</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/issue-sending-a-signal/m-p/27253#M11725</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;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"&amp;gt;
  &amp;lt;signal id="mySignal" name="mySignalName" /&amp;gt;
  &amp;lt;process id="myProcess" name="My process" isExecutable="true"&amp;gt;
    ...
    &amp;lt;userTask id="usertask1" name="Task 1" activiti:assignee="${initiator.properties.username}"&amp;gt;
      &amp;lt;extensionElements&amp;gt;
        &amp;lt;activiti:formProperty id="taskValue1" name="Task Value 1" type="string"&amp;gt;&amp;lt;/activiti:formProperty&amp;gt;
      &amp;lt;/extensionElements&amp;gt;
    &amp;lt;/userTask&amp;gt;
    &amp;lt;sequenceFlow id="flow2" sourceRef="scripttask1" targetRef="usertask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;
    &amp;lt;boundaryEvent id="boundarysignal1" name="Signal" attachedToRef="usertask1" cancelActivity="true"&amp;gt;
      &amp;lt;signalEventDefinition signalRef="mySignal" /&amp;gt;
    &amp;lt;/boundaryEvent&amp;gt;
    &amp;lt;sequenceFlow id="flow4" sourceRef="boundarysignal1" targetRef="scripttask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;
    ...
  &amp;lt;/process&amp;gt;
  &amp;lt;bpmndi:BPMNDiagram id="BPMNDiagram_myProcess"&amp;gt;
    ...
  &amp;lt;/bpmndi:BPMNDiagram&amp;gt;
&amp;lt;/definitions&amp;gt;&lt;/PRE&gt;&lt;P&gt;Here is the process diagram:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="myProcess.png" style="width: 595px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/168i9977B381D1E3BFC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have a service which is called from a webscript, the definition in service-context.xml is:&lt;/P&gt;&lt;PRE&gt;&amp;lt;bean id="myActivitiUtil" class="com.someco.bean.MyActivitiUtil"&amp;gt;
    &amp;lt;property name="runtimeService" ref="activitiRuntimeService" /&amp;gt;
&amp;lt;/bean&amp;gt;&lt;/PRE&gt;&lt;P&gt;So far so good, the runtimeService correctly retrieves me the only instance I have with the boundary event, with;&lt;/P&gt;&lt;PRE&gt;List&amp;lt;Execution&amp;gt; executions = runtimeService.createExecutionQuery().signalEventSubscriptionName(signal).list();
for (Execution execution : executions) {
    ...
}&lt;/PRE&gt;&lt;P&gt;The problem is when inside the loop I call:&lt;/P&gt;&lt;PRE&gt;runtimeService.signalEventReceived(signal, execution.getId());&lt;/PRE&gt;&lt;P&gt;I get the error:&lt;/P&gt;&lt;PRE&gt;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)
...&lt;/PRE&gt;&lt;P&gt;Any help would be much appreciate. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 18:48:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/issue-sending-a-signal/m-p/27253#M11725</guid>
      <dc:creator>jperejor</dc:creator>
      <dc:date>2020-01-06T18:48:19Z</dc:date>
    </item>
  </channel>
</rss>

