5 Replies Latest reply on Aug 27, 2008 8:33 AM by jalovic

    mail node issue

    debnathm

      Hi

      I have written the following code:

      ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
       "<process-definition> " +
       " <start-state name='start'>" +
       " <transition to='mailnode1' name='to_mailnode'></transition>" +
       " </start-state> " +
       " <mail-node name='mailnode1' to='<email address>' >" +
       " <subject>a</subject> " +
       " <text>This is regarding</text>" +
       " <transition to='end' name='to_end'></transition> " +
       " </mail-node> " +
       "<end-state name='end'></end-state>" +
       "</process-definition>");
      
      
       ProcessInstance processInstance = new ProcessInstance(processDefinition);


      However, the above code gives a warning on parsing:

      13:23:38,166 WARN [JpdlXmlReader] process xml warning: transition to='mailnode1
      ' on node 'start' cannot be resolved

      On signalling the start node, I get the runtime exception:

      org.jbpm.JbpmException: transition 'to_mailnode' doesn't have destination. check
      your processdefinition.xml

      Please let me know what is going wrong.

      Thanks,

      Debnath





        • 1. Re: mail node issue
          anuragpaliwal

          Hi,

          I have copied your processdefinition.xml and wrote junit to parse it.
          I didnot get any parse error or exception.

          • 2. Re: mail node issue
            debnathm

            Hi

            I have run the following test case and used the
            jbpm-starters-kit-3.1.4. Under this environment
            it shows the parse warning as mentioned in my post.

            The test case is:

            package com.jbpm.tutorial.mailtest;
            
            import junit.framework.TestCase;
            import org.jbpm.graph.def.ProcessDefinition;
            import org.jbpm.graph.exe.ProcessInstance;
            
            public class MailTest extends TestCase {
             public void setUp()
             {
            
             }
            
             public void testMail()
             {
             ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
             "<process-definition> " +
             " <start-state name='start'>" +
             " <transition to='mailnode1' name='to_mailnode'></transition>" +
             " </start-state> " +
             " <mail-node name='mailnode1' to='abc@mailserver.com' >" +
             " <subject>a</subject> " +
             " <text>This is regarding</text>" +
             " <transition to='end' name='to_end'></transition> " +
             " </mail-node> " +
             "<end-state name='end'></end-state>" +
             "</process-definition>");
            
            
             ProcessInstance processInstance = new ProcessInstance(processDefinition);
             assertEquals(false, processInstance == null);
             }
            }



            The warning is :

            17:30:11,218 [main] WARN JpdlXmlReader : process xml warning: transition to='mailnode1' on node 'start' cannot be resolved

            If you kave any ideas, please let me know.

            Debnath


            • 3. Re: mail node issue
              anuragpaliwal

              Starter-kit hasbeen wrritten using old version of jbpm. Try with 3.2.2 ..


              I would suggest you to use latest version of jBPM and then try it. Because if you decide to use jBPM then you would be using the latest version for your implementation.

              • 4. Re: mail node issue
                debnathm

                Thanks for your suggestion to use 3.2.2. I used the library
                in jpdl-suite-3.2.2 and mail is working fine now.

                Debnath

                • 5. Re: mail node issue
                  jalovic

                  Hi everyone;
                  Please i use the same version and i still have the same exception.
                  Any idea?