Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ActivityManager Class Reference

Inheritance diagram for ActivityManager:

Inheritance graph
[legend]
Collaboration diagram for ActivityManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ActivityManager ($db)
 get_error ()
 add_activity_role ($activityId, $roleId)
 get_activity_roles ($activityId)
 remove_activity_role ($activityId, $roleId)
 transition_exists ($pid, $actFromId, $actToId)
 add_transition ($pId, $actFromId, $actToId)
 remove_transition ($actFromId, $actToId)
 remove_activity_transitions ($pId, $aid)
 get_process_transitions ($pId, $actid=0)
 activity_is_auto_routed ($actid)
 get_process_activities ($pId)
 build_process_graph ($pId)
 validate_process_activities ($pId)
 validate_process_sources ($pid)
 activity_name_exists ($pId, $name)
 get_activity ($pId, $activityId)
 list_activities ($pId, $offset, $maxRecords, $sort_mode, $find, $where='')
 remove_activity ($pId, $activityId)
 replace_activity ($pId, $activityId, $vars)
 set_interactivity ($pId, $actid, $value)
 set_autorouting ($pId, $actid, $value)
 compile_activity ($pId, $activityId)

Public Attributes

 $error = ''

Detailed Description

This class is used to add,remove,modify and list activities used in the Workflow engine. Activities are managed in a per-process level, each activity belongs to some process.

Definition at line 11 of file ActivityManager.php.


Constructor & Destructor Documentation

ActivityManager::ActivityManager db  ) 
 

Constructor takes a PEAR::Db object to be used to manipulate activities in the database.

Definition at line 18 of file ActivityManager.php.


Member Function Documentation

ActivityManager::activity_is_auto_routed actid  ) 
 

Indicates if an activity is autoRouted

Definition at line 149 of file ActivityManager.php.

ActivityManager::activity_name_exists pId,
name
 

Indicates if an activity with the same name exists

Definition at line 407 of file ActivityManager.php.

ActivityManager::add_activity_role activityId,
roleId
 

Asociates an activity with a role

Definition at line 32 of file ActivityManager.php.

ActivityManager::add_transition pId,
actFromId,
actToId
 

Adds a transition

Definition at line 75 of file ActivityManager.php.

ActivityManager::build_process_graph pId  ) 
 

Builds the graph

Definition at line 173 of file ActivityManager.php.

ActivityManager::compile_activity pId,
activityId
 

Compiles activity

Definition at line 622 of file ActivityManager.php.

ActivityManager::get_activity pId,
activityId
 

Gets a activity fields are returned as an asociative array

Definition at line 417 of file ActivityManager.php.

ActivityManager::get_activity_roles activityId  ) 
 

Gets the roles asociated to an activity

Definition at line 42 of file ActivityManager.php.

ActivityManager::get_process_activities pId  ) 
 

Returns all the activities for a process as an array

Definition at line 158 of file ActivityManager.php.

ActivityManager::get_process_transitions pId,
actid = 0
 

Returns all the transitions for a process

Definition at line 131 of file ActivityManager.php.

ActivityManager::list_activities pId,
offset,
maxRecords,
sort_mode,
find,
where = ''
 

Lists activities at a per-process level

Definition at line 428 of file ActivityManager.php.

ActivityManager::remove_activity pId,
activityId
 

Removes a activity.

Definition at line 462 of file ActivityManager.php.

ActivityManager::remove_activity_role activityId,
roleId
 

Removes a role from an activity

Definition at line 57 of file ActivityManager.php.

ActivityManager::remove_activity_transitions pId,
aid
 

Removes all the activity transitions

Definition at line 121 of file ActivityManager.php.

ActivityManager::remove_transition actFromId,
actToId
 

Removes a transition

Definition at line 111 of file ActivityManager.php.

ActivityManager::replace_activity pId,
activityId,
vars
 

Updates or inserts a new activity in the database, $vars is an asociative array containing the fields to update or to insert as needed. $pId is the processId $activityId is the activityId

Definition at line 493 of file ActivityManager.php.

ActivityManager::set_autorouting pId,
actid,
value
 

Sets if an activity is auto routed or not

Definition at line 612 of file ActivityManager.php.

ActivityManager::set_interactivity pId,
actid,
value
 

Sets if an activity is interactive or not

Definition at line 601 of file ActivityManager.php.

ActivityManager::transition_exists pid,
actFromId,
actToId
 

Checks if a transition exists

Definition at line 67 of file ActivityManager.php.

ActivityManager::validate_process_activities pId  ) 
 

Validates if a process can be activated checking the process activities and transitions the rules are: 0) No circular activities 1) Must have only one a start and end activity 2) End must be reachable from start 3) Interactive activities must have a role assigned 4) Roles should be mapped 5) Standalone activities cannot have transitions 6) Non intractive activities non-auto routed must have some role so the user can "send" the activity

Definition at line 237 of file ActivityManager.php.

ActivityManager::validate_process_sources pid  ) 
 

Validate process sources Rules: 1) Interactive activities (non-standalone) must use complete() 2) Standalone activities must not use $instance 3) Switch activities must use setNextActivity 4) Non-interactive activities cannot use complete()

Definition at line 361 of file ActivityManager.php.


The documentation for this class was generated from the following file:
Generated on Mon Jun 7 16:37:43 2004 for Galaxia by doxygen 1.3.4