10 Replies Latest reply on Jul 23, 2009 5:58 AM by swatis

    Mail node template

    tejjbpm

      Hi All,

      I want to specify a template to my mail node..but when i specify template name in the process definition file it does not pick it up..i have included jbpm.mail.templates in jbpm.cfg file with my custom template version..

      I am using jbpm 3.2.1 version..

      Also, is there a way i can specify a template to the task node...

      I tried this but it is giving me a namespace issue?

      Please somebody help me !!

        • 1. Re: Mail node template
          tejjbpm

          Any suggestions? ...The template is not called when i click on the transitiion submit..

          Here is my code sample:


          <start-state name="enter request details">
           <task name="enter request details" swimlane="initiator" blocking="true">
           <description>
          
           Please enter the full details for Services Request.
          
           </description>
          
           </task>
           <transition to="psr rejected 8" name="cancel"></transition>
           <transition to="notify-line-manager" name="submit"><action ref-name="notification"></action>
           </transition>
           </start-state>
          
           <mail name="notification" template="sm-line-manager-review"></mail>


          • 2. Re: Mail node template
            kukeltje

            The way you use it, it is a node, not an action, so using a ref does not work here.

            • 3. Re: Mail node template
              tejjbpm

              Thanks for your reply...what should I use if it is a node? Could you please give some pointers?

              • 4. Re: Mail node template
                kukeltje

                uhmm... transition TO that node?

                • 5. Re: Mail node template
                  tejjbpm

                  I want to send an email when it transitions to the node..

                  In other words, I will need to send an email inside the task node.

                  Start task

                  Task2


                  Either I need to send an email when the user clicks on submit in the start task or when it transitions to task2 ( something like <mail etc ..etc..>

                  Any ideas?

                  • 6. Re: Mail node template
                    tejjbpm

                    Also just to add..it does not complain about usign the action tag..it seems to be valid but it is just ignored...as if nothing is written there..:(

                    • 7. Re: Mail node template
                      swatis

                      Hmm... I tried example given by you and was able to successfully execute the same. What error you are getting?

                      • 8. Re: Mail node template
                        tejjbpm

                        thanks swatis..i used a mail action instead of ref-name and it worked fine..

                        The previously it was not sending the email and there was no error log as well.. It was a bit strange as i thought i am using the syntax correctly..

                        sorted now..thanks for your reply

                        • 9. Re: Mail node template
                          kukeltje

                          no, your syntax was *not* correct. You referenced a node instead of an action. That does *not* work. There might have been a warning when *deploying* this process that a reference to an action could not be found but I'm not sure.

                          Changing it to an action makes it work since that is the correct syntax. Or, like I said, use transition *to* a mail node to make it work. Functionality wise it makes no difference

                          • 10. Re: Mail node template
                            swatis

                            in example you used "mail name="notification" template="blah-blah" right. And in action tag you used "notification" as ref-name
                            "Mail" is "action" nto "node".
                            So its perfectly all right to use the same.
                            I got mail with same configuration.