-
1. Re: problem with the MailNode:transition doesn't have destin
jalovic Aug 27, 2008 8:17 AM (in response to jalovic)The problem is that the method "signal" works whenever i try to move to a stateNode but it causes problems when the destination is a MailNode or a TaskNode;i 've added the MailNode.hbm.xml in the hibernate.cfg.xml
and no results.
thanks in advance. -
2. Re: problem with the MailNode:transition doesn't have destin
kukeltje Aug 27, 2008 9:13 AM (in response to jalovic)and transitions should have names... is also better
oh and you have wrong jars... jpdl3.1.4 is supperseded by jbpm-jpdl-3.2.3 -
3. Re: problem with the MailNode:transition doesn't have destin
jalovic Aug 27, 2008 10:15 AM (in response to jalovic)thanks for replying,
i removed the jbpm-3.1.4 from the project and it still doesn't work,
you 're right,it's better to specify the transition names but it's not the problem here.
any idea? -
4. Re: problem with the MailNode:transition doesn't have destin
jalovic Aug 28, 2008 6:16 AM (in response to jalovic)Hi all,
I've tried to get around this problem by using the Mail-Action and right now i'm in another problem,when i execute the method signal mi don't get any error neither any success for sending e-mail.
Here is my new processdefinition<?xml version="1.0" encoding="UTF-8"?> <process-definition xmlns="" name="conge_workflow"> <start-state name="saisie_demande"> <transition to="approbation_SH" name="demande_saisie"> <mail to="XXX" name="notification_initiateur"> <subject> test </subject> <text> Salam. </text> </mail> </transition> </start-state> <fork name="fork1"> <transition to="notifier_SH_refus_DH"></transition> <transition to="notifier_initiateur_refus_DH" name=""></transition> </fork> <join name="join1"> <transition to="refus_conge"></transition> </join> <state name="approbation_SH"> <transition to="notifier_initiateur_refus_SH" name="NO"></transition> <transition to="validation_DH" name="OK"></transition> </state> <state name="validation_DH"> <transition to="fork1" name="NO"></transition> <transition to="notifier_initiateur_accept" name="OK"></transition> </state> <state name="notifier_initiateur_refus_SH"> <transition to="refus_conge"></transition> </state> <state name="notifier_SH_refus_DH"> <transition to="join1"></transition> </state> <state name="notifier_initiateur_refus_DH"> <transition to="join1"></transition> </state> <state name="notifier_initiateur_accept"> <transition to="acceptation_conge"></transition> </state> <end-state name="acceptation_conge"></end-state> <end-state name="refus_conge"></end-state> </process-definition>
and here is where i call signalprivate void deployProcessDefinition() { ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("/ressources/jbpm/conge-workflow/processdefinition.xml"); JbpmContext jbpmContext = jbpmConfig.createJbpmContext(); System.out.println("#### jbpmConfig.createJbpmContext() OK "); try { // Deploy the process definition in the database jbpmContext.deployProcessDefinition(processDefinition); System.out.println("#### jbpmContext.deployProcessDefinition(processDefinition) OK "); // create a process instance processInstance = processDefinition.createProcessInstance(); System.out.println("#### processDefinition.createProcessInstance() OK "); Token token = processInstance.getRootToken(); System.out.println("#### processInstance.getRootToken() OK "); //////////////////////////////////////// token.signal("demande_saisie"); //////////////////////////////////////// System.out.println(processInstance.getRootToken().getNode().getName()); //System.out.println("#### processInstance.getRootToken().signal() OK "); } catch (JbpmException ex) { System.out.println(ex.getMessage()); } finally { // Tear down the pojo persistence context. // This includes flush the SQL for inserting the process definition // to the database. jbpmContext.close(); System.out.println("#### jbpmContext.close() OK "); } }
wherestatic JbpmConfiguration jbpmConfig = JbpmConfiguration.getInstance();
and<?xml version="1.0" encoding="windows-1252"?> <!-- Document : jbpm.cfg.xml Created on : 19 June 2008, 11:44 Author : deleonf Description: Purpose of the document follows. --> <jbpm-configuration> <jbpm-context> <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" /> <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 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" /> <int name="jbpm.byte.block.size" value="1024" singleton="true" /> <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" /> <long name="jbpm.msg.wait.timout" value="5000" singleton="true" /> <!-- <string name="mail.smtp.host" value="localhost" /> <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" /> --> <string name="jbpm.mail.smtp.host" value="smtp.gmail.com" /> <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" /> <string name="jbpm.mail.from.address" value="yourMail@gmail.com" /> <string name="jbpm.mail.user" value="yourUser@gmail.com" /> <string name="jbpm.mail.pass" value="yourPassword" /> <string name="jbpm.mail.port" value="465" /> <string name="jbpm.mail.smtp.socketFactory.port" value="465" /> <string name="jbpm.mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" /> <string name="jbpm.mail.smtp.auth" value="true" /> <string name="jbpm.mail.smtp.starttls.enable" value="true" /> <string name="jbpm.mail.debug" value="true" /> <string name="jbpm.mail.smtp.socketFactory.fallback" value="false" /> <string name="jbpm.mail.advanced.config" value="true" /> <string name='mail.class.name' value='FastSign.mail.Mail' /> <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" /> </jbpm-configuration>
I apologize for this too long post.
Best regards.