[JBoss jBPM] - Re: need help to set a task
by cocampo
To declare an action that sends mails as you "enter" a task:
| <task-node name="1a revision contrato">
| ...
| <task name="revision_contrato_1">
| <timer
| name="send_mail"
| duedate="5 seconds"
| repeat="7 days">
| <action
| class='com.timers.test.MailSender' />
| </timer>
| </task>
| ...
| </task-node>
|
Here's a snippet from MailSender class:
| public class MailSender implements ActionHandler {
| ...
| public void execute(ExecutionContext executionContext) throws Exception {
| MailSender ms = new MailSender();
| ...
| ms.send();
| ...
|
Also, in order to activate timers, I'm declaring the next in my web.xml file:
| <servlet>
| <servlet-name>JbpmThreadsServlet</servlet-name>
| <servlet-class>org.jbpm.web.JbpmThreadsServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
If you have the jbpm.war in the same app server, you don't need to declare it.
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991059#3991059
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991059
18 years, 1 month
[JBoss Seam] - NPE After adding @RequestParameter to SESSION bean
by lowecg2004
I added a @RequestParameter to a SESSION scoped bean and this now occurs at session destruction:
17:26:01,626 ERROR [STDERR] ENCOUNTERED EXCEPTION CALLING: class com.triggersoft.business.MyAccountBean.destroy
| 17:26:01,626 ERROR [STDERR] java.lang.NullPointerException
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Parameters.convertMultiValueRequestParameter(Parameters.java:47)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.Component.injectParameters(Component.java:1153)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.Component.inject(Component.java:1116)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor419.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at com.triggersoft.business.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:62)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor448.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| 17:26:01,626 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:81)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| 17:26:01,642 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| 17:26:01,642 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| 17:26:01,642 ERROR [STDERR] at com.triggersoft.business.$Proxy562.destroy(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at com.triggersoft.business.MyAccount$$FastClassByCGLIB$$b080abac.invoke(<generated>)
| 17:26:01,642 ERROR [STDERR] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor447.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:30)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor449.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| 17:26:01,642 ERROR [STDERR] at com.triggersoft.business.MyAccount$$EnhancerByCGLIB$$bd4780c0.destroy(<generated>)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.Component.callComponentMethod(Component.java:1793)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.Component.callDestroyMethod(Component.java:1749)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:230)
| 17:26:01,642 ERROR [STDERR] at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:45)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| 17:26:01,642 ERROR [STDERR] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
| 17:26:01,642 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
I've moved the @RequestParameter to an EVENT scoped bean and all is well, but I thought I'd raise it anyway as it was an NPE.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991056#3991056
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991056
18 years, 1 month