<?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>Do we have an option to invoke a process model from SAIL Code?</title><link>https://community.appian.com/discussions/f/general/5221/do-we-have-an-option-to-invoke-a-process-model-from-sail-code</link><description>Do we have an option to invoke a process model from SAIL Code? OriginalPostID-154018 OriginalPostID-154018</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Do we have an option to invoke a process model from SAIL Code?&lt;p style='display:</title><link>https://community.appian.com/thread/19509?ContentTypeID=1</link><pubDate>Sat, 27 Jun 2015 19:48:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4b1f5ef5-9e25-4ee9-8017-32239f88ce13</guid><dc:creator>Mike James</dc:creator><description>+1 for this neat chaining trick!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Do we have an option to invoke a process model from SAIL Code?&lt;p style='display:</title><link>https://community.appian.com/thread/19442?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 18:20:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1d884aa9-f4b2-43f3-9b45-0cdb85f3029f</guid><dc:creator>Mike Schmitt</dc:creator><description>I&amp;#39;d note that even though the process fires asynchronously, my tests have revealed that if the process is set to chain through, then any DB updates it performs will be done before the SAIL form&amp;#39;s With() parameters (if any) are reloaded.&lt;br /&gt;&lt;br /&gt;I have successfully used this trick to create, for example, a &amp;quot;star&amp;quot; icon on a Record dashboard which is actually a graphic link, which when clicked, adds a bookmark row in the DB for that user/record pair, and the form updates in realtime with a filled-in star to indicate &amp;quot;bookmarked&amp;quot;.  Again, it *is* dependent on process chaining, at least per my tests.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Do we have an option to invoke a process model from SAIL Code?&lt;p style='display:</title><link>https://community.appian.com/thread/19441?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 18:09:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ac81e574-9f4f-4446-bb9a-4b806c6ffb27</guid><dc:creator>Stewart Burchell</dc:creator><description>Note: the model will be invoked asynchronously and will not pass you back any results. If you&amp;#39;re needing to get output you can, for example. get it to create asynchronous content e.g. a Task or an email.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Do we have an option to invoke a process model from SAIL Code?&lt;p style='display:</title><link>https://community.appian.com/thread/19440?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 17:53:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e85dc71-76f6-4997-aafb-3285af603d48</guid><dc:creator>Navajith K</dc:creator><description>Thank you Alok and Siddharth, I will give it a try.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Do we have an option to invoke a process model from SAIL Code?&lt;p style='display:</title><link>https://community.appian.com/thread/19439?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 17:49:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a764e054-fce9-4b02-b4c6-34a9f76f723e</guid><dc:creator>siddharthm</dc:creator><description>Yes.. We can invoke a process model from the SAIL using the function &amp;#39;startprocesswrite&amp;#39; with the &amp;#39;bind&amp;#39; function &lt;br /&gt;&lt;br /&gt;Eg: local!invokeProcess:bind(&lt;br /&gt;    {&lt;br /&gt;      valueToBePassedToProcess:null&lt;br /&gt;    },&lt;br /&gt;    startprocesswrite(&lt;br /&gt;      processModelId: ##  /* Process Model Id of the process that has to be invoked */,&lt;br /&gt;      processParameters: _&lt;br /&gt;    )&lt;br /&gt;  )&lt;br /&gt;  &lt;br /&gt;You can use this local variable(local!invokeProcess) to invoke the process model from the SAIL. Say you want to pass a &amp;#39;Name&amp;#39; field from the SAIL to the process model on clicking a button, the sample code will be like below :&lt;br /&gt;&lt;br /&gt; a!buttonWidget(&lt;br /&gt;          label: &amp;quot;Submit&amp;quot;,&lt;br /&gt;           style: &amp;quot;PRIMARY&amp;quot;,&lt;br /&gt;          value:  {&lt;br /&gt;                 valueToBePassedToProcess:ri!name&lt;br /&gt;                },&lt;br /&gt;          saveInto:  {&lt;br /&gt;            local!invokeProcess &amp;lt;&amp;lt; _,&lt;br /&gt;           &lt;br /&gt;        )&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Do we have an option to invoke a process model from SAIL Code?&lt;p style='display:</title><link>https://community.appian.com/thread/19436?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 17:41:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9dde727b-3ecf-41a2-989c-ac598feabe13</guid><dc:creator>Alok Mohare</dc:creator><description>The Start Process Writer Shared Component should help you with that.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forum.appian.com/suite/tempo/records/type/components/item/i8BWsQdLlzKy55h8z8zJ0sPqpDWFrba_b1aOsna8Uc_NIimwaIDItVI6iAo65QvGA/view/summary"&gt;forum.appian.com/.../summary&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>