10 Replies Latest reply on May 16, 2008 1:03 PM by kukeltje

    Send  Mail in specified date.

    jalamos

      I need send one mail in a specified date like "#{Date} - 2 business days". How do that??? any idea?.



      Thanks.

        • 1. Re: Send  Mail in specified date.
          kukeltje

          make a state, put a timer on it, and when the timer fires, make sure either an action is called that sends the mail or there is a mail node that does this

          • 2. Re: Send  Mail in specified date.
            jalamos

            Ok , I can put action inside timer who send mail, but I can't to put a variable like #{Date} in a timer.

            • 3. Re: Send  Mail in specified date.
              kukeltje

              hmmm... should be possible. Which version of jBPM are you using?

              • 4. Re: Send  Mail in specified date.
                jalamos

                I use jBPM 3.2.2 , and mi jpdl is :

                <start-state name="start">
                 <task name="SolicitudBG">
                 <controller>
                 <variable access="read,write,required" name="NombreProyecto"></variable>
                 <variable access="read,write,required" name="Beneficiario"></variable>
                 <variable access="read,write,required" name="Sponsor"></variable>
                 <variable access="read,write,required" name="Monto"></variable>
                 <variable access="read,write,required" name="Fecha"></variable>
                 </controller>
                 </task>
                 <transition to="enviar mail" name="enviar_mail"></transition>
                 </start-state>
                
                 <state name="enviar mail">
                 <event type="node-enter">
                 <mail name="mailIt" to="everis.finanzas@gmail.com">
                 </mail>
                 </event>
                 <timer name="alerta" duedate="#{Fecha} - 5 business days">
                 <action class="org.jbpm.mail.Mail">
                 <to>everis.finanzas@gmail.com</to>
                 <template>actor-reminder-1</template>
                 </action>
                 </timer>
                 <transition to="Termino"></transition>
                 </state>
                
                 <end-state name="Termino"></end-state>


                but doesn't work because no read the variable #{fecha}, you know how do that??.

                • 5. Re: Send  Mail in specified date.
                  kukeltje

                  could be that this only works in cvs head at the moment and that it is not part of a release yet. Can you try cvshead?

                  • 6. Re: Send  Mail in specified date.
                    jalamos

                    Ronald:
                    First, Thank's for your response, I will try do this whit "See Why" maybe work. But I want take the situation for make you a question very important for me:

                    Every task in this process is assigned to a specific user namely user or manager (who are two of the predefined users coming with the installation). However, when executing the process everyone is able to execute everything, i.e. every user defined in the system can both start and end any task, even tasks which have not been assigned to him. Is this a bug or am I thinking wrongly?


                    What happend whit this issue?? it's fixed in jbpm 3.2.2??

                    If you know about that, I very appreciate your response.

                    • 7. Re: Send  Mail in specified date.
                      kukeltje

                      no, code is is cvs, will be fixed with 3.2.3 afaik

                      • 8. Re: Send  Mail in specified date.
                        jalamos

                        Ok,Thank's

                        • 9. Re: Send  Mail in specified date.
                          carbonch

                           


                          could be that this only works in cvs head at the moment and that it is not part of a release yet. Can you try cvshead?


                          Did somebody try it? I`m facing the same issue at the moment. Or does somebody know a work around?

                          Thanks in advance,
                          Reto


                          • 10. Re: Send  Mail in specified date.
                            kukeltje

                             

                            Or does somebody know a work around?


                            A workaround for what? not using cvs-head? Sure...:
                            - Grab the source for the 3.2.x release you are using and looking at the differences in timer related classes and patching those.
                            - Wait for 3.2.3
                            -