<?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: Accessing spring beans from activiti-rest in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40500#M21662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, the rest-webapp uses the non-spring way of getting the process-engine (ProcessEngines.getProcessEngine(…)). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the spring-context is loaded and only the processEngine bean is used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to use additional beans in activiti-rest (without checking out activiti code and building a spring-ized version of the activiti-rest) you can add the "beans" you want to expose in your expression in the configuration. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://activiti.org/userguide/index.html#exposingConfigurationBeans" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#exposingConfigurationBeans&lt;/A&gt;&lt;SPAN&gt; -&amp;gt; this mentions all beans are exposed when using spring but when not using spring, just declare the ones you want, eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"&amp;gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcDriver" value="org.h2.Driver" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcUsername" value="sa" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcPassword" value="" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;propery name="beans"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;map&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;entry&amp;gt;&amp;lt;key&amp;gt;cool&amp;lt;/key&amp;gt;&amp;lt;value ref="coolService" /&amp;gt;&amp;lt;/entry&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/map&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;gt; expression ${cool.invokeMethod('123')} will now work in rest&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Apr 2011 08:05:23 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2011-04-08T08:05:23Z</dc:date>
    <item>
      <title>Accessing spring beans from activiti-rest</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40499#M21661</link>
      <description>How can I access my spring beans in the JUEL expressions for processes which are running in Activiti-REST (and accessible to the user using activiti-explorer).I have already changed the activiti.cfg.xml to use SpringProcessEngineConfiguration insted of StandaloneProcessEngineConfiguration, but it se</description>
      <pubDate>Thu, 07 Apr 2011 13:28:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40499#M21661</guid>
      <dc:creator>joachimvda</dc:creator>
      <dc:date>2011-04-07T13:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing spring beans from activiti-rest</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40500#M21662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, the rest-webapp uses the non-spring way of getting the process-engine (ProcessEngines.getProcessEngine(…)). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the spring-context is loaded and only the processEngine bean is used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to use additional beans in activiti-rest (without checking out activiti code and building a spring-ized version of the activiti-rest) you can add the "beans" you want to expose in your expression in the configuration. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://activiti.org/userguide/index.html#exposingConfigurationBeans" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#exposingConfigurationBeans&lt;/A&gt;&lt;SPAN&gt; -&amp;gt; this mentions all beans are exposed when using spring but when not using spring, just declare the ones you want, eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"&amp;gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcDriver" value="org.h2.Driver" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcUsername" value="sa" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcPassword" value="" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;propery name="beans"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;map&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;entry&amp;gt;&amp;lt;key&amp;gt;cool&amp;lt;/key&amp;gt;&amp;lt;value ref="coolService" /&amp;gt;&amp;lt;/entry&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/map&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;gt; expression ${cool.invokeMethod('123')} will now work in rest&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 08:05:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40500#M21662</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-04-08T08:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing spring beans from activiti-rest</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40501#M21663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the help Frank. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Though I am not sure that will do the trick as my bean didn't even get initialized when put in activiti.cfg.xml.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I actually fixed it by patching the ActivitiWebScript and ActivitiStreamingWebScript classes to use a spring generated and injected process engine. It is working fine now. I will try to document what I did later today.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Joachim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 08:19:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40501#M21663</guid>
      <dc:creator>joachimvda</dc:creator>
      <dc:date>2011-04-08T08:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing spring beans from activiti-rest</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40502#M21664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 08:22:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-spring-beans-from-activiti-rest/m-p/40502#M21664</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-04-08T08:22:49Z</dc:date>
    </item>
  </channel>
</rss>

