<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/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>Context from method to called email</title><link>https://www.aras.com/community/f/development/36745/context-from-method-to-called-email</link><description>I&amp;#39;ve got an email that I&amp;#39;m calling from a &amp;quot;post&amp;quot; method on the Part lifecycle, but the default context that&amp;#39;s passed to that email message isn&amp;#39;t the Part, it instead seems to be the alphabetically first Identity in my database? 
 Why is this happening</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Context from method to called email</title><link>https://www.aras.com/community/thread/7195?ContentTypeID=1</link><pubDate>Sat, 31 Jul 2021 09:25:34 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:407b7f08-72fd-4b1c-8fb8-778be298d19c</guid><dc:creator>Smith589</dc:creator><description>&lt;p&gt;&lt;span&gt;In this event listener they will be creating the business process. For creating the businessprocess, they will be calling businessProcessService.createProcess(String code, String businessProcessDefinitionName). In this method the code is the unique id for the business process getting created, the businessProcessDefinitionName is the business process&amp;#39;s name which got registered in businessprocessRegistry through spring.xml.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://www.omegle.zone/"&gt;Omegle app&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Context from method to called email</title><link>https://www.aras.com/community/thread/7173?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 21:43:18 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b268c776-4fb3-4886-a00a-eea48fdbfc55</guid><dc:creator>Kai Kircher</dc:creator><description>&lt;p&gt;I&amp;#39;m still open to other fixes to the above, but I ended up changing the email code (inside the if(checkIsRoot) above) to generate the email directly from the method instead of relying on a pre-defined email notification, and that has worked fine so far, allowing me to get the Part context:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Item iden = inn.getItemById(&amp;quot;Identity&amp;quot;, &amp;quot;097FB092EBDE42EB9E5A274ABC0059DA&amp;quot;);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Item fromUser = inn.getItemById(&amp;quot;User&amp;quot;, &amp;quot;4B70708CE5B7410A9734505699CBFBAB&amp;quot;);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; string subject = &amp;quot;Part Promotion Notification&amp;quot;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; string body = &amp;quot;&amp;lt;body&amp;gt;&amp;lt;p&amp;gt;Hull BOM ${Item/item_number} has been released as Rev ${Item/major_rev}.&amp;lt;/p&amp;gt;&amp;quot; +&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &amp;quot;&amp;lt;p&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot;&amp;gt;localhost/.../ follow this link to view Part ${item_number}&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot; +&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;quot;&amp;lt;/body&amp;gt;&amp;quot;;&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt; Item email_msg = this.newItem(&amp;quot;EMail Message&amp;quot;);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; email_msg.setProperty(&amp;quot;subject&amp;quot;, subject);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; email_msg.setProperty(&amp;quot;body_html&amp;quot;, body);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; email_msg.setPropertyItem(&amp;quot;from_user&amp;quot;, fromUser);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; if (this.email(email_msg, iden) == false) &lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; return inn.newError(&amp;quot;something went wrong&amp;quot;);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>