<?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 RuntimeService APSv24.3 doesn't backward compatible in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/runtimeservice-apsv24-3-doesn-t-backward-compatible/m-p/484685#M39619</link>
    <description>&lt;P&gt;hi all, trying to solve a problem after migration from 1.11 to 24.3.&lt;/P&gt;&lt;P&gt;we have a custom delegates (for example InitiateProcessVariableDelegate) in which we injected RuntimeService interface (real type RuntimeServiceImplAPS) and trying to save variables.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;public void &lt;/SPAN&gt;&lt;SPAN&gt;execute&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DelegateExecution execution&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;runtimeService&lt;/SPAN&gt;.setVariable&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;execution&lt;/SPAN&gt;.getProcessInstanceId&lt;SPAN&gt;()&lt;/SPAN&gt;, &lt;SPAN&gt;"test"&lt;/SPAN&gt;, &lt;SPAN&gt;"newContentId"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I know that we can use&amp;nbsp;&lt;SPAN&gt;execution.setVariable(...) but sometimes in other delegates it's not possible...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;when our process is starting, before first User Task we have the Service Task invoking below delegate bean, but when process starts on activiti-5 definition it throw an exception&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;ActivitiObjectNotFoundException execution does not exist&lt;/PRE&gt;&lt;P&gt;it happens because despite the fact that that&amp;nbsp;RuntimeServiceImplAPS creating SetExecutionVariablesCmdAPS which has a logic to identify Activiti version his parent class&amp;nbsp;NeedsActiveExecutionCmd trying to find execution in v8 context. This is strange bug, because v8 context doesn't knows nothing about the newly created execution,&amp;nbsp;which is still in process and does not flushed to DB&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 20 Nov 2024 13:03:34 GMT</pubDate>
    <dc:creator>vnosach</dc:creator>
    <dc:date>2024-11-20T13:03:34Z</dc:date>
    <item>
      <title>RuntimeService APSv24.3 doesn't backward compatible</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/runtimeservice-apsv24-3-doesn-t-backward-compatible/m-p/484685#M39619</link>
      <description>&lt;P&gt;hi all, trying to solve a problem after migration from 1.11 to 24.3.&lt;/P&gt;&lt;P&gt;we have a custom delegates (for example InitiateProcessVariableDelegate) in which we injected RuntimeService interface (real type RuntimeServiceImplAPS) and trying to save variables.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;public void &lt;/SPAN&gt;&lt;SPAN&gt;execute&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DelegateExecution execution&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;runtimeService&lt;/SPAN&gt;.setVariable&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;execution&lt;/SPAN&gt;.getProcessInstanceId&lt;SPAN&gt;()&lt;/SPAN&gt;, &lt;SPAN&gt;"test"&lt;/SPAN&gt;, &lt;SPAN&gt;"newContentId"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I know that we can use&amp;nbsp;&lt;SPAN&gt;execution.setVariable(...) but sometimes in other delegates it's not possible...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;when our process is starting, before first User Task we have the Service Task invoking below delegate bean, but when process starts on activiti-5 definition it throw an exception&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;ActivitiObjectNotFoundException execution does not exist&lt;/PRE&gt;&lt;P&gt;it happens because despite the fact that that&amp;nbsp;RuntimeServiceImplAPS creating SetExecutionVariablesCmdAPS which has a logic to identify Activiti version his parent class&amp;nbsp;NeedsActiveExecutionCmd trying to find execution in v8 context. This is strange bug, because v8 context doesn't knows nothing about the newly created execution,&amp;nbsp;which is still in process and does not flushed to DB&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Nov 2024 13:03:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/runtimeservice-apsv24-3-doesn-t-backward-compatible/m-p/484685#M39619</guid>
      <dc:creator>vnosach</dc:creator>
      <dc:date>2024-11-20T13:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService APSv24.3 doesn't backward compatible</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/runtimeservice-apsv24-3-doesn-t-backward-compatible/m-p/484686#M39620</link>
      <description>&lt;P&gt;As a solution we trying to replace all usages of only one RuntimeService injection to two implementations&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;org.activiti5.engine.RuntimeService&lt;BR /&gt;and&lt;BR /&gt;org.activiti.engine.RuntimeService&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;or using own adapters and v5 Context with v8 Context&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Nov 2024 13:11:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/runtimeservice-apsv24-3-doesn-t-backward-compatible/m-p/484686#M39620</guid>
      <dc:creator>vnosach</dc:creator>
      <dc:date>2024-11-20T13:11:49Z</dc:date>
    </item>
  </channel>
</rss>

