<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Set a task to DONE by using Ivy's API</title><link>https://answers.axonivy.com/questions/3618/set-a-task-to-done-by-using-ivy-s-api</link><description>&lt;p&gt;Is it possible to set a suspended Task to DONE using the Ivy API? (as it is possible to destroy the task with ivy.task.destroy())&lt;/p&gt;
&lt;p&gt;UseCase: Within a process, a task is generated for a specific role (e.g. a task without user interaction / interface etc.) to report the progress. The system/process may now continue working in the background and, as soon it has been done its work, the state of the task should also be set to DONE by using java code (ivyscript code would also be possible). &lt;/p&gt;
&lt;p&gt;The reason for that is that the user should see this task in the task history but the task should not going to "destroyed"&lt;/p&gt;
&lt;p&gt;Thanks in advance for answers&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3618/set-a-task-to-done-by-using-ivy-s-api" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 16 Jan 2019 10:10:37 -0500</lastBuildDate><item><title>Answer by Stefan</title><link>https://answers.axonivy.com/questions/3618/set-a-task-to-done-by-using-ivy-s-api/3620</link><description>&lt;p&gt;Hi Alex,
Thanks for your quick response. &lt;/p&gt;
&lt;p&gt;The concrete use case is to have a task for an external interface and, if the external process caught up and finishes it's work, the task should also indicate that it has been finished. 
Shure, that can also be done by an Immediate Event, but: if the loose coupled interface process fails (e.g. external system is not ready etc.), every permitted user is able to take up the task instead and proceed it manually.&lt;/p&gt;
&lt;p&gt;But I found another solution now: If the external Interface has been completed it's work, it sends a http post with an appropriate user and the corresponding taskId to the ivy server which ends the task.&lt;/p&gt;
&lt;p&gt;Thanks a lot and kind regards
Stefan&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefan</dc:creator><pubDate>Wed, 16 Jan 2019 10:10:37 -0500</pubDate><guid>https://answers.axonivy.com/questions/3618/set-a-task-to-done-by-using-ivy-s-api/3620</guid></item></channel></rss>