<?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 Activiti 5.16 to Activiti 6.x migration ServiceTask in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/activiti-5-16-to-activiti-6-x-migration-servicetask/m-p/7855#M3561</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;We want to migrate activiti from 5.16 to 6.x version and I need an solution for Service Task implementation where we have more than one sequence flow.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;public class ThrowsExceptionBehavior implements ActivityBehavior {&lt;/P&gt;&lt;P&gt;public void execute(ActivityExecution execution) throws Exception {&lt;BR /&gt;String var = (String) execution.getVariable("var");&lt;/P&gt;&lt;P&gt;PvmTransition transition = null;&lt;BR /&gt;try {&lt;BR /&gt;executeLogic(var);&lt;BR /&gt;if("a".equals(var)){&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("a");&lt;BR /&gt;}else if("b".equals(var)){&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("b");&lt;BR /&gt;}&lt;BR /&gt;else if("c".equals(var)){&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("c");&lt;BR /&gt;}&lt;BR /&gt;else{&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("no-exception");&lt;BR /&gt;}&lt;BR /&gt;} catch (Exception e) {&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("exception");&lt;BR /&gt;}&lt;BR /&gt;execution.take(transition);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;In activiti 6 PvmTransition is no more valid and execution.take(transition) api also not available.&lt;/P&gt;&lt;P&gt;What can be the possible solution that the same code will work for old version of processdefinition 5.16 and works in new version 6.x also.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2020 13:27:45 GMT</pubDate>
    <dc:creator>manojkumarurs</dc:creator>
    <dc:date>2020-10-30T13:27:45Z</dc:date>
    <item>
      <title>Activiti 5.16 to Activiti 6.x migration ServiceTask</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/activiti-5-16-to-activiti-6-x-migration-servicetask/m-p/7855#M3561</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;We want to migrate activiti from 5.16 to 6.x version and I need an solution for Service Task implementation where we have more than one sequence flow.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;public class ThrowsExceptionBehavior implements ActivityBehavior {&lt;/P&gt;&lt;P&gt;public void execute(ActivityExecution execution) throws Exception {&lt;BR /&gt;String var = (String) execution.getVariable("var");&lt;/P&gt;&lt;P&gt;PvmTransition transition = null;&lt;BR /&gt;try {&lt;BR /&gt;executeLogic(var);&lt;BR /&gt;if("a".equals(var)){&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("a");&lt;BR /&gt;}else if("b".equals(var)){&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("b");&lt;BR /&gt;}&lt;BR /&gt;else if("c".equals(var)){&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("c");&lt;BR /&gt;}&lt;BR /&gt;else{&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("no-exception");&lt;BR /&gt;}&lt;BR /&gt;} catch (Exception e) {&lt;BR /&gt;transition = execution.getActivity().findOutgoingTransition("exception");&lt;BR /&gt;}&lt;BR /&gt;execution.take(transition);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;In activiti 6 PvmTransition is no more valid and execution.take(transition) api also not available.&lt;/P&gt;&lt;P&gt;What can be the possible solution that the same code will work for old version of processdefinition 5.16 and works in new version 6.x also.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 13:27:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/activiti-5-16-to-activiti-6-x-migration-servicetask/m-p/7855#M3561</guid>
      <dc:creator>manojkumarurs</dc:creator>
      <dc:date>2020-10-30T13:27:45Z</dc:date>
    </item>
  </channel>
</rss>

