<?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 Re: How to create a simple service task? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30188#M12841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post&amp;nbsp;&lt;A href="https://community.alfresco.com/community/bpm/blog/2016/11/15/activiti-enterprise-developer-series-service-tasks-java-delegates" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/community/bpm/blog/2016/11/15/activiti-enterprise-developer-series-service-tasks-java-delegates&lt;/A&gt;&amp;nbsp;will be a good start for you. More details about the usage of service tasks and script tasks can be found at&amp;nbsp;&lt;A class="link-titled" href="http://docs.alfresco.com/process-services1.6/topics/activities.html" title="http://docs.alfresco.com/process-services1.6/topics/activities.html" rel="nofollow noopener noreferrer"&gt;APS Documentation&lt;/A&gt;&amp;nbsp; &amp;amp;&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/userguide/#bpmnScriptTask" title="https://www.activiti.org/userguide/#bpmnScriptTask" rel="nofollow noopener noreferrer"&gt;Activiti User Guide: Script Task&lt;/A&gt;. For something as simple as a sum of two variables, script task/expression will be the easiest. Attached is a sample app, calculating the sum of two variables (var1 + var2) and displaying the output in a form (via a variable named 'var3').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 May 2017 03:47:22 GMT</pubDate>
    <dc:creator>cjose</dc:creator>
    <dc:date>2017-05-10T03:47:22Z</dc:date>
    <item>
      <title>How to create a simple service task?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30187#M12840</link>
      <description>Hi,I am using trial version of APS v1.6.1.I though want to try to create a service task that to do a simple calculation based on 2 input number from earlier user task. For example I have 2 number fields, A and B that user will need to input the numbers. In this service task, I just want to have resu</description>
      <pubDate>Wed, 10 May 2017 02:22:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30187#M12840</guid>
      <dc:creator>wktham</dc:creator>
      <dc:date>2017-05-10T02:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a simple service task?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30188#M12841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post&amp;nbsp;&lt;A href="https://community.alfresco.com/community/bpm/blog/2016/11/15/activiti-enterprise-developer-series-service-tasks-java-delegates" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/community/bpm/blog/2016/11/15/activiti-enterprise-developer-series-service-tasks-java-delegates&lt;/A&gt;&amp;nbsp;will be a good start for you. More details about the usage of service tasks and script tasks can be found at&amp;nbsp;&lt;A class="link-titled" href="http://docs.alfresco.com/process-services1.6/topics/activities.html" title="http://docs.alfresco.com/process-services1.6/topics/activities.html" rel="nofollow noopener noreferrer"&gt;APS Documentation&lt;/A&gt;&amp;nbsp; &amp;amp;&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/userguide/#bpmnScriptTask" title="https://www.activiti.org/userguide/#bpmnScriptTask" rel="nofollow noopener noreferrer"&gt;Activiti User Guide: Script Task&lt;/A&gt;. For something as simple as a sum of two variables, script task/expression will be the easiest. Attached is a sample app, calculating the sum of two variables (var1 + var2) and displaying the output in a form (via a variable named 'var3').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 03:47:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30188#M12841</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-05-10T03:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a simple service task?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30189#M12842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is not necessary to explicitly indicate calculation process on the process diagram, you can use task listener(Expression).&lt;BR /&gt;Setting task listener on 'Apply' user task as following.&lt;/P&gt;&lt;P&gt;・Event&lt;BR /&gt;complete&lt;/P&gt;&lt;P&gt;・Type&lt;BR /&gt;・Expression&lt;BR /&gt;${task.setVariable("C", task.getVariable("A") + task.getVariable("B") )}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is necessary to explicitly indicate calculation process on the process diagram, you can use service task(Expression).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Setting service task&amp;nbsp;as following.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;・Task Type&lt;BR /&gt;Expression&lt;/P&gt;&lt;P&gt;・Expression&lt;BR /&gt;${execution.setVariable("C", execution.getVariable("A") + execution.getVariable("B") )}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 03:58:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30189#M12842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-10T03:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a simple service task?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30190#M12843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use a script task for somthign so trivial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def var1 = execution.getVariable("variable1");&lt;/P&gt;&lt;P&gt;def var 2 =&amp;nbsp;&lt;SPAN&gt;execution.getVariable("variable2");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;def result = var1 + var2;&lt;/P&gt;&lt;P&gt;execution.setVariable("theResult", result);&lt;BR /&gt;&lt;BR /&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 13:40:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-simple-service-task/m-p/30190#M12843</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-10T13:40:17Z</dc:date>
    </item>
  </channel>
</rss>

