Wednesday, May 29, 2013

Workflow to send SMS on new emails

Workflow diagram

Workflow components

There are four components:
  1. mailcheck - checks for unread emails
  2. diffcheck - checks for differences between current and previous list
  3. sms - sends sms
  4. sup - configures sms, diffcheck and mailcheck

Workflow flow

The workflow goes like this:
  1. mailcheck goes and checks for unread emails every n seconds, bundles it into a list and sends it to the input stream for diffcheck
  2. diffcheck compares the current list of emails with the previous list of emails, determines which ones are new, bundles it into a list and sends that off to sms
  3. sms looks at the list of incoming data and sends to phone numbers associated with diffcheck
    • but nothing really happens cos we've not associated the name 'diffcheck' with anything
    • and the incoming data is just discarded
  4. sup sends a command to sms, associating the name 'diffcheck' with a phone number
    • now sms is configured to send out messages associated with 'diffcheck'

Status

Have got a very rough working version.

Areas to improve

  1. diffcheck should just pass-thru instead of polling, the name should also just passthru
    • so instead of send_out() we could call something like pass_thru()

No comments:

Post a Comment