Bric::Biz::Workflow - Controls the progress of an asset through a series of desks.
$LastChangedRevision$
$LastChangedDate$
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();
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.
Keys for $param are:
The name for this workflow
The site this workflow belongs to
A description for this workflow
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, lookup() returns undef.
Throws:
Side Effects: NONE.
Notes: NONE.
Return a list of all known workflow types. Keys of the $params hash reference are:
id
Workflow ID. May use ANY for a list of possible values.
name
Return all workflows matching a certain name. May use ANY for a list of possible values.
site_id
Return all workflows matching a certain site id. May use ANY for a list of possible values.
description
Return all workflows with a matching description. May use ANY for a list of possible values.
description
Return all workflows with a matching description. May use ANY for a list of possible values.
active
Boolean; Return all in/active workflows.
type
Return all workflows of a particular type. The types are integers accessible via the STORY_WORKFLOW, MEDIA_WORKFLOW, and TEMPLATE_WORKFLOW constants. May use ANY for a list of possible values.
Return all workflows containing a desk with this desk ID. May use ANY for a list of possible values.
grp_id
Return all workflows in the group corresponding to this group ID. May use ANY for a list of possible values.
Throws:
Side Effects: NONE.
Notes: Seaches against name and description use the LIKE operator, so '%' can be used for substring searching.
Return a list of workflow IDs. See list() for a list of the relevant keys in the $params hash reference.
Throws:
Side Effects: NONE.
Notes: Seaches against name and description use the LIKE operator, so '%' can be used for substring searching.
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.
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 id, 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:
The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned.
The display name of the property or attribute.
A reference to the method that will retrieve the value of the property or attribute.
An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute.
A reference to the method that will set the value of the property or attribute.
An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute.
The type of value the property or attribute contains. There are only three types:
If the value is a 'short' value, this hash key contains the length of the field.
The property is searchable via the list() and list_ids() methods.
The property or attribute is required.
An anonymous hash of properties used to display the property or attribute. Possible keys include:
The display field type. Possible values are
The Length, in letters, to display a text or password field.
The maximum length of the property or value - usually defined by the SQL DDL.
The number of rows to format in a textarea field.
The number of columns to format in a textarea field.
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.
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.
Add a desk to this workflow. Keys to param are:
Add a list of desks as part of the allowed desks.
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
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
Get/Set the start desk.
Throws:
NONE
Side Effects:
NONE
Notes:
Get/Set the active flag.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
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
NONE.
NONE.
Remove this workflow
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Function used by lookup() and list() 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 list_ids()).
Throws:
Side Effects: NONE.
Notes: NONE.
NONE
Garth Webb