Hi,

Am a bit new using this software am in the process doing a holiday system but got one problem when i configure the email plugin, it asks for "To (specific email address)", if i dont fill it in i will get an error saying i havent configured the plugin properly but if i do fill it in it will only send an email to that address where as i want the email to be sent to the user who is applying for the holiday.......Any suggestion how i go by doing this

Thanks

9 Comments

  1. You can use Hash Variable in Email Plugin's "To" field. In your case, you could try #performer.activityDefId.email#

    For example, if the Activity Definition ID for the "Submit Holiday Application" activity is submitHolidayApplication, then you could type #performer.submitHolidayApplication.email# in the "To" field. This, will automatically translate to email address of the actual person that has performed the "Submit Holiday Application" activity, during runtime.

  2. Thanks, but i am a bit confused where to get the "activity Definition ID" from? becasue the holiday request am trying to make has different stages:

    1: The employer fills the application form for holiday

    2 Then it goes to Head of department he approves or decline the holiday...if it declines i want the user notified by email saying that it declined, if approved it moves onto HR

    3 Then the HR will have to approve and see if employer has enough holidays...same again if the holiday has been approved then the employer will get an email advising its been approved and same if the holiday has been rejected

    1. In essence, you would like to send the email notification to the person who has performed the holiday application activity, or in other words, the person who submitted the application form.

      In Workflow Designer, activity ID can be seen from the activity properties dialog.

      In Joget Workflow Management Console, when drilling into a process, you will also see the activity ID when you mouse-over on any activity in the Activity Mapping tab.

      1. Thanks that worked so the user is getting an email if the holiday has been approved...at the moment the user justs gets an email saying approved or rejected regarding the holiday...but i want them to get the full application that they filled out for holiday approval when the email gets send out to the user any ideas how i can do this....

        Also is they a way that you can calculate for example whn the user enters start holiday date and finish holiday date i want to calculate all the days and enter them in a box

        Thanks

        1. Similarly, you can use Hash Variable in the email message, such as #form.fieldName#

          For example, assuming if your Holiday Application Form is created using holiday_application as the table name. In this form, you have a data picker field, set with the name of startDate.

          In the Email Plugin properties, you can fill up the "Form Data Table" field as holiday_application. And at the same time, you can write #form.startDate# in the "Message" field, which will automatically translate to the value of the data picker during runtime.

          1. Thanks i got that working....

            Other problem i had was, i have got 2 date pickers where the user chooses the start and  of their holidays..i was wondering if you can calculates these 2 date pickers and display in a label the amount of days they are taking off.....

            For example if user enters 17/12/2010 as start date and 21/12/2010 as their end date i want it to calculate in a label box that the user is taking 4 days off in total...

            Any sugggestion how i go by this

            Thanks

            1. Yes, you can insert Custom HTML element in the Form Builder, use JavaScript syntax to calculate date difference, and even insert the value into a label. All these can be quite easily done using JavaScript. And FYI, jQuery syntax is supported too

              1. Thank you ive got that working with the javascript...is there a way that i could add the dates which i have inserted in the javascript to the email message when the user has there holiday approved or rejected

                1. Create a Hidden Field element in your form, and use JavaScript to set the "number of days" to this hidden field. This way, the hidden field value can also be printed in your email message using #form.fieldName# Hash Variable