<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Complete Task from REST</title><link>https://answers.axonivy.com/questions/4077/complete-task-from-rest</link><description>&lt;p&gt;Hi Ivy Team,&lt;/p&gt;
&lt;p&gt;How to complete a task from REST service in Axon.Ivy ?&lt;/p&gt;
&lt;p&gt;So, far I saw that I can do .destroy()  but it doesn`t feel the right, I believe that there will be some side effects &lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;.setActivator(ivy.session.getSecurityContext().getSystemUser())  but this way I`m loosing the history who was the assignee of the task&lt;/p&gt;
&lt;p&gt;Any other options ?&lt;/p&gt;
&lt;p&gt;Maybe to do HTTP call to the end-point /TaskA.iot?taskId=7&lt;/p&gt;
&lt;p&gt;My goal is to build REST API that can manage the Axon.Ivy tasks from external system.&lt;/p&gt;
&lt;p&gt;Best Regards,
Yordan&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4077/complete-task-from-rest" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 11 Oct 2019 05:06:03 -0400</lastBuildDate><item><title>Comment by SupportIvyTeam on Christian Strebel's answer</title><link>https://answers.axonivy.com/questions/4077/complete-task-from-rest#4098</link><description>&lt;p&gt;Hi, it is not possible to change activator after the task was finished.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SupportIvyTeam</dc:creator><pubDate>Fri, 11 Oct 2019 05:06:03 -0400</pubDate><guid>https://answers.axonivy.com/questions/4077/complete-task-from-rest#4098</guid></item><item><title>Comment by Stelt0 on Christian Strebel's answer</title><link>https://answers.axonivy.com/questions/4077/complete-task-from-rest#4088</link><description>&lt;p&gt;If I set the user to System, can you tell me what is the best way to set it back afterwards ?
Otherwise in History it will be assigned to System&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stelt0</dc:creator><pubDate>Wed, 09 Oct 2019 09:21:37 -0400</pubDate><guid>https://answers.axonivy.com/questions/4077/complete-task-from-rest#4088</guid></item><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/4077/complete-task-from-rest/4080</link><description>&lt;p&gt;Yes you could just use the task (start) Url as Rest Service and call it, this will execute the process.
There is no other Web Api for that at the moment.&lt;/p&gt;
&lt;p&gt;If you have a Html Dialog then the process will stay there. So you have either do post another request like the browser would do or you have to left out the Html Dialog with an alternative before it.&lt;/p&gt;
&lt;p&gt;To set the System User as Activator is also an option, this should automatically skip Html Dialogs&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Tue, 08 Oct 2019 05:23:36 -0400</pubDate><guid>https://answers.axonivy.com/questions/4077/complete-task-from-rest/4080</guid></item></channel></rss>