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

Instance Class Reference

Inheritance diagram for Instance:

Inheritance graph
Collaboration diagram for Instance:

Collaboration graph
List of all members.

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 = ''
 $activities = Array()
 Array of asocs(activityId,status,started,user).

 $instanceId = 0
 $workitems = Array()
 An array of workitem ids.

Detailed Description

This class represents a process instance, it is used when any activity is executed. The $instance object is created representing the instance of a process being executed in the activity or even a to-be-created instance if the activity is a start activity.

Definition at line 11 of file Instance.php.

Member Function Documentation

Instance::abort activityId = 0,
theuser = '',
addworkitem = true

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.

Instance::complete activityId = 0,
force = false,
addworkitem = true

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.

Instance::get name  ) 

Gets the value of an instance property.

Definition at line 136 of file Instance.php.

Instance::get_instance_comment cId  ) 

Gets a comment for this instance

Definition at line 601 of file Instance.php.

Instance::get_instance_comments  ) 

Lists instance comments

Definition at line 643 of file Instance.php.

Instance::getActivities  ) 

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.

Instance::getActivityStarted activityId  ) 

Gets the Unix timstamp of the starting time for the given activity.

Definition at line 277 of file Instance.php.

Instance::getActivityStatus activityId  ) 

Gets the status of the instance in some activity, can be 'running' or 'completed'

Definition at line 251 of file Instance.php.

Instance::getActivityUser activityId  ) 

Returns the user that must execute or is already executing an activity wherethis instance is present.

Definition at line 223 of file Instance.php.

Instance::getEnded  ) 

Gets the end time of the instance (when the process was completed)

Definition at line 327 of file Instance.php.

Instance::getInstance instanceId  ) 

Method used to load an instance data from the database.

Definition at line 33 of file Instance.php.

Instance::getInstanceId  ) 

Returns the instanceId

Definition at line 174 of file Instance.php.

Instance::getOwner  ) 

Returns the user that created the instance

Definition at line 188 of file Instance.php.

Instance::getProcessId  ) 

Returns the processId for this instance

Definition at line 181 of file Instance.php.

Instance::getStarted  ) 

Gets the time where the instance was started (Unix timestamp)

Definition at line 311 of file Instance.php.

Instance::getStatus  ) 

Gets the instance status can be 'completed', 'active', 'aborted' or 'exception'

Definition at line 156 of file Instance.php.

Instance::remove_instance_comment cId  ) 

Removes an instance comment

Definition at line 634 of file Instance.php.

Instance::replace_instance_comment cId,

Inserts or updates an instance comment

Definition at line 612 of file Instance.php.

Instance::sendTo from,
split = false

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.

Instance::set name,

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.

Instance::setActivityStarted activityId  ) 

Resets the start time of the activity indicated to the current time.

Definition at line 263 of file Instance.php.

Instance::setActivityStatus activityId,

Sets the status of the instance in some activity, can be 'running' or 'completed'

Definition at line 236 of file Instance.php.

Instance::setActivityUser activityId,

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.

Instance::setEnded time  ) 

Sets the end time of the instance (when the process was completed)

Definition at line 318 of file Instance.php.

Instance::setNextActivity actname  ) 

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.

Instance::setNextUser user  ) 

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.

Instance::setOwner user  ) 

Sets the instance creator user

Definition at line 195 of file Instance.php.

Instance::setStarted time  ) 

Sets the time where the instance was started.

Definition at line 302 of file Instance.php.

Instance::setStatus status  ) 

Sets the instance status , the value can be: 'completed', 'active', 'aborted' or 'exception'

Definition at line 164 of file Instance.php.

Instance::terminate status = 'completed'  ) 

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.

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