GrailsFlow

Send Event via Email

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.0
  • Component/s: None
  • Labels:
    None
  • Request Controller:
    Albers, Stephan
  • External Supervisor:
    Voitovich, Mary
  • Executing Programmer:
    Voitovich, Mary
  • Configuration change:
    Yes
  • Configuration change description:
    POP3 account that is read by GrailsFlow. The mails are read from this account and parsed to the process id, node id and event name.
  • Schema modification:
    Yes
  • Ext Project Id:
    GRUJA-01.2

Description

For distributed processes, where you don't have immediate access to a GrailsFlow server through a browser, it is very comfortable to send events via email instead of going to the worklist and clicking the correct event buttons.

This should work in the following way:

  • GrailsFlow sends out emails using regular actions
  • the user gets the email and replys to the mail
  • the user changes the body/first line of the email into a certain value (teh name of the event or an alternative string representing the event name)
  • he sends the email to a specific email adress (the GrailsFlow account)
  • GFW receives the mail via a POP3 account, reads it the body and sends the appropriate Event to the process
    (later) - the rest of the body could also include text, that could be filled into additional process variables

This requires the following activities:

  • create a job that receives and reads emails every couple of minutes
  • read the email and parse the subject/body for process ids, node id, event name and values of process variables
  • call the sendEvent method with appropriate values

All events are sended to a configurable adress eg. workflow@demo.com. The subject is parsed to find the process and node id. Example Subject: Process="12345-232".

The body gets parsed and the first line that includes a value is taken as the event name or the string value the represents the value alternatively.

This is necessary in Procurement software eg. for requisition approval via cell phone.

Issue Links

Activity

Hide
Voitovich, Maria added a comment - 07/Jul/09 12:46 PM - edited

Done.

Account configuration

Email account for retrieving event emails can be configured in grails-app/conf/Config.groovy

Example:

// enable/disable retrieving events via email
grailsflow.events.mail.enabled=true
// email address of events receiver
grailsflow.events.mail.address="masha@mail.scand"
// pop3 server
grailsflow.events.mail.host="mail.scand"
// account name 
grailsflow.events.mail.account="masha"
// password
grailsflow.events.mail.password="masha"

Also event email resiever parameters can be updated via UI form View Scheduler details -> EmailEventReceiverJob (Scheduled Jobs table, Job Name column)

Event email subject

Process=<processKey>-<nodeID>

Example:

Process=3-ManagerApproveHolidays

Event email body

Body of event email contains pairs key=value for process variables and event.

Example:

resolution=Ok
event=approve

Sample of usage.

For testing HolidayRequest process was updated:

  1. User specifies Manager and HR emails at the process startup.
  2. When Process transits to ManagerApproveHolidays email notification is send to Manager email.
  3. Notification email contains links for creating event emails. Manager presses on one of the links and event email is created.
  4. Manager updates variables values in event email body and sends it.
  5. Approve or reject wil be fired on the server as soon as EmailEventReceiverJob checks mail account (currently configured to check each minute)

NOTE that before testing HolidayRequest process email account of events receiver should be configured (see above).

Show
Voitovich, Maria added a comment - 07/Jul/09 12:46 PM - edited Done.

Account configuration

Email account for retrieving event emails can be configured in grails-app/conf/Config.groovy Example:
// enable/disable retrieving events via email
grailsflow.events.mail.enabled=true
// email address of events receiver
grailsflow.events.mail.address="masha@mail.scand"
// pop3 server
grailsflow.events.mail.host="mail.scand"
// account name 
grailsflow.events.mail.account="masha"
// password
grailsflow.events.mail.password="masha"
Also event email resiever parameters can be updated via UI form View Scheduler details -> EmailEventReceiverJob (Scheduled Jobs table, Job Name column)

Event email subject

Process=<processKey>-<nodeID> Example:
Process=3-ManagerApproveHolidays

Event email body

Body of event email contains pairs key=value for process variables and event. Example:
resolution=Ok
event=approve

Sample of usage.

For testing HolidayRequest process was updated:
  1. User specifies Manager and HR emails at the process startup.
  2. When Process transits to ManagerApproveHolidays email notification is send to Manager email.
  3. Notification email contains links for creating event emails. Manager presses on one of the links and event email is created.
  4. Manager updates variables values in event email body and sends it.
  5. Approve or reject wil be fired on the server as soon as EmailEventReceiverJob checks mail account (currently configured to check each minute)
NOTE that before testing HolidayRequest process email account of events receiver should be configured (see above).

People

Vote (0)
Watch (0)

Dates

  • Created:
    15/Jan/09 1:27 PM
    Updated:
    28/Oct/09 5:28 PM
    Resolved:
    28/Oct/09 5:28 PM