[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/workflow/inc/ -> class.run_activity.inc.php (sommaire)

(pas de description)

Poids: 1156 lignes (45 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

run_activity:: (21 méthodes):
  run_activity()
  go()
  prepare_javascript_submit()
  confirmSubmit()
  show_wait_message()
  hide_loading()
  show_completed_page()
  show_engine_infos()
  show_common_vars()
  show_leaving_page()
  show_after_running_page()
  show_form()
  parse_print_mode_buttons()
  parse_title()
  parse_instance_name()
  parse_instance_owner()
  parse_priority()
  parse_next_user()
  parse_submit()
  parse_info_zone()
  parse_history_zone()


Classe: run_activity  - X-Ref

run_activity()   X-Ref
Pas de description

go($activity_id=0, $iid=0, $auto=0)   X-Ref
* This function is used to run all activities for specified instances. it could be interactive activities
* or automatic activities. this second case is the reason why we return some values
* @param $activityId is the activity_id it run
* @param $iid is the instance id it run for
* @param $auto is true by default
* @return AN ARRAY, or at least true or false. This array can contain :
* a key 'failure' with an error string the engine will retrieve in instance error messages in case of
failure (this will mark your execution as Bad),
* a key 'debug' with a debug string the engine will retrieve in instance error messages,


prepare_javascript_submit()   X-Ref
Pas de description

confirmSubmit(submit_name,txt_confirm)   X-Ref
Pas de description

show_wait_message()   X-Ref
You can enable/disable it in process configuration.
Css for the please wait message is defined in app.css, a css automatically included by egroupware


hide_loading()   X-Ref
Pas de description

show_completed_page(&$infos)   X-Ref
Pas de description

show_engine_infos(&$infos, &$icon_array, $level=0)   X-Ref
Pas de description

show_common_vars()   X-Ref
Pas de description

show_leaving_page()   X-Ref
Pas de description

show_after_running_page()   X-Ref
for start activities we link back to user_openinstance form
and for standalone activities we loop back to global activities form


show_form()   X-Ref
Pas de description

parse_print_mode_buttons()   X-Ref
* Draw a 'print mode' or 'back to normal mode' button if $this->print_mode is not false
* and if $this->enable_print_mode is true


parse_title($title='')   X-Ref
* if you do not want thuis to be displayed set your process config value for show_activity_title to false
* @param title is by default empty, You can give a title as a parameter.


parse_instance_name($instance_name)   X-Ref
* if you do not want this to be displayed set your process config value for show_instance_name to false
* @param instance_name is the name we will display.


parse_instance_owner($actual_owner)   X-Ref
* if $this->display_owner is 0 we draw nothing (default value)
* if $this->display_owner is 1 the owner is just shown
* if $this->display_owner is anything else we draw a select box
* this 'anything else' can be an associative array containing the 'role' and/or 'activity' key
* the values associated with theses keys can be strings or array of strings containing roles and/or
* activities's names. Users displayed in the select will then be the users having access to theses activities
* and users which are mapped  to theses roles (one match per user is enought to be displayed).
* ie: $this->display_owner = 2; will display all users mapped to roles on the process
* $this->display_owner = array('role' => array('Chiefs','assistant'), 'activity' => 'updating foo'); will
* display users having access to activity 'updating foo' AND which are mapped to 'Chief' OR 'assistant' roles
* of course roles and activities names must be matching the current process's roles and activities names.
* @param actual_owner is the selected owner in the select list we will display or the shown owner.


parse_priority($actual_priority=1)   X-Ref
* Parse the priority select box in the activity form. The user can decide if he want this select box to be shown or not
* by completing $this->priority_array.
* For example like that : $this->priority_array = array(1 => '1-Low',2 =>'2', 3 => '3-High');
* If the array is empty or the conf values says the user does not want automatic parsing no select box will be shown
* @param actual_priority is by default at 1 and will be the selected activity level.


parse_next_user($actual_next_user)   X-Ref
* if $this->display_next_user is 0 we draw nothing (default value)
* if $this->display_next_user is 1 the next_user is just shown
* if $this->display_next_user is anything else we draw a select box
* this 'anything else' can be an associative array containing the 'role' and/or 'activity' key
* the values associated with theses keys can be strings or array of strings containing roles and/or
* activities's names. Users displayed in the select will then be the users having access to theses activities
* and users which are mapped to theses roles (one match per user is enought to be displayed).
* ie: $this->display_next_user = 2; will display all users mapped to roles on the process
* $this->display_next_user = array('role' => array('Chiefs','assistant'), 'activity' => 'updating foo'); will
* display users having access to activity 'updating foo' AND which are mapped to 'Chief' OR 'assistant' roles
* of course roles and activities names must be matching the current process's roles and activities names.
* @param actual_next_user is the selected next_user in the select list we will display or the shown next_user.


parse_submit()   X-Ref
In this function we'll draw the command buttons asked for this activity.
else we'll check $this->submit_array which should be completed in the activity source
and is an array with the names of the submit options corresponding to the value like this:
$this->submit_array['the_value_you_want']=lang('the label you want');
if this array is empty we'll draw a simple submit button.
The poweruser can decide to handle theses buttons in his own way in the config section
He'll then have to draw it himself in his activity template.
Note that the special value '__Cancel' is automatically handled and set the ['__leaving_activity']
var to true.


parse_info_zone()   X-Ref
Pas de description

parse_history_zone()   X-Ref
* if $this->display_history is 0 we draw nothing (default value)
*
* if $this->display_history is 1 we draw the history table
* this function does not test the use_automatic_parsing configuration value




Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7