<?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: Use of Spring service tasks from Activiti Explorer in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116201#M81980</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you see the ProcessEngineFactoryBean do it's magic when spring-context is created?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;protected void initializeExpressionManager() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (processEngineConfiguration.getExpressionManager() == null &amp;amp;&amp;amp; applicationContext != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setExpressionManager(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SpringExpressionManager(applicationContext, processEngineConfiguration.getBeans()));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2012 13:32:57 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2012-10-15T13:32:57Z</dc:date>
    <item>
      <title>Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116196#M81975</link>
      <description>Hi,I had previously a question about the use of Spring beans in services tasks.But actually I need to use these beans from the Activiti Explorer. The idea is to make a simple production followup GUI for the production team using Activiti Explorer so they can see processes in error and with a user ta</description>
      <pubDate>Mon, 15 Oct 2012 08:51:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116196#M81975</guid>
      <dc:creator>mdaviot</dc:creator>
      <dc:date>2012-10-15T08:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116197#M81976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ProcessEngines.getDefaultProcessEngine() -&amp;gt; this will also work when the engine is wired in spring. Once ANY engine starts, it get's registered with the ProcessEngines object. The explorer-app engine has no explicit name set (/activiti-webapp-explorer2/src/main/webapp/WEB-INF/applicationContext.xml), so the default is used, effectively exposing it as the default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the engine obtained should be the correct one. Every bean you wire in applicationContext.xml, should be available in expressions…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 08:57:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116197#M81976</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-10-15T08:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116198#M81977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, thanks for having a look.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand that it should work then … &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I start my project (mvn jetty:run-exploded), deploy the process definition and start the process from the explorer webapp, I always get the same error org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'myService'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have checked in target\ErrorMgt-1.0.0\WEB-INF\applicationContext.xml and my bean is defined with&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;bean id="myService" class="net.atos.cetelem.service.impl.DemoService" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is really a very simple project, I don't think I have done any fancy stuff with spring …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea why I keep getting this exception ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 09:09:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116198#M81977</guid>
      <dc:creator>mdaviot</dc:creator>
      <dc:date>2012-10-15T09:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116199#M81978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you debug the code on tomcat? Can you try intercepting when the SpringExpressionManager is used (createElResolver) or when expressions are resolved (see Expression.getValue). When using spring, this code is executed when engine is created, adding a spring-aware expression-manager:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; protected void initializeExpressionManager() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (processEngineConfiguration.getExpressionManager() == null &amp;amp;&amp;amp; applicationContext != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setExpressionManager(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SpringExpressionManager(applicationContext, processEngineConfiguration.getBeans()));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;you should be able to see if the right expression-manager is used and if the bean is actually in the application-context…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 09:23:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116199#M81978</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-10-15T09:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116200#M81979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using jetty but was able to debug nonetheless.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When the webapp loads, I see the code quoted above executed and the SpringExpressionManager is instanciated and associated with the SpringProcessEngineConfiguration. The SpringExpressionManager knows my bean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that this SpringExpressionManager is never used when I start my process, its method createElResolver is never called.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 10:01:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116200#M81979</guid>
      <dc:creator>mdaviot</dc:creator>
      <dc:date>2012-10-15T10:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116201#M81980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you see the ProcessEngineFactoryBean do it's magic when spring-context is created?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;protected void initializeExpressionManager() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (processEngineConfiguration.getExpressionManager() == null &amp;amp;&amp;amp; applicationContext != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setExpressionManager(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SpringExpressionManager(applicationContext, processEngineConfiguration.getBeans()));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 13:32:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116201#M81980</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-10-15T13:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116202#M81981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know what you mean with the magic, but yes I am going though this code&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; processEngineConfiguration.setExpressionManager(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SpringExpressionManager(applicationContext, processEngineConfiguration.getBeans()));&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 15:27:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116202#M81981</guid>
      <dc:creator>mdaviot</dc:creator>
      <dc:date>2012-10-15T15:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116203#M81982</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;Any news on that ? Should I create a JIRA for this issue ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The project team asked for this now 10 days ago, I would really like to be able to give them an answer by the end of the week if possible …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 08:29:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116203#M81982</guid>
      <dc:creator>mdaviot</dc:creator>
      <dc:date>2012-10-16T08:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116204#M81983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you see what expression-manager is used than? Debug in org.activiti.engine.impl.el.ExpressionManager itself… If this is used, try figuring out where it is instantiated (debug constructor, e.g.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 09:29:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116204#M81983</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-10-16T09:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116205#M81984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks to your reply, and with a lot of debug in Activiti initialization, I was able to identify the root cause of my issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had both an activiti.cfg.xml in the WEB-INF/classes folder and an applicationContext.xml in WEB-INF folder. Because of the ContextLoaderListener defined in my web.xml, Spring would initialize Activiti using the applicationContext.xml configuration file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But then when webapp-explorer initializes with Vaadin, in goes to ProcessEngines.init.&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt; I don't know if this is on purpose of it is a bug, but in my case the isInitialized flag was false and the ProcessEngine is initialized with initProcessEnginFromResource and activiti.cfg.xml.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This ProcessEngine is then used from the StartProcess button in the webapp, and it cannot use the mechanism of Spring injection of beans in Service Tasks (it uses the default ExpressionManager, not the SpringExpressionManager which was injected by applicationContext.xml).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I solved the issue in my case by removing the activiti.cfg.xml (which was put there by Maven when merging the standard activiti-explorer with my custom application).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So in short, be careful not to use applicationContext.xml and activiti.cfg.xml at the same time or you can get 2 different ProcessEngine instantiated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The sample project to reproduce this is still on &lt;/SPAN&gt;&lt;A href="http://dl.dropbox.com/u/21035474/demo.zip" rel="nofollow noopener noreferrer"&gt;my dropbox&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 15:58:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116205#M81984</guid>
      <dc:creator>mdaviot</dc:creator>
      <dc:date>2012-10-18T15:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116206#M81985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ProcessEngines.getDefaultProcessEngine() -&amp;gt; this will also work when the engine is wired in spring. Once ANY engine starts, it get's registered with the ProcessEngines object. The explorer-app engine has no explicit name set (/activiti-webapp-explorer2/src/main/webapp/WEB-INF/applicationContext.xml), so the default is used, effectively exposing it as the default.&lt;BR /&gt;&lt;BR /&gt;So the engine obtained should be the correct one. Every bean you wire in applicationContext.xml, should be available in expressions…&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually, I think I have found a bug here. JIRA created : &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1420" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1420&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 16:45:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116206#M81985</guid>
      <dc:creator>mdaviot</dc:creator>
      <dc:date>2012-10-18T16:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Spring service tasks from Activiti Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116207#M81986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for creating the issue. I need to have a think about what would be the correct behavior actually … but I agree it is confusing at the moment.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 05:55:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/use-of-spring-service-tasks-from-activiti-explorer/m-p/116207#M81986</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-10-19T05:55:50Z</dc:date>
    </item>
  </channel>
</rss>

