<?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 how to add a custom task listener through java code? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5100#M2457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm building the usertask and servicetask dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;default UserTask createUserTask(String id, String name, String assignee) {&lt;BR /&gt; UserTask userTask = new UserTask();&lt;BR /&gt; userTask.setName(name);&lt;BR /&gt; userTask.setId(id);&lt;BR /&gt; userTask.setAssignee(assignee);&lt;BR /&gt; return userTask;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;default ServiceTask createServiceTask(String id, String name, boolean asyn) {&lt;BR /&gt; ServiceTask serviceTask = new ServiceTask();&lt;BR /&gt; serviceTask.setName(name);&lt;BR /&gt; serviceTask.setId(id);&lt;BR /&gt; serviceTask.setAsynchronous(asyn);&lt;BR /&gt; ActivitiListener al = new ActivitiListener();&lt;/P&gt;&lt;P&gt;ExtensionAttribute ea = new ExtensionAttribute("activti", "abc");&lt;BR /&gt; // serviceTask.setExecutionListeners(executionListeners);&lt;BR /&gt; return serviceTask;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to add&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;activiti:taskListener event="create" class="com.xy.z.TaskAssignmentHandler"&amp;gt;&amp;lt;/activiti:taskListener&amp;gt;&lt;BR /&gt; &amp;lt;/extensionElements&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This dynamically using java code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2017 07:07:57 GMT</pubDate>
    <dc:creator>goutham_pn</dc:creator>
    <dc:date>2017-02-08T07:07:57Z</dc:date>
    <item>
      <title>how to add a custom task listener through java code?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5100#M2457</link>
      <description>I'm building the usertask and servicetask dynamicallydefault UserTask createUserTask(String id, String name, String assignee) { UserTask userTask = new UserTask(); userTask.setName(name); userTask.setId(id); userTask.setAssignee(assignee); return userTask; }default ServiceTask createServiceTask(Stri</description>
      <pubDate>Wed, 08 Feb 2017 07:07:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5100#M2457</guid>
      <dc:creator>goutham_pn</dc:creator>
      <dc:date>2017-02-08T07:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a custom task listener through java code?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5101#M2458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Goutham P N,&lt;/P&gt;&lt;P&gt;this should resolve your issue:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;ActivitiListener activitiListener = new ActivitiListener();&lt;/P&gt;&lt;P&gt;activitiListener.setEvent("create");&lt;BR /&gt; activitiListener.setImplementation("com.xy.z.TaskAssignmentHandler");&lt;BR /&gt; activitiListener.setImplementationType("class");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Now you just have to add it to the service task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niklas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 07:54:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5101#M2458</guid>
      <dc:creator>nikmenke</dc:creator>
      <dc:date>2017-02-08T07:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a custom task listener through java code?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5102#M2459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Niklas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about adding expressions? something like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;serviceTask id="st-approve-action" name="Approve Action" activiti:expression="${xyz.Service.send(postDetails)}"&amp;gt;&amp;lt;/serviceTask&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;sequenceFlow id="flow1" sourceRef="gw-accept-reject" targetRef="exclusivegateway1"&amp;gt;&lt;BR /&gt; &amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${approver1 == false}]]&amp;gt;&amp;lt;/conditionExpression&amp;gt;&lt;BR /&gt; &amp;lt;/sequenceFlow&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 08:03:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5102#M2459</guid>
      <dc:creator>goutham_pn</dc:creator>
      <dc:date>2017-02-08T08:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a custom task listener through java code?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5103#M2460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Hi Goutham,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;service&amp;nbsp;task:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;serviceTask.setImplementation("${xyz.Service.send(postDetails)}");&lt;BR /&gt; serviceTask.setImplementationType("expression");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;sequence flow:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sequenceFlow.setConditionExpression("${approver1 == false}");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 09:01:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-add-a-custom-task-listener-through-java-code/m-p/5103#M2460</guid>
      <dc:creator>nikmenke</dc:creator>
      <dc:date>2017-02-08T09:01:25Z</dc:date>
    </item>
  </channel>
</rss>

