<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Start process via API and put task URL in the response</title><link>https://community.appian.com/discussions/f/integrations/28612/start-process-via-api-and-put-task-url-in-the-response</link><description>Hi guys, 
 we have the requirement to start an Appian process via API from an external system and redirect the user to the url of the first task of that process. I tried to achieve this in the following way. 
 We created a process model and activity-chained</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Start process via API and put task URL in the response</title><link>https://community.appian.com/thread/112397?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 19:24:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d14327d9-53c6-4ea9-bb1d-544f62f439ad</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Glad to hear that &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;. Yes test it thoroughly.&lt;/p&gt;
&lt;p&gt;Apologies for the first suggestion, I was wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start process via API and put task URL in the response</title><link>https://community.appian.com/thread/112396?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 19:22:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:78abf498-b2d4-4ce8-ada3-3ac5a9366be7</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Yes apologies for that, I tried it myself in a Test API and and yes the chaining breaks.&lt;/p&gt;
&lt;p&gt;Thanks for the correction/information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start process via API and put task URL in the response</title><link>https://community.appian.com/thread/112395?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 19:18:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7715242-23c6-4abe-a855-7c834d78900c</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Adding a time to that flow will immediately break the chain at the timer node. It will not add any delay to a!startProcess returning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start process via API and put task URL in the response</title><link>https://community.appian.com/thread/112393?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 19:02:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f82168f7-0453-4bb1-8711-4a165c568c0f</guid><dc:creator>lorenzot0001</dc:creator><description>&lt;p&gt;Hi Sanchit! I think you got it&amp;nbsp;with your&amp;nbsp;second attempt!!! &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&amp;nbsp;getting the task id with&amp;nbsp;&lt;span&gt;getactivetaskidsforprocess() instead of using the process report seems to have solved my issue!!!! I will test it extensively, however. Anyway, thank you very much!!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regarding the first possibility, I tried but the API doesn&amp;#39;t wait for the timer to complete before responding.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start process via API and put task URL in the response</title><link>https://community.appian.com/thread/112392?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 18:43:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a1e3f487-dad5-4e3e-9ed4-0dc383589a3c</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Is this behaviour totally uncertain or is it for some conditional flow? Make sure that all the nodes between Start node and attended task are properly chained.&lt;/p&gt;
&lt;p&gt;You need to confirm that the task is actually active by the time you are preparing response in API, &lt;span style="text-decoration:line-through;"&gt;for troubleshooting you can create another flow which will add some delay to a!startProcess() returning in API.&amp;nbsp;Check&amp;nbsp;if the task URL is getting generated everytime now?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="91" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/18/pastedimage1683571397278v1.png" width="355" /&gt;&lt;/p&gt;
&lt;p&gt;Another possibility could be that the Task Report is not getting refresh instantly and queryProcessAnalytics is unable to get the taskId, you can try&amp;nbsp;getactivetaskidsforprocess() function available in&amp;nbsp;&lt;a href="/b/appmarket/posts/task-management-smart-services"&gt;Task Management Smart Services&lt;/a&gt;&amp;nbsp;plugin to get the taskId if that helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start process via API and put task URL in the response</title><link>https://community.appian.com/thread/112386?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 17:27:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aceadac1-c0b2-4066-a845-7c4bbcbbc500</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;span&gt;Hm ...&amp;nbsp;Can you try to use a process report and queryProcessAnalytics instead of that plugin function?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>