Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Workflow Definitions - Notifications Kendal Montgomery March 13, 2011 10:49 PM
RE: Workflow Definitions - Notifications Marcellus Tavares March 14, 2011 7:00 AM
RE: Workflow Definitions - Notifications Kendal Montgomery March 14, 2011 6:51 PM
RE: Workflow Definitions - Notifications Kendal Montgomery March 15, 2011 6:35 PM
RE: Workflow Definitions - Notifications Tamas Imrei March 16, 2011 4:47 PM
RE: Workflow Definitions - Notifications Scott Lee March 21, 2011 2:11 PM
RE: Workflow Definitions - Notifications Michael Klos March 23, 2011 4:23 AM
RE: Workflow Definitions - Notifications Marcellus Tavares March 23, 2011 7:10 AM
RE: Workflow Definitions - Notifications Scott Lee April 19, 2011 11:47 AM
RE: Workflow Definitions - Notifications Lars Meynberg July 28, 2011 12:36 AM
RE: Workflow Definitions - Notifications Lars Meynberg July 28, 2011 2:55 AM
RE: Workflow Definitions - Notifications François LE QUEMENER August 2, 2011 1:46 AM
RE: Workflow Definitions - Notifications Sai Sriharsha Kasturi November 21, 2012 6:30 AM
RE: Workflow Definitions - Notifications Daniel Aschauer June 4, 2013 3:00 AM
RE: Workflow Definitions - Notifications sachin maheshwari June 4, 2013 4:51 AM
RE: Workflow Definitions - Notifications Daniel Aschauer June 4, 2013 7:33 AM
RE: Workflow Definitions - Notifications sachin maheshwari June 4, 2013 11:35 PM
RE: Workflow Definitions - Notifications Clay Banks June 3, 2014 8:42 AM
RE: Workflow Definitions - Notifications Tamas Imrei March 25, 2011 1:55 PM
RE: Workflow Definitions - Notifications gnp present February 24, 2015 1:12 AM
RE: Workflow Definitions - Notifications Alex Swain March 17, 2015 1:51 AM
Kendal Montgomery
Workflow Definitions - Notifications
March 13, 2011 10:49 PM
Answer

Kendal Montgomery

Rank: New Member

Posts: 15

Join Date: January 25, 2006

Recent Posts

Can anyone provide some working examples of how to use velocity templates for Workflow notifications in Liferay 6.0.5? I would like to know how it works and what variables are available to insert into a notification that uses a velocity template and I just haven't see much about how the workflow notification templates actually work to provide formatted text in the notifications.

Thanks in advance!

Kendal.
Marcellus Tavares
RE: Workflow Definitions - Notifications
March 14, 2011 7:00 AM
Answer

Marcellus Tavares

LIFERAY STAFF

Rank: Regular Member

Posts: 142

Join Date: October 26, 2009

Recent Posts

Hi Kendal,

Here's an example that can help you.

 1<template>
 2                    <![CDATA[
 3                        <#assign context = serviceContext.getAttribute("context")>
 4                        <#assign language = context.language>
 5
 6                        ...
 7                                           
 8                        <h3>${language.title} </h3>
 9                        <table>
10                            <tbody>
11                                <tr>
12                                    <td>
13                                        <div>
14                                            <i style="font-style: normal;">
15                                                <span class="il">
16                                                    ${language.eventDescription}
17                                                </span>
18                                            </i>
19                                        </div>
20                                    </td>
21                                    <td>
22                                        <a target="_blank" href="#">${context.eventDescription}</a>
23                                    </td>
24                           
25                            ...


And everything inside the workflow context / service context are available in your template. You just need to make sure to add the objects:

 1
 2...
 3HashMap<String, Object> context = new HashMap<String, Object>();
 4
 5context.put("eventDescription", event.getDescription());
 6...
 7HashMap<String, String> language = new HashMap<String, String>();
 8
 9language.put("eventDescription", LanguageUtil.get(locale, '...'));
10
11context.put("language", language);
12...
13serviceContext.setAttribute("context", context);
14
15WorkflowHandlerRegistryUtil.startWorkflowInstance(..., serviceContext);
16...


Cheers
Kendal Montgomery
RE: Workflow Definitions - Notifications
March 14, 2011 6:51 PM
Answer

Kendal Montgomery

Rank: New Member

Posts: 15

Join Date: January 25, 2006

Recent Posts

Marcellus,

Thanks so much for your quick response -- that's excellent! You guys should really put this in the wiki or documentation somewhere ( then again, I guess it is documented here now ;) ).

Thanks again!

Kendal.
Kendal Montgomery
RE: Workflow Definitions - Notifications
March 15, 2011 6:35 PM
Answer

Kendal Montgomery

Rank: New Member

Posts: 15

Join Date: January 25, 2006

Recent Posts

Marcellus,

One more question now that I've got a handle on formatting the messages -- is there a way to specify what the subject on the email should be? By default it comes out blank which some of my spam filters flag as spam.

Kendal.
Tamas Imrei
RE: Workflow Definitions - Notifications
March 16, 2011 4:47 PM
Answer

Tamas Imrei

Rank: New Member

Posts: 5

Join Date: July 26, 2010

Recent Posts

in the workflow definition xml, set the subject in the description node under the notification:

<notification>
<name>Review Notification</name>
<execution-type>onAssignment</execution-type>
<description>subject for email</description>
<template>
...
</notification>
Scott Lee
RE: Workflow Definitions - Notifications
March 21, 2011 2:11 PM
Answer

Scott Lee

LIFERAY STAFF

Rank: Junior Member

Posts: 54

Join Date: September 26, 2006

Recent Posts

This is good info guys. Ive created a wiki page to hold the info from this thread, feel free to add to the wikipage as you are able.

http://www.liferay.com/community/wiki/-/wiki/Main/Workflow+Definition
Michael Klos
RE: Workflow Definitions - Notifications
March 23, 2011 4:23 AM
Answer

Michael Klos

Rank: New Member

Posts: 17

Join Date: March 6, 2009

Recent Posts

That was very helpful, thanks for that.

but I have another question, how to change email from value?

because currently we have 'Liferay Portal Workflow Notifications [no-reply@liferay.com]'

thanks
Michael
Marcellus Tavares
RE: Workflow Definitions - Notifications
March 23, 2011 7:10 AM
Answer

Marcellus Tavares

LIFERAY STAFF

Rank: Regular Member

Posts: 142

Join Date: October 26, 2009

Recent Posts

Hi Michael,

That information is also retrieved from WorkflowContext. Here's an example of code that you need in order to change the default values:

1workflowContext.put( WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS, ... );
2workflowContext.put(    WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME, ... );


Cheers
Tamas Imrei
RE: Workflow Definitions - Notifications
March 25, 2011 1:55 PM
Answer

Tamas Imrei

Rank: New Member

Posts: 5

Join Date: July 26, 2010

Recent Posts

I have set the sender in

webapps/kaleo-web/WEB-INF/classes/META-INF/kaleo-spring.xml

at:

<bean id="com.liferay.portal.workflow.kaleo.runtime.notification.NotificationSenderFactory" class="com.liferay.portal.workflow.kaleo.runtime.notification.NotificationSenderFactory">
<property name="notificationSenders">
<map>
<entry key="email">
<bean class="com.liferay.portal.workflow.kaleo.runtime.notification.EmailNotificationSender">
<property name="fromAddress" value="lportal@xxxxxxx.hu" />
<property name="fromName" value="Liferay Portal" />
</bean>
</entry>

...

</map>
</property>
</bean>

I'm not sure this is the best way, but it definitely works. emoticon
Scott Lee
RE: Workflow Definitions - Notifications
April 19, 2011 11:47 AM
Answer

Scott Lee

LIFERAY STAFF

Rank: Junior Member

Posts: 54

Join Date: September 26, 2006

Recent Posts

Ive updated the wiki article to include instructions on how to override the sender. (thanks marcellus)

http://www.liferay.com/community/wiki/-/wiki/Main/Workflow+Definition/maximized
Lars Meynberg
RE: Workflow Definitions - Notifications
July 28, 2011 12:36 AM
Answer

Lars Meynberg

Rank: New Member

Posts: 14

Join Date: July 4, 2011

Recent Posts

I tried the the velocity example but it is not working. Here is my config:
1    <template>
2            <![CDATA[
3            #set($context = $serviceContext.getAttribute("context"))
4            <div>Student: ${context.course_student} Course <b>${context.course_title}</b>
5      </div>
6            ]]>
7        </template>
8                <template-language>velocity</template-language>


My Java config:
1
2HashMap<String, Object> context = new HashMap<String, Object>();
3                context.put("course_title", booking.getCourse()
4                        .getCourseTitle());
5                context.put("course_student", booking.getStudent()
6                        .getUserName());
7                serviceContext.setAttribute("context", context);


But all I get in my mail is Student ${context.course_student} Course ${context.course_title}
It seems to me that serviceContext cannot be resolved in the velocity template.
Lars Meynberg
RE: Workflow Definitions - Notifications
July 28, 2011 2:55 AM
Answer

Lars Meynberg

Rank: New Member

Posts: 14

Join Date: July 4, 2011

Recent Posts

Hmm now it is working. Was maybe some cache thing. After deploying a broken definition I re-deployed the original def. and now the Mail looks like this:
Student John Doe Course WebSphere Portal 7
François LE QUEMENER
RE: Workflow Definitions - Notifications
August 2, 2011 1:46 AM
Answer

François LE QUEMENER

Rank: Junior Member

Posts: 48

Join Date: September 18, 2009

Recent Posts

I tried the workflowContext method, but it didn't work. I took a look at the code and saw there is no reference to WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS, nowhere in the code (Liferay & Kaleo sources).

I succeeded by doing an overlay and overloaded the kaleo-spring.xml file.

Version tested : kaleo 6.0.6.1 on Liferay 6.0.11EE
Sai Sriharsha Kasturi
RE: Workflow Definitions - Notifications
November 21, 2012 6:30 AM
Answer

Sai Sriharsha Kasturi

Rank: Junior Member

Posts: 29

Join Date: October 21, 2012

Recent Posts

Hi Francois,


Keep this code in velocity template

workflowContext.put( WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS, "name@domain.com" );
workflowContext.put( WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME, "name" );

And for the workflow constants refer this link:
Workflow Constants
Daniel Aschauer
RE: Workflow Definitions - Notifications
June 4, 2013 3:00 AM
Answer

Daniel Aschauer

Rank: Junior Member

Posts: 39

Join Date: October 22, 2012

Recent Posts

I want to change the mail and name of the sender of the notifications as described above within my workflow definition I tried to apply
1<#assign senderadress = workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS, "name@hello-switzerland.com")>
2<#assign sendername = workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME, "Hello Switzerland" )>

but this gives my an error that workflowContext is undefined.

I then tried to change the workflow with an action script:
 1<action>
 2    <name>review</name>
 3    <script>
 4        <![CDATA[
 5            workflowContext.put(com.liferay.portal.kernel.workflow.WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS, "name@hello.com");
 6            workflowContext.put(com.liferay.portal.kernel.workflow.WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME, "Hello";
 7        ]]>
 8    </script>
 9    <script-language>javascript</script-language>
10    <execution-type>onEntry</execution-type>
11</action>

but this has no effect.

Has anyone been able to change sender mail and name within a workflow definition?
sachin maheshwari
RE: Workflow Definitions - Notifications
June 4, 2013 4:51 AM
Answer

sachin maheshwari

Rank: Junior Member

Posts: 52

Join Date: December 4, 2010

Recent Posts

Hi Daniel,
I achieved the same functionality when applying workflow on webContent by modifying
addArticle(..)
method of
JournalArticleLocalServiceImpl
using hook.

 1
 2HashMap<String, Object> workflowContext = new HashMap<String, Object>();
 3
 4workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS,
 5                "XXXX@XX.com");
 6workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME,
 7                "XXX Admin");
 8            
 9serviceContext.setAttribute("workflowContext", workflowContext);


Leeme know if you need any clarification..!!
Daniel Aschauer
RE: Workflow Definitions - Notifications
June 4, 2013 7:33 AM
Answer

Daniel Aschauer

Rank: Junior Member

Posts: 39

Join Date: October 22, 2012

Recent Posts

I want to use workflow (notifications) for more than one asset type, thus i want to avoid to hook every service, just for changing an email adress.
Is there another way to change this email address?
Thanks!
sachin maheshwari
RE: Workflow Definitions - Notifications
June 4, 2013 11:35 PM
Answer

sachin maheshwari

Rank: Junior Member

Posts: 52

Join Date: December 4, 2010

Recent Posts

you can modify
EditWorkflowTaskAction
struts action using hook, if u are sending notification on some action on work flow like approve/reject/assign etc..

other way is to get the source code of kaleo and modify parers (i was not able to find)

and the simplest but not so good way is to modify
webapps/kaleo-web/WEB-INF/classes/META-INF/kaleo-spring.xml


for

1<bean id="com.liferay.portal.workflow.kaleo.runtime.notification.NotificationSenderFactory" class="com.liferay.portal.workflow.kaleo.runtime.notification.NotificationSenderFactory">
2<property name="notificationSenders">
3<map>
4<entry key="email">
5<bean class="com.liferay.portal.workflow.kaleo.runtime.notification.EmailNotificationSender">
6<property name="fromAddress" value="lportal@xxxxxxx.hu" />
7<property name="fromName" value="Liferay Portal" />
8</bean>
Clay Banks
RE: Workflow Definitions - Notifications
June 3, 2014 8:42 AM
Answer

Clay Banks

Rank: Regular Member

Posts: 136

Join Date: December 11, 2013

Recent Posts

Is there an overriding property I could set to modify the sender?
gnp present
RE: Workflow Definitions - Notifications
February 24, 2015 1:12 AM
Answer

gnp present

Rank: Junior Member

Posts: 37

Join Date: June 8, 2010

Recent Posts

Hello !!!
i tried to modify in webpps/kaleo-web/WEB-INF/classes/META-INF/kaleo-spring.xml

and get this error...

Loading file:/usr/liferay/liferay-portal-6.2-ce-ga3/tomcat-7.0.42/temp/4-kaleo-web/WEB-INF/classes/service.properties
08:38:13,496 ERROR [localhost-startStop-1][PortletApplicationContext:138] org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 248 in XML document from ServletContext resource [/WEB-INF/classes/META-INF/kaleo-spring.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 248; columnNumber: 8; The value of attribute "value" associated with an element type "property" must not contain the '<' character.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 248 in XML document from ServletContext resource [/WEB-INF/classes/META-INF/kaleo-spring.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 248; columnNumber: 8; The value of attribute "value" associated with an element type "property" must not contain the '<' character.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at com.liferay.portal.spring.context.PortletApplicationContext.loadBeanDefinitions(PortletApplicationContext.java:127)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:85)
at com.liferay.portal.deploy.hot.SpringHotDeployListener.doInvokeDeploy(SpringHotDeployListener.java:85)
at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:41)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:227)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.xml.sax.SAXParseException; lineNumber: 248; columnNumber: 8; The value of attribute "value" associated with an element type "property" must not contain the '<' character.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
... 40 more
08:38:13,736 ERROR [localhost-startStop-1][ContextLoader:206] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageListener.kaleo_graph_walker' defined in ServletContext resource [/WEB-INF/classes/META-INF/messaging-spring.xml]: Cannot resolve reference to bean 'com.liferay.portal.workflow.kaleo.runtime.graph.GraphWalker' while setting bean property 'graphWalker'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.portal.workflow.kaleo.runtime.graph.GraphWalker' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:85)
at com.liferay.portal.deploy.hot.SpringHotDeployListener.doInvokeDeploy(SpringHotDeployListener.java:85)
at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:41)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:227)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.portal.workflow.kaleo.runtime.graph.GraphWalker' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 42 more
08:38:13,738 ERROR [localhost-startStop-1][HotDeployImpl:230] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error initializing Spring for kaleo-webkaleo-web
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error initializing Spring for kaleo-webkaleo-web
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:44)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:227)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageListener.kaleo_graph_walker' defined in ServletContext resource [/WEB-INF/classes/META-INF/messaging-spring.xml]: Cannot resolve reference to bean 'com.liferay.portal.workflow.kaleo.runtime.graph.GraphWalker' while setting bean property 'graphWalker'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.portal.workflow.kaleo.runtime.graph.GraphWalker' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:85)
at com.liferay.portal.deploy.hot.SpringHotDeployListener.doInvokeDeploy(SpringHotDeployListener.java:85)
at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:41)
... 24 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.portal.workflow.kaleo.runtime.graph.GraphWalker' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 42 more
08:38:13,739 INFO [localhost-startStop-1][HookHotDeployListener:691] Registering hook for kaleo-web
Loading file:/usr/liferay/liferay-portal-6.2-ce-ga3/tomcat-7.0.42/temp/4-kaleo-web/WEB-INF/classes/portal.properties
08:38:13,764 INFO [localhost-startStop-1][HookHotDeployListener:819] Hook for kaleo-web is available for use
Alex Swain
RE: Workflow Definitions - Notifications
March 17, 2015 1:51 AM
Answer

Alex Swain

Rank: New Member

Posts: 8

Join Date: August 28, 2012

Recent Posts

I put a comment on your Wiki article with a third option for setting this without a hook or spring XML change.