<?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 automatically complete a task based on a variable in the database? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-automatically-complete-a-task-based-on-a-variable-in-the/m-p/17861#M7927</link>
    <description>&lt;P&gt;Hi, I'm trying to automatically complete a task depending on a variable in the database. Right now I have thought of this but it doesn't work. Please help me out&lt;/P&gt;&lt;P&gt;Example: Let's say my variable is autoComplete.&lt;/P&gt;&lt;P&gt;import org.activiti.engine.delegate.DelegateTask;&lt;BR /&gt;import org.activiti.engine.delegate.TaskListener;&lt;BR /&gt;import org.springframework.stereotype.Component;&lt;/P&gt;&lt;P&gt;@Component&lt;BR /&gt;public class AutoApproveListener implements TaskListener{&lt;/P&gt;&lt;P&gt;@Autowired&lt;/P&gt;&lt;P&gt;TaskService taskService&lt;/P&gt;&lt;P&gt;private static final long serialVersionUID = 882367583162545844L;&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/33527"&gt;@override&lt;/A&gt;&lt;BR /&gt;public void notify(DelegateTask delegateTask) {&lt;BR /&gt;// TODO Auto-generated method stub&lt;BR /&gt;String&amp;nbsp;autoComplete = delegateTask.getVariable("autoComplete");&lt;/P&gt;&lt;P&gt;if(autoComplete==true)&lt;/P&gt;&lt;P&gt;&amp;nbsp; taskService.complete(delegateTask.getId());&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2019 09:59:31 GMT</pubDate>
    <dc:creator>activiti_</dc:creator>
    <dc:date>2019-09-24T09:59:31Z</dc:date>
    <item>
      <title>How to automatically complete a task based on a variable in the database?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-automatically-complete-a-task-based-on-a-variable-in-the/m-p/17861#M7927</link>
      <description>&lt;P&gt;Hi, I'm trying to automatically complete a task depending on a variable in the database. Right now I have thought of this but it doesn't work. Please help me out&lt;/P&gt;&lt;P&gt;Example: Let's say my variable is autoComplete.&lt;/P&gt;&lt;P&gt;import org.activiti.engine.delegate.DelegateTask;&lt;BR /&gt;import org.activiti.engine.delegate.TaskListener;&lt;BR /&gt;import org.springframework.stereotype.Component;&lt;/P&gt;&lt;P&gt;@Component&lt;BR /&gt;public class AutoApproveListener implements TaskListener{&lt;/P&gt;&lt;P&gt;@Autowired&lt;/P&gt;&lt;P&gt;TaskService taskService&lt;/P&gt;&lt;P&gt;private static final long serialVersionUID = 882367583162545844L;&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/33527"&gt;@override&lt;/A&gt;&lt;BR /&gt;public void notify(DelegateTask delegateTask) {&lt;BR /&gt;// TODO Auto-generated method stub&lt;BR /&gt;String&amp;nbsp;autoComplete = delegateTask.getVariable("autoComplete");&lt;/P&gt;&lt;P&gt;if(autoComplete==true)&lt;/P&gt;&lt;P&gt;&amp;nbsp; taskService.complete(delegateTask.getId());&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 09:59:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-automatically-complete-a-task-based-on-a-variable-in-the/m-p/17861#M7927</guid>
      <dc:creator>activiti_</dc:creator>
      <dc:date>2019-09-24T09:59:31Z</dc:date>
    </item>
  </channel>
</rss>

