OpenACS Workflow
Upcoming SlideShare
Loading in...5
×
 

OpenACS Workflow

on

  • 7,440 views

Learn to use an OpenACS workflow in a web application.

Learn to use an OpenACS workflow in a web application.

Statistics

Views

Total Views
7,440
Views on SlideShare
3,132
Embed Views
4,308

Actions

Likes
0
Downloads
32
Comments
1

12 Embeds 4,308

http://www.project-open.org 4223
http://project-open.org 22
http://translate.googleusercontent.com 18
http://www.project-open.net 13
http://project-open.net 10
http://projop.dnsalias.com 9
http://www.slideshare.net 6
http://po35itsm.project-open.net 2
http://berlin.project-open.net 2
http://koeln.project-open.net 1
http://www.docshut.com 1
http://hub.project-open.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

OpenACS Workflow OpenACS Workflow Presentation Transcript

  • OpenACS Workflow Mark Aufflick pumptheory.com
  • This presentation
    • Goal: Learn to use a workflow in a web application
    • The OpenACS Workflow package
    • Roles, Cases, Actions & States
    • Defining a workflow
    • Integrating a workflow with your app
  • A Brief History
    • The original ACS Workflow package was designed using Petri Nets as the underlying formal model
    • It’s design was very thorough, but the use of Petri Nets was overcomplicated and unnecessary in perhaps 95% of use cases
    • In 2003 Lars Pind of Collaboraid didn’t use the existing workflow package because it was cumbersome and unfinished – even though he was the original author while working for ArsDigita!
  • The new Workflow
    • An analysis of common use cases showed that all common business workflows can be modeled with a simple Finite State Machine
    • The new workflow package is a modular development framework, and allows multiple workflow models to be used
    • Initially only FSMs are supported
  • User Interface?
    • Many workflow packages, including the original ACS Workflow, have funky UIs
    • But – development is nearly always required
    • So – the new workflow has been designed as a developer framework that allows the power of workflows to be easily incorporated into applications
  • Workflow Overview
    • A workflow is a set of:
      • Roles
      • Actions
      • States
      • plus their relations
    • A workflow is associated with an object type
  • Cases
    • A workflow in action is a CASE
    • A case revolves around a specific object
    • A case holds information about:
      • Current state
      • Current assignments
      • Activity log
  • Roles
    • From our publishing example, roles might be:
      • Author
      • Editor
      • Publisher
    • Roles convey permission and responsibility
    • Roles can be assigned by default and reassigned
  • Actions
    • Which actions are available will depend on the current state
    • Actions may change the state
    • Actions can have side effects
    • Allowed roles control who can perform what actions
    • Assigned roles indicate who is responsible for the action
    • A workflow has an initial action
  • States
    • A workflow has a finite set of states
    • From our bug tracker example:
      • Open
      • Resolved
      • Closed
    • A case will always be in exactly one state
    • States contain almost no information
  • Defining a workflow
    • Start by drawing a diagram
    • -> your states, actions and roles
    set spec { contract { pretty_name "Contract" package_key "finance-contracts" object_type “finance_contract“ roles { } states { } actions { } } }
  • Defining a workflow: Roles roles { submitter { pretty_name "Submitter" call_backs { workflow.Role_DefaultAssignees_CreationUser } } assignee { pretty_name “Assignee” callbacks { bug-tracker.ComponentMaintainer bug-tracker.ProjectMaintainer workflow.Role_PickList_CurrentAssignees workflow.Role_AssigneeSubquery_RegisteredUsers } } }
  • Defining a workflow: States submitted { pretty_name "Submitted“ hide_fields { date_approval date_settlement } } approved { pretty_name "Approved" hide_fields { date_settlement } } declined { pretty_name "Declined" hide_fields { date_settlement } } settled { pretty_name "Settled" } discarded { pretty_name "Discarded" }
  • Defining a workflow: Actions (1) submit { pretty_name "Submit" pretty_past_tense "Submitted" new_state "submitted" initial_action_p t } comment { pretty_name "Comment" pretty_past_tense "Commented" allowed_roles { submitter } priviliges { read write } always_enabled_p t }
  • Defining a workflow: Actions (2) decline { pretty_name "Decline" pretty_past_tense "Declined" assigned_role "submitter" assigned_states { submitted } new_state "declined" privileges { write } edit_fields { date_approval } } approve { pretty_name "Approve" pretty_past_tense "Approved" assigned_role "submitter" assigned_states { submitted } new_state "approved" privileges { write } edit_fields { date_approval } }
  • Integrating With Your App's API
    • Creating new objects
      • workflow::case::new
    • Fetching data
      • workflow::case::get
    • Editing objects
      • workflow::case::action::execute
    • see packages/bug-tracker/tcl/bug-procs.tcl
  • Integrating with your App’s UI
    • Bug Tracker demo…
    • Use ad_form to build the form fields
    • Workflow will give you:
      • Action buttons ( workflow::case::get_available_actions)
      • Role assignment ( workflow::case::role::add_assignee_widgets )
      • Case log ( workflow::case::get_activity_html )
    • See packages/bug-tracker/www/bug.tcl
  • Integrating with your app’s queries
    • For complex view-only listings, stats etc.
    • Join with:
      • workflow_cases
      • workflow_fsm_states
      • And others…
    • See the bug-tracker index-postgresql.xql for an example
  • Service Contracts and Callback goodness
    • What is a callback good for?
      • Notifications
      • Other side effects
    • What is a service contract?
      • ACS Service contract allows packages to define and register implementation of interfaces
      • ACS Service contract provides mean to dispatch method calls on an interface implementation.
      • Interface Discovery is available programmatically
      • The Service Contract interface specification was inspired by WDSL, the interface specfication for web services.
  • Package development details
    • APM TCL callbacks:
      • after-install (workflow::fsm::new_from_spec)
      • before-uninstall ( workflow::delete )
      • before-upgrade
      • after-instantiate ( workflow::fsm::clone )
      • before-uninstantiate( workflow::delete )
  • References
    • All references, slides and materials will be posted on the internet at:
    • http://pumptheory.com/collaboration/open-acs/lectures/
    • OpenACS Workflow documentation
    • http://www.collaboraid.biz/developer/workflow-spec