Public Member Functions | |
Instance ($db) | |
getInstance ($instanceId) | |
setNextActivity ($actname) | |
setNextUser ($user) | |
set ($name, $value) | |
get ($name) | |
getActivities () | |
getStatus () | |
setStatus ($status) | |
getInstanceId () | |
getProcessId () | |
getOwner () | |
setOwner ($user) | |
setActivityUser ($activityId, $theuser) | |
getActivityUser ($activityId) | |
setActivityStatus ($activityId, $status) | |
getActivityStatus ($activityId) | |
setActivityStarted ($activityId) | |
getActivityStarted ($activityId) | |
setStarted ($time) | |
getStarted () | |
setEnded ($time) | |
getEnded () | |
complete ($activityId=0, $force=false, $addworkitem=true) | |
abort ($activityId=0, $theuser= '', $addworkitem=true) | |
terminate ($status= 'completed') | |
sendTo ($from, $activityId, $split=false) | |
get_instance_comment ($cId) | |
replace_instance_comment ($cId, $activityId, $activity, $user, $title, $comment) | |
remove_instance_comment ($cId) | |
get_instance_comments () | |
Public Attributes | |
$properties = Array() | |
$owner = '' | |
$status = '' | |
$started | |
$nextActivity | |
$nextUser | |
$ended | |
$activities = Array() | |
Array of asocs(activityId,status,started,user). | |
$pId | |
$instanceId = 0 | |
$workitems = Array() | |
An array of workitem ids. |
Definition at line 11 of file Instance.php.
|
Aborts an activity and terminates the whole instance. We still create a workitem to keep track of where in the process the instance was aborted Definition at line 442 of file Instance.php. |
|
Completes an activity, normally from any activity you should call this function without arguments. The arguments are explained just in case. $activityId is the activity that is being completed, when this is not passed the engine takes it from the $_REQUEST array,all activities are executed passing the activityId in the URI. $force indicates that the instance must be routed no matter if the activity is auto-routing or not. This is used when "sending" an instance from a non-auto-routed activity to the next activity. $addworkitem indicates if a workitem should be added for the completed activity. YOU MUST NOT CALL complete() for non-interactive activities since the engine does automatically complete automatic activities after executing them. Definition at line 347 of file Instance.php. |
|
Gets the value of an instance property. Definition at line 136 of file Instance.php. |
|
Gets a comment for this instance Definition at line 601 of file Instance.php. |
|
Lists instance comments Definition at line 643 of file Instance.php. |
|
Returns an array of asocs describing the activities where the instance is present, can be more than one activity if the instance was "splitted" Definition at line 148 of file Instance.php. |
|
Gets the Unix timstamp of the starting time for the given activity. Definition at line 277 of file Instance.php. |
|
Gets the status of the instance in some activity, can be 'running' or 'completed' Definition at line 251 of file Instance.php. |
|
Returns the user that must execute or is already executing an activity wherethis instance is present. Definition at line 223 of file Instance.php. |
|
Gets the end time of the instance (when the process was completed) Definition at line 327 of file Instance.php. |
|
Method used to load an instance data from the database. Definition at line 33 of file Instance.php. |
|
Returns the instanceId Definition at line 174 of file Instance.php. |
|
Returns the user that created the instance Definition at line 188 of file Instance.php. |
|
Returns the processId for this instance Definition at line 181 of file Instance.php. |
|
Gets the time where the instance was started (Unix timestamp) Definition at line 311 of file Instance.php. |
|
Gets the instance status can be 'completed', 'active', 'aborted' or 'exception' Definition at line 156 of file Instance.php. |
|
Removes an instance comment Definition at line 634 of file Instance.php. |
|
Inserts or updates an instance comment Definition at line 612 of file Instance.php. |
|
Sends the instance from some activity to another activity. You should not call this method unless you know very very well what you are doing. Definition at line 519 of file Instance.php. |
|
Sets a property in this instance. This method is used in activities to set instance properties. Instance properties are inemdiately serialized. Definition at line 126 of file Instance.php. |
|
Resets the start time of the activity indicated to the current time. Definition at line 263 of file Instance.php. |
|
Sets the status of the instance in some activity, can be 'running' or 'completed' Definition at line 236 of file Instance.php. |
|
Sets the user that must execute the activity indicated by the activityId. Note that the instance MUST be present in the activity to set the user, you can't program who will execute an activity. Definition at line 207 of file Instance.php. |
|
Sets the end time of the instance (when the process was completed) Definition at line 318 of file Instance.php. |
|
Sets the next activity to be executed, if the current activity is a switch activity the complete() method will use the activity setted in this method as the next activity for the instance. Note that this method receives an activity name as argument. (Not an Id) Definition at line 64 of file Instance.php. |
|
This method can be used to set the user that must perform the next activity of the process. this effectively "assigns" the instance to some user. Definition at line 81 of file Instance.php. |
|
Sets the instance creator user Definition at line 195 of file Instance.php. |
|
Sets the time where the instance was started. Definition at line 302 of file Instance.php. |
|
Sets the instance status , the value can be: 'completed', 'active', 'aborted' or 'exception' Definition at line 164 of file Instance.php. |
|
Terminates the instance marking the instance and the process as completed. This is the end of a process. Normally you should not call this method since it is automatically called when an end activity is completed. Definition at line 502 of file Instance.php. |