man Bric::Biz::Workflow () - Controls the progress of an asset through a series of desks.
NAME
Bric::Biz::Workflow - Controls the progress of an asset through a series of desks.
VERSION
$LastChangedRevision$
DATE
$LastChangedDate: 2005-07-14 16:17:52 -0700 (Thu, 14 Jul 2005) $
SYNOPSIS
my $flow = new Bric::Biz::Workflow($param);
$id = $flow->get_id;
$name = $flow->get_name; $flow = $flow->set_name($name);
$site_id = $flow->get_site_id; $flow = $flow->set_site_id($site_id);
$desc = $flow->get_description; $flow = $flow->set_description($desc);
$flow = $flow->add_desk($param);
# Returns a list of allowed desks. @desks = $flow->allowed_desks();
# Lists the required desks @desks = $flow->required_desks();
DESCRIPTION
A workflow is something that guides an asset through a set of desks, where an asset is any kind of creative content (a story, an image, a sound file, etc) and a desk performs and kind of validation or transformation upon an asset needed before it can be published. Example desks might be a 'legal' desk where users can verify any legal issue for a particular asset, or an 'edit' desk where users can check consistancy and presentation for an asset.
A workflow might be as simple as a linear path through a set of desks or as complex as requiring certain desks be visited with other desks optional and a route through the desks that can be arbitrarily complex.
INTERFACE
Constructors
Keys for CW$param are:
- *
- name The name for this workflow
- *
- site_id The site this workflow belongs to
- *
- description A description for this workflow
- *
- start_desk The starting desk for this workflow Throws: NONE Side Effects: NONE Notes: NONE Looks up and instantiates a new Bric::Biz::Workflow object based on an Bric::Biz::Workflow object ID or name. If no output channelobject is found in the database, CWlookup() returns CWundef. Throws:
- *
- Unable to prepare SQL statement.
- *
- Unable to connect to database.
- *
- Unable to select column into arrayref.
- *
- Unable to execute SQL statement.
- *
- Unable to bind to columns to statement handle.
- *
- Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Return a list of all known workflow types. Keys of the CW$params hash reference are: Return all workflows matching a certain name. Return all workflows matching a certain site id Return all workflows with a matching description. Boolean; Return all in/active workflows. Return all workflows of a particular type. The types are integers accessible via the CWSTORY_WORKFLOW, CWMEDIA_WORKFLOW, and CWTEMPLATE_WORKFLOW constants.
- <desk_id>
- Return all workflows containing a desk with this desk ID. Return all workflows in the group corresponding to this group ID. Throws:
- *
- Unable to prepare SQL statement.
- *
- Unable to connect to database.
- *
- Unable to select column into arrayref.
- *
- Unable to execute SQL statement.
- *
- Unable to bind to columns to statement handle.
- *
- Unable to fetch row from statement handle. Side Effects: NONE. Notes: Seaches against CWname and CWdescription use the LIKE operator, so '%' can be used for substring searching. Return a list of workflow IDs. See CWlist() for a list of the relevant keys in the CW$params hash reference. Throws:
- *
- Unable to prepare SQL statement.
- *
- Unable to connect to database.
- *
- Unable to select column into arrayref.
- *
- Unable to execute SQL statement.
- *
- Unable to bind to columns to statement handle.
- *
- Unable to fetch row from statement handle. Side Effects: NONE. Notes: Seaches against CWname and CWdescription use the LIKE operator, so '%' can be used for substring searching.
Destructors
- $self->DESTROY
- Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.
Public Class Methods
Returns an anonymous hash of introspection data for this object. If called with a true argument, it will return an ordered list or anonymous array of introspection data. If a second true argument is passed instead of a first, then a list or anonymous array of introspection data will be returned for properties that uniquely identify an object (excluding CWid, which is assumed). Each hash key is the name of a property or attribute of the object. The value for a hash key is another anonymous hash containing the following keys:
- name
- The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned.
- disp
- The display name of the property or attribute.
- get_meth
- A reference to the method that will retrieve the value of the property or attribute.
- get_args
- An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute.
- set_meth
- A reference to the method that will set the value of the property or attribute.
- set_args
- An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute.
- type
- The type of value the property or attribute contains. There are only three types:
- short
- date
- blob
- len
- If the value is a 'short' value, this hash key contains the length of the field.
- search
- The property is searchable via the list() and list_ids() methods.
- req
- The property or attribute is required.
- props
- An anonymous hash of properties used to display the property or attribute. Possible keys include:
- type
- The display field type. Possible values are
- text
- textarea
- password
- hidden
- radio
- checkbox
- select
- length
- The Length, in letters, to display a text or password field.
- maxlength
- The maximum length of the property or value - usually defined by the SQL DDL.
- rows
- The number of rows to format in a textarea field.
- cols
- The number of columns to format in a textarea field.
- vals
- An anonymous hash of key/value pairs reprsenting the values and display names to use in a select list. Throws: NONE. Side Effects: NONE. Notes: NONE.
Public Instance Methods
Returns the workflow's ID. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the ID of the site this Workflow is a part of Throws: NONE. Side Effects: NONE. Notes: NONE. Set the ID of the site this Workflow should be a part of Throws: NONE. Side Effects: NONE. Notes: NONE.
- $flow->add_desk($param);
- Add a desk to this workflow. Keys to param are:
- *
- allowed Add a list of desks as part of the allowed desks.
- *
- required Add a list of desks as required desks. Throws: NONE Side Effects: NONE Notes: NONE Delete a desk from this workflow. Throws: NONE Side Effects: NONE Notes: NONE
- $flow->allowed_desks();
- Returns a list of allowed desks. Throws: NONE Side Effects: NONE Notes: NONE Returns true if desk is in the list of allowed desks. Throws: NONE Side Effects: NONE Notes: NONE Lists the required desks Throws: NONE Side Effects: NONE Notes: NONE Returns true if the deskref given is in the required list Throws: NONE Side Effects: NONE Notes: NONE Returns true if a assetref has been through all required desks. Throws: NONE. Side Effects: NONE. Notes: This method has been deprecated and will be removed in Bricolage 1.10.0. Get/Set the start desk. Throws: NONE Side Effects: NONE Notes: Get/Set the active flag. Throws: NONE Side Effects: NONE Notes: NONE
- $desk->remove;
- Get/Set the active flag. Throws: NONE Side Effects: NONE Notes: This method is deprecated. Save this workflow Throws: NONE Side Effects: NONE Notes: NONE
Private Methods
NONE.
Private Class Methods
NONE.
Private Instance Methods
Remove this workflow Throws: NONE Side Effects: NONE Notes: NONE
Private Functions
Function used by CWlookup() and CWlist() to return a list of Bric::Biz::Workflow objects or, if called with an optional third argument, returns a list of Bric::Biz::Workflow object IDs (used by CWlist_ids()). Throws:
- *
- Unable to prepare SQL statement.
- *
- Unable to connect to database.
- *
- Unable to select column into arrayref.
- *
- Unable to execute SQL statement.
- *
- Unable to bind to columns to statement handle.
- *
- Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE.
NOTES
NONE
AUTHOR
Garth Webb <garth@perijove.com>
SEE ALSO
Bric, Bric::Biz::Workflow::Parts::Desk, perl