[JBoss jBPM] - "reminder" tasks
by memius
What is best practice to implement small 'reminder' tasks ?
I will explain.
At my current project it is possible that a user enters some data, is interupted by some higher priority task and afterwards needs to continue entering that data.
Or ... the user needs a reminder that tells him he still needs to send that email he started once (or that letter, ...)
At this moment, there is an existing 'workflow' component (home written, non standard implementation), that will be replaced with jBPM.
So .. we ask ourselves how we can fix this reminder issue in a neat way.
At this moment these tasks are included in a workflow. Meaning that it is kind of a workflow with one task (benefits are that you can see that task in a task list without much effort).
But how should this be done ? Do you actually need a workflow or is there a better way ? And if a workflow is the best solution, how should it be done with jBPM ?
I am pretty sure that this kind of functionality is in lots of applications. So ... there might be some best practice for this kind of stuff ...
Thx in advance.
Dieter.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161980#4161980
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161980
16 years, 5 months
[JBoss jBPM] - process stare couldnt send mail.
by btl_ayd
Hi I use jbpm3.2.1 and I want o send mail.When I run my application on jboss server I have got this error:
|
| ERROR [org.jbpm.graph.def.GraphElement] action threw exception: couldn't send email
| org.jbpm.JbpmException: couldn't send email
| at org.jbpm.mail.Mail.send(Mail.java:149)
| at org.jbpm.mail.Mail.send(Mail.java:113)
| at org.jbpm.mail.Mail.execute(Mail.java:63)
| at org.jbpm.graph.def.Action.execute(Action.java:122)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
| at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$725d02e.fireEvent(<generated>)
| at org.jbpm.graph.exe.Token.signal(Token.java:191)
| at org.jbpm.graph.exe.Token.signal(Token.java:157)
| at org.jbpm.jsf.core.action.SignalActionListener.handleAction(SignalActionListener.java:56)
| at org.jbpm.jsf.core.impl.JbpmActionListenerWrapper.processAction(JbpmActionListenerWrapper.java:82)
| at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
| at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:758)
| at javax.faces.component.UICommand.broadcast(UICommand.java:368)
| at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:810)
| Caused by:
| javax.mail.SendFailedException: Sending failed;
| nested exception is:
| class javax.mail.MessagingException: Exception reading response;
| nested exception is:
| java.net.SocketException: Connection reset
| at javax.mail.Transport.send0(Transport.java:218)
| at javax.mail.Transport.send(Transport.java:80)
| at org.jbpm.mail.Mail.send(Mail.java:147)
| ... 43 more
| 2008-07-02 11:56:14,109 ERROR [org.jbpm.graph.def.GraphElement] action threw exception: couldn't send email
| org.jbpm.JbpmException: couldn't send email
| at org.jbpm.mail.Mail.send(Mail.java:149)
| at org.jbpm.mail.Mail.send(Mail.java:113)
| at org.jbpm.mail.Mail.execute(Mail.java:63)
| at org.jbpm.graph.def.Action.execute(Action.java:122)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
| at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
| at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$725d02e.fireEvent(<generated>)
| at org.jbpm.graph.exe.Token.signal(Token.java:191)
| at org.jbpm.graph.exe.Token.signal(Token.java:157)
| at org.jbpm.jsf.core.action.SignalActionListener.handleAction(SignalActionListener.java:56)
| at org.jbpm.jsf.core.impl.JbpmActionListenerWrapper.processAction(JbpmActionListenerWrapper.java:82)
| at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
| at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:758)
| at javax.faces.component.UICommand.broadcast(UICommand.java:368)
| at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:810)
| Caused by:
| javax.mail.SendFailedException: Sending failed;
| nested exception is:
| class javax.mail.MessagingException: Exception reading response;
| nested exception is:
| java.net.SocketException: Connection reset
| at javax.mail.Transport.send0(Transport.java:218)
| at javax.mail.Transport.send(Transport.java:80)
| at org.jbpm.mail.Mail.send(Mail.java:147)
| ... 43 more
|
|
|
here is my process deifinition xml tag:
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.2"
| name="simple">
| <start-state name="start">
| <transition name="to_state" to="first">
| <action name="action" class="com.sample.action.MessageActionHandler">
| <message>Going to the first state!</message>
| </action>
| </transition>
| </start-state>
| <state name="first" >
| <event type="before-signal">
| <mail name="mail" to="baydin(a)kipas.com.tr" subject="dnetjeÅr" text="http://localhost:8080/jbpm-console/sa/task.jsf?id=1">
|
| </mail>
| <action name="action1" class="com.sample.action.MessageActionHandler">
| <message>BETUL AYDIN BU BÄ°R DENEME</message>
| </action>
| </event>
| <transition name="to_end" to="end">
| <action name="action" class="com.sample.action.MessageActionHandler">
| <message>About to finish!</message>
| </action>
| </transition>
| </state>
| <end-state name="end"></end-state>
| </process-definition>
|
here is my jbpm.cfg.xml:
|
| <jbpm-configuration>
|
| <jbpm-context>
| <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
| <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
| <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| </jbpm-context>
|
| <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
| <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
|
| <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
| <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
| <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
| <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
| <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
| <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
| <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
| <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
| <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
|
| <int name="jbpm.byte.block.size" value="1024" singleton="true" />
| <string name="jbpm.mail.smtp.host" value="10.3.0.8" />
| <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
| <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
| <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
|
| <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
| <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
| <field name="name"><string value="JbpmJobExector" /></field>
| <field name="nbrOfThreads"><int value="1" /></field>
| <field name="idleInterval"><int value="5000" /></field>
| <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
| <field name="historyMaxSize"><int value="20" /></field>
| <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
| <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
| <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
| </bean>
| </jbpm-configuration>
|
|
can anybody tell me what is problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161978#4161978
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161978
16 years, 5 months
[JBoss jBPM] - Lost update problem?
by rbradwell
Hi,
This is more of a design level question than a specific problem I am having. Therefore I haven't published any specific code. I hope you can provide some views on it.
Imagine I have a jbpm process that uses my own custom fork node i.e. from the start node a number of child tokens are created and transitioned.
For the entire live of the process instance these tokens exist i.e. I'm not doing a join at any point.
The thing that concerns me is that I'm setting variables in the context instance and this context instance is shared between the tokens (threads). Furthermore each token is updating the same variable in the context instance. Now I am aware that the context instance can implement various levels of scope based on the token. However I want everything in the top level scope because I want to share data between the seperate tokens (threads). i.e. anything in the context instance gets copied to task node variables upon entering the node for every token.
Will the updating of the same variable in the same context instance cause a lost update problem. For example i'm worried about the following scenario.
1 Token 1 (thread one) gets the context instance and reads variable a
2 Token 2 (thread two) gets the context instance and reads variable a
3 Token 1 makes an update to variable a and persists it
4 Token 2 makes an update to variable a and persists it
At step 4 the update in step 3 is lost.
Will this be sorted out by hibernate if I get the right locking settings or do I need some sort of locking mechanism on my variable a? Apologies I'm not really that familiar with Hibernate by it seems having a process with multiple tokens (being signalled in multiple threads) and writing to the same variables in the top level scope (because I only want one shared copy), there might be classical concurrency issues?
Help is much appreciated
regards
Richard.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161969#4161969
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161969
16 years, 5 months