Skip to content
Paul Moeller edited this page Nov 14, 2014 · 4 revisions

Agent.Task: The Unit of Work

  • A Task is an element in the state machine of the user's workflow.
    It does some work, and produces the next TaskEvent or the terminal state (stop execution and return from the server).

  • Here is a sample task descriptor:

GROUP_SEARCH_LIST
62                      
ANY_OWNER               
ANYBODY                         
Model.SearchForm                         
Model.SearchList->execute_load_page                         
View.Search->list                         
next=GROUP_SEARCH_LIST                         
  • All Agents end up executing a Task, which is comprised of:

    • Agent.TaskId: an enumeration of all possible tasks in a BOP server instance

    • Auth.RealmType: In what kinds of realms does this task operate in

    • Auth.PermissionSet: A set of enumerated types which must be a subset of the permissions for this user in the realm in which the task is executing.

    • An arbitrary collection of TaskEvent or boolean attributes. Some TaskEvents attributes are:

      • next: where a form goes to when the user clicks "OK"

      • cancel: the cancel button event

      • FORBIDDEN: the next event for a forbidden exception (DieCode).

      • NOT_FOUND: where to go when an object is not found

      Some boolean attributes are:

      • want_basic_authorization: return a BasicAuth request to the client

      • want_query: clear the query for the next event

      • require_secure: ensure the task executes with SSL

  • The work is an ordered list of "executable items", which are perl (object, method) tuples (or code_refs, which are normally used just for debugging).

Task sequence diagram (Click for larger view)

Clone this wiki locally