<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: IvyScript - support for Streams and Lambda expressions</title><link>https://answers.axonivy.com/questions/1902/ivyscript-support-for-streams-and-lambda-expressions</link><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;I see that IvyScript does not support some of the new features in Java8 like Streams and Lambda expressions.
Is it in the road-map ?&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/img.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,
Yordan Yunchov&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1902/ivyscript-support-for-streams-and-lambda-expressions" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 18 Jul 2016 13:58:58 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1902/ivyscript-support-for-streams-and-lambda-expressions/1903</link><description>&lt;p&gt;It is not planned to extend the ivyscript functionality in any way. Its more likely that in the future another scripting language like Groovy will be supported to configure process elements.&lt;/p&gt;
&lt;p&gt;I'd only use ivyscript for simple mappings or short snippets ( &amp;lt;= 20 lines of code). More complex code is normally easier to maintain and especially easiert to test if is written in plain java and then called from ivyscript.&lt;/p&gt;
&lt;p&gt;Especially if I look at your code example. I'd anyway encapsulate it in a simple DAO class.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; public class IncidentDao{
      private static final String PERSISTENT_CRM_UNIT = "EventDashboard2";

      protected static IIvyEntityManager getEntityManager() {
         return Ivy.persistence().get(PERSISTENT_CRM_UNIT);
      }

      public static Incident getIncidientByService(String service){
           // your code...
           // getEntityManager().createQuery(...)
      }
 }
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 18 Jul 2016 13:58:58 -0400</pubDate><guid>https://answers.axonivy.com/questions/1902/ivyscript-support-for-streams-and-lambda-expressions/1903</guid></item></channel></rss>