Automation:
                      The Power of
                      Workflows

William McKee
william@knowmad.com
WebGUI Users Conference 2010
Automation

“Any job that depends
on routines-- that can
be reduced to a set of
rules, or broken down
into a set of repeatable
steps-- is at risk.”
 – Daniel Pink
WebGUI Workflow Engine
“An event triggered state machine and execution system.”
                                            – JT Smith
WebGUI Workflow Engine
“An event triggered state machine and execution system.”
                                            – JT Smith
WebGUI Workflow Engine
What you need to know:
WebGUI Workflow Engine
What you need to know:
➔
    Workflows – containers for activities
WebGUI Workflow Engine
What you need to know:
➔
  Workflows – containers for activities
➔
  Activities – where the actual work gets
accomplished
WebGUI Workflow Engine
What you need to know:
➔
  Workflows – containers for activities
➔
  Activities – where the actual work gets
accomplished
➔
  States – running, waiting, stalled, complete
WebGUI Workflow Engine
What you need to know:
➔
  Workflows – containers for activities
➔
  Activities – where the actual work gets
accomplished
➔
  States – running, waiting, stalled, complete
➔
  Triggers – time, user/system event, other
workflows, manual initiation
WebGUI Workflow Engine
What you need to know:
➔
  Workflows – containers for activities
➔
  Activities – where the actual work gets
accomplished
➔
  States – running, waiting, stalled, complete
➔
  Triggers – time, user/system event, other
workflows, manual initiation
➔
  Modes - Parallel, Serial, Singleton
Production Workflows
       (core)
Maintenance Routines
Goal: Perform hourly, daily and weekly
maintenance tasks.

Trigger: Time-based

Activities:
 • Delete expired sessions
 • Update calendar feeds
 • Delete temp files & prune cache
 • Archive old stories
 • Delete assets from trash
 • Move clipboard items >30 days to trash
Custom Workflows
     (core)
Send Notification
Goal: Receive an email when a new user
registers on your Website.

Trigger: On Create User

Activity: Notify About
User (WebGUI::User)
Add On Workflows
Page Validator
Goal: Receive an email notice if a page
does not validate against the W3C Markup
Validation Service.

Trigger: Time-based (e.g., add to Daily
Maintenance workflow)

Activity: Download W3C Validator activity
code from the WebGUI Marketplace (see
resources for link)
Mailchimp Integration
Goal: Add subscriber to a Mailchimp
mailing list. Can be integrated into any
forms on your site.

Trigger: Add Entry

Activity: Download OptIn activity code
from the WebGUI Marketplace (coming
soon!)
Personal User Area
Goal: Create personal user areas when a new
user registers on your Website.

Example: Setup a personal blog or dashboard
for your registered Website visitors.

Trigger: On Create User

Activity: Download CreateUserHomeSkeleton
activity code by Peter McBryde from the
WebGUI Marketplace
Custom Workflows
Hot Folder
Goal: To provide a dropbox that is polled for
newly uploaded files which need processing.

Example: Validate & process a “job” file
placed into an FTP folder.

Trigger: Time-based

Activity: Custom (see “Writing Workflow
Activities” presentation for example code to
get started)
PuSH Publisher
Goal: Push site updates out to a
PubSubHubbub hub (a real-time web protocol).

Trigger: Time-based (until more hooks
become available in WebGUI codebase)

Activity: Custom.
Help Out!
• Share your ideas for useful
workflows in the forums or IRC
• Add new workflows to the Bazaar
• Promote new triggers/hooks for
the built-in assets (RFE's)
Thank You!
  William McKee
  WebGUI Forums: knowmad
  IRC: knowmad
  Email: william@knowmad.com
Bonus Material
Interesting but less useful
possibilities for workflows.
Social Media Monitor
Goal: To send alerts of mentions in social
media.

Trigger: Time-based

Example: Poll social media sites such as
Twitter or Facebook for media mentions. Send
an IM or email when results are found.

Activity: Custom.
Business Process Manager
Goal: To manage a real-world workflow process.

Example: Limit access to your site for new user
registrations until they have confirmed their email.

Implementation: A workflow would run when the
user confirmed their account. This workflow would
move the account into the proper membership list.
(It could also be used to check for payments).

Activity: Custom activity.
Happy Birthday!
Goal: To provide a special message and email
for a user's birthday.

Trigger: Time-based

Example: Place a birthday message on site &
send email to user.

Activity: Custom singleton. Run once a day to
check birthday in user profiles.
Sundial
Goal: To keep an external file up-to-date.

Trigger: Time-based

Example: Sundial. On each run, update the
external page with current time. Use
scheduler to update file as appropriate.

Activity: Custom singleton.
Screenscraper
Goal: Retrieve data from an external site.

Trigger: Time-based

Example: Collect data that's not part of an
RSS feed for display on your site.

Activity: Custom.

Automation: The Power of Workflows

  • 1.
    Automation: The Power of Workflows William McKee [email protected] WebGUI Users Conference 2010
  • 2.
    Automation “Any job thatdepends on routines-- that can be reduced to a set of rules, or broken down into a set of repeatable steps-- is at risk.” – Daniel Pink
  • 3.
    WebGUI Workflow Engine “Anevent triggered state machine and execution system.” – JT Smith
  • 4.
    WebGUI Workflow Engine “Anevent triggered state machine and execution system.” – JT Smith
  • 5.
    WebGUI Workflow Engine Whatyou need to know:
  • 6.
    WebGUI Workflow Engine Whatyou need to know: ➔ Workflows – containers for activities
  • 7.
    WebGUI Workflow Engine Whatyou need to know: ➔ Workflows – containers for activities ➔ Activities – where the actual work gets accomplished
  • 8.
    WebGUI Workflow Engine Whatyou need to know: ➔ Workflows – containers for activities ➔ Activities – where the actual work gets accomplished ➔ States – running, waiting, stalled, complete
  • 9.
    WebGUI Workflow Engine Whatyou need to know: ➔ Workflows – containers for activities ➔ Activities – where the actual work gets accomplished ➔ States – running, waiting, stalled, complete ➔ Triggers – time, user/system event, other workflows, manual initiation
  • 10.
    WebGUI Workflow Engine Whatyou need to know: ➔ Workflows – containers for activities ➔ Activities – where the actual work gets accomplished ➔ States – running, waiting, stalled, complete ➔ Triggers – time, user/system event, other workflows, manual initiation ➔ Modes - Parallel, Serial, Singleton
  • 11.
  • 12.
    Maintenance Routines Goal: Performhourly, daily and weekly maintenance tasks. Trigger: Time-based Activities: • Delete expired sessions • Update calendar feeds • Delete temp files & prune cache • Archive old stories • Delete assets from trash • Move clipboard items >30 days to trash
  • 13.
  • 14.
    Send Notification Goal: Receivean email when a new user registers on your Website. Trigger: On Create User Activity: Notify About User (WebGUI::User)
  • 15.
  • 16.
    Page Validator Goal: Receivean email notice if a page does not validate against the W3C Markup Validation Service. Trigger: Time-based (e.g., add to Daily Maintenance workflow) Activity: Download W3C Validator activity code from the WebGUI Marketplace (see resources for link)
  • 17.
    Mailchimp Integration Goal: Addsubscriber to a Mailchimp mailing list. Can be integrated into any forms on your site. Trigger: Add Entry Activity: Download OptIn activity code from the WebGUI Marketplace (coming soon!)
  • 18.
    Personal User Area Goal:Create personal user areas when a new user registers on your Website. Example: Setup a personal blog or dashboard for your registered Website visitors. Trigger: On Create User Activity: Download CreateUserHomeSkeleton activity code by Peter McBryde from the WebGUI Marketplace
  • 19.
  • 20.
    Hot Folder Goal: Toprovide a dropbox that is polled for newly uploaded files which need processing. Example: Validate & process a “job” file placed into an FTP folder. Trigger: Time-based Activity: Custom (see “Writing Workflow Activities” presentation for example code to get started)
  • 21.
    PuSH Publisher Goal: Pushsite updates out to a PubSubHubbub hub (a real-time web protocol). Trigger: Time-based (until more hooks become available in WebGUI codebase) Activity: Custom.
  • 22.
    Help Out! • Shareyour ideas for useful workflows in the forums or IRC • Add new workflows to the Bazaar • Promote new triggers/hooks for the built-in assets (RFE's)
  • 23.
    Thank You! William McKee WebGUI Forums: knowmad IRC: knowmad Email: [email protected]
  • 24.
    Bonus Material Interesting butless useful possibilities for workflows.
  • 25.
    Social Media Monitor Goal:To send alerts of mentions in social media. Trigger: Time-based Example: Poll social media sites such as Twitter or Facebook for media mentions. Send an IM or email when results are found. Activity: Custom.
  • 26.
    Business Process Manager Goal:To manage a real-world workflow process. Example: Limit access to your site for new user registrations until they have confirmed their email. Implementation: A workflow would run when the user confirmed their account. This workflow would move the account into the proper membership list. (It could also be used to check for payments). Activity: Custom activity.
  • 27.
    Happy Birthday! Goal: Toprovide a special message and email for a user's birthday. Trigger: Time-based Example: Place a birthday message on site & send email to user. Activity: Custom singleton. Run once a day to check birthday in user profiles.
  • 28.
    Sundial Goal: To keepan external file up-to-date. Trigger: Time-based Example: Sundial. On each run, update the external page with current time. Use scheduler to update file as appropriate. Activity: Custom singleton.
  • 29.
    Screenscraper Goal: Retrieve datafrom an external site. Trigger: Time-based Example: Collect data that's not part of an RSS feed for display on your site. Activity: Custom.