Fórum

Workflow Definitions - Notifications

thumbnail
Kendal Montgomery, modificado 13 Anos atrás.

Workflow Definitions - Notifications

New Member Postagens: 15 Data de Entrada: 26/01/06 Postagens Recentes
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.
thumbnail
Marcellus Tavares, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

Regular Member Postagens: 142 Data de Entrada: 26/10/09 Postagens Recentes
Hi Kendal,

Here's an example that can help you.

<template>
					
						&lt;#assign context = serviceContext.getAttribute("context")&gt;
						&lt;#assign language = context.language&gt;

						...
											
						&lt;h3&gt;${language.title} &lt;/h3&gt;
						&lt;table&gt;
							&lt;tbody&gt;
								&lt;tr&gt;
									&lt;td&gt;
										&lt;div&gt;
											&lt;i style="font-style: normal;"&gt;
												&lt;span class="il"&gt;
													${language.eventDescription}
												&lt;/span&gt;
											&lt;/i&gt;
										&lt;/div&gt;
									&lt;/td&gt;
									&lt;td&gt;
										&lt;a target="_blank" href="#"&gt;${context.eventDescription}&lt;/a&gt;
									&lt;/td&gt;
							
							...&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And everything inside the workflow context / service context are available in your template. You just need to make sure to add the objects:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;
...
HashMap&lt;String, Object&gt; context = new HashMap&lt;String, Object&gt;();

context.put("eventDescription", event.getDescription());
...
HashMap&lt;String, String&gt; language = new HashMap&lt;String, String&gt;();

language.put("eventDescription", LanguageUtil.get(locale, '...'));

context.put("language", language);
...
serviceContext.setAttribute("context", context);

WorkflowHandlerRegistryUtil.startWorkflowInstance(..., serviceContext);
...
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Cheers</template>
thumbnail
Kendal Montgomery, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 15 Data de Entrada: 26/01/06 Postagens Recentes
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.
thumbnail
Kendal Montgomery, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 15 Data de Entrada: 26/01/06 Postagens Recentes
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.
thumbnail
Tamas Imrei, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 5 Data de Entrada: 26/07/10 Postagens Recentes
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>
thumbnail
Scott Lee, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 55 Data de Entrada: 26/09/06 Postagens Recentes
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, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 17 Data de Entrada: 06/03/09 Postagens Recentes
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
thumbnail
Marcellus Tavares, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

Regular Member Postagens: 142 Data de Entrada: 26/10/09 Postagens Recentes
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:

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


Cheers
thumbnail
Scott Lee, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 55 Data de Entrada: 26/09/06 Postagens Recentes
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
thumbnail
Lars Meynberg, modificado 12 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 14 Data de Entrada: 05/07/11 Postagens Recentes
I tried the the velocity example but it is not working. Here is my config:
	<template>
			
			#set($context = $serviceContext.getAttribute("context"))
			&lt;div&gt;Student: ${context.course_student} Course &lt;b&gt;${context.course_title}&lt;/b&gt;
      &lt;/div&gt;
			
		</template>
				<template-language>velocity</template-language>


My Java config:

HashMap<string, object> context = new HashMap<string, object>();
				context.put("course_title", booking.getCourse()
						.getCourseTitle());
				context.put("course_student", booking.getStudent()
						.getUserName());
				serviceContext.setAttribute("context", context);</string,></string,>


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.
thumbnail
Lars Meynberg, modificado 12 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 14 Data de Entrada: 05/07/11 Postagens Recentes
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, modificado 12 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 48 Data de Entrada: 18/09/09 Postagens Recentes
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
thumbnail
Sai Sriharsha Kasturi, modificado 11 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 34 Data de Entrada: 21/10/12 Postagens Recentes
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, modificado 10 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 39 Data de Entrada: 22/10/12 Postagens Recentes
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
&lt;#assign senderadress = workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS, "name@hello-switzerland.com")&gt;
&lt;#assign sendername = workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME, "Hello Switzerland" )&gt;

but this gives my an error that workflowContext is undefined.

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

but this has no effect.

Has anyone been able to change sender mail and name within a workflow definition?
thumbnail
sachin mah, modificado 10 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 52 Data de Entrada: 04/12/10 Postagens Recentes
Hi Daniel,
I achieved the same functionality when applying workflow on webContent by modifying
addArticle(..)
method of
JournalArticleLocalServiceImpl
using hook.


HashMap<string, object> workflowContext = new HashMap<string, object>();

workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS,
				"XXXX@XX.com");
workflowContext.put(WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME,
				"XXX Admin");
			
serviceContext.setAttribute("workflowContext", workflowContext);
</string,></string,>


Leeme know if you need any clarification..!!
Daniel Aschauer, modificado 10 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 39 Data de Entrada: 22/10/12 Postagens Recentes
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!
thumbnail
sachin maheshwari, modificado 10 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 52 Data de Entrada: 04/12/10 Postagens Recentes
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

<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>
thumbnail
Clay Banks, modificado 9 Anos atrás.

RE: Workflow Definitions - Notifications

Regular Member Postagens: 141 Data de Entrada: 11/12/13 Postagens Recentes
Is there an overriding property I could set to modify the sender?
thumbnail
Tamas Imrei, modificado 13 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 5 Data de Entrada: 26/07/10 Postagens Recentes
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
thumbnail
gnp present, modificado 9 Anos atrás.

RE: Workflow Definitions - Notifications

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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 S, modificado 9 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 9 Data de Entrada: 28/08/12 Postagens Recentes
I put a comment on your Wiki article with a third option for setting this without a hook or spring XML change.
thumbnail
Marco Azzalini, modificado 7 Anos atrás.

RE: Workflow Definitions - Notifications

Regular Member Postagens: 146 Data de Entrada: 18/11/14 Postagens Recentes
Alex Swain:
I put a comment on your Wiki article with a third option for setting this without a hook or spring XML change.

Hi Alex, I am using your proposal to set the sender name and address for my workflow notifications but it works only for WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME not for the address. It seems that the address value is taken from the Portal's email configuration settings not from the workflow context.
I am using Liferay 6.2 ga3 and I put your groovy lines in the action of the previous node respect the one where the notification is generated.

Have you any hints?

regards,
Marco
Alex Swain, modificado 7 Anos atrás.

RE: Workflow Definitions - Notifications

New Member Postagens: 9 Data de Entrada: 28/08/12 Postagens Recentes
Hey,

It may be that this has changed with a recent update? I put the address changing functionality live a while back and it definitely worked. We subsequently had to stop using the workflows because an update broke them so they were no longer usable for us. If we ever do re-instate the workflows I'll take a look and see if the address changing has stopped working here too.

Cheers,

Alex