<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JSR-223 scripting languages for expressions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6955#M1744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My question wasn't about the Script Task, but about expressions used in, e.g., condition expressions, resource assignment expressions, or data associations. If I remember correctly, jUEL is the only option there and the question was raised, why that cannot be Groovy as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Sep 2010 13:53:35 GMT</pubDate>
    <dc:creator>falko_menge</dc:creator>
    <dc:date>2010-09-03T13:53:35Z</dc:date>
    <item>
      <title>JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6949#M1738</link>
      <description>Are there any plans to allow the usage of JSR-223 scripting languages, e.g., Groovy, for expressions?</description>
      <pubDate>Sun, 22 Aug 2010 10:57:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6949#M1738</guid>
      <dc:creator>falko_menge</dc:creator>
      <dc:date>2010-08-22T10:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6950#M1739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;that is already implemented.&amp;nbsp; @see ScriptingEngines&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Aug 2010 06:52:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6950#M1739</guid>
      <dc:creator>tombaeyens</dc:creator>
      <dc:date>2010-08-23T06:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6951#M1740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The BPMN scriptTask is capable of using any JSR-223 compliant scripting engine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 12:34:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6951#M1740</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2010-08-25T12:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6952#M1741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;a little off-topic but related to ScriptTaskActivity:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for performance reasons it may be better to pass a javax.script.CompiledScript to the ScriptTaskActivity and the ScriptCondition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The compilation would have to be done by the BPMNParse. The ScriptTaskActivity would simply call eval(Binding) on the precompiled script instance. This restricts the usuable ScriptEngines to those that implement Compilable, though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a similar JIRA ticket for UserTaskActivity (ACT-84).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you think?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rüdiger&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 14:21:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6952#M1741</guid>
      <dc:creator>ruediger_hain</dc:creator>
      <dc:date>2010-08-25T14:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6953#M1742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;created &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-93" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-93&lt;/A&gt;&lt;SPAN&gt; for the compiled script&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 15:20:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6953#M1742</guid>
      <dc:creator>tombaeyens</dc:creator>
      <dc:date>2010-08-25T15:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6954#M1743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;amel supports a number of scripting languages which can be used to create an Expression or Predicate via the standard JSR 223 which is a standard part of Java 6.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The following scripting languages are integrated into the DSL:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BeanShell&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JavaScript&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Groovy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PHP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ruby&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However any JSR 223 scripting language can be used using the generic DSL methods.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ScriptContext&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The JSR-223 scripting languages ScriptContext is pre configured with the following attributes all set at ENGINE_SCOPE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attribute&amp;nbsp; Type&amp;nbsp; Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;context org.apache.camel.CamelContext&amp;nbsp; The Camel Context&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;exchange org.apache.camel.Exchange&amp;nbsp; The current Exchange&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;request org.apache.camel.Message&amp;nbsp; The IN message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;response org.apache.camel.Message&amp;nbsp; The OUT message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attributes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can add your own attributes with the attribute(name, value) DSL method, such as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the sample below we add an attribute user that is an object we already have instantiated as myUser. This object has a getFirstName() method that we want to set as header on the message. We use the groovy language to concat the first and last name into a single string that is returned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from("direct:in").setHeader("name").groovy("'$user.firstName $user.lastName'").attribute("user", myUser).to("seda:users");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any scripting language&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Camel can run any JSR-223 scripting languages using the script DSL method such as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from("direct:in").setHeader("firstName").script("jaskel", "user.firstName").attribute("user", myUser).to("seda:users");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a bit different using the Spring DSL where you use the expression element that doesn't support setting attributes (yet):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;from uri="direct:in"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;setHeader headerName="firstName"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;expression language="jaskel"&amp;gt;user.firstName&amp;lt;/expression&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/setHeader&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;to uri="seda:users"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dependencies&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To use scripting languages in your camel routes you need to add the a dependency on camel-script which integrates the JSR-223 scripting engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp;amp; greatest release (see the download page for the latest versions).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;dependency&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.camel&amp;lt;/groupId&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;artifactId&amp;gt;camel-script&amp;lt;/artifactId&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;version&amp;gt;1.4.0&amp;lt;/version&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/dependency&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;_________________________________________&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Want to get-on Google's first page and loads of traffic to your website? Hire a SEO specialist from Ocean Groups &lt;/SPAN&gt;&lt;A href="http://oceangroups.org/" rel="nofollow noopener noreferrer"&gt;seo specialist&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 08:05:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6954#M1743</guid>
      <dc:creator>chrisadam12</dc:creator>
      <dc:date>2010-09-03T08:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6955#M1744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My question wasn't about the Script Task, but about expressions used in, e.g., condition expressions, resource assignment expressions, or data associations. If I remember correctly, jUEL is the only option there and the question was raised, why that cannot be Groovy as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 13:53:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6955#M1744</guid>
      <dc:creator>falko_menge</dc:creator>
      <dc:date>2010-09-03T13:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6956#M1745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Falko: now I understand your question. Currently, it is indeed only EE6 UEL that is supported (which is implemented by Juel).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe it is in the codebase (ScriptCondition), but not yet used in the parser. Would it then be a matter of changing the language attribute ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 10:57:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6956#M1745</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2010-09-06T10:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6957#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, the attribute expressionLanguage defines the language to be used. The value must be a URI (CName) and defaults to "&lt;/SPAN&gt;&lt;A href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/1999/XPath&lt;/A&gt;&lt;SPAN&gt;".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd suggest to identify UEL by "&lt;/SPAN&gt;&lt;A href="http://java.sun.com/products/jsp/" rel="nofollow noopener noreferrer"&gt;http://java.sun.com/products/jsp/&lt;/A&gt;&lt;SPAN&gt;" or "&lt;/SPAN&gt;&lt;A href="http://www.jcp.org/en/jsr/detail?id=245" rel="nofollow noopener noreferrer"&gt;http://www.jcp.org/en/jsr/detail?id=245&lt;/A&gt;&lt;SPAN&gt;" as those have been used by examples in OMG documents and books.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This might be helpful for other languages: &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/904379/urn-for-mime-type" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/questions/904379/urn-for-mime-type&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess, here is room for improvement in the spec &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 19:13:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6957#M1746</guid>
      <dc:creator>falko_menge</dc:creator>
      <dc:date>2010-09-06T19:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: JSR-223 scripting languages for expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6958#M1747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;on a related note, i might consider removing groovy from the default dependencies and turn it into an optional dependency.&amp;nbsp; see also &lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/en/viewtopic.php?f=4&amp;amp;t=252" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?f=4&amp;amp;t=252&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 13:51:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/jsr-223-scripting-languages-for-expressions/m-p/6958#M1747</guid>
      <dc:creator>tombaeyens</dc:creator>
      <dc:date>2010-09-10T13:51:01Z</dc:date>
    </item>
  </channel>
</rss>

