action-procs.tcl

Procedures in the workflow::action namespace.

Location:
packages/workflow/tcl/action-procs.tcl
Created:
9 January 2003
Authors:
Lars Pind <lars@collaboraid.biz>
Peter Marklund <peter@collaboraid.biz>
CVS Identification:
$Id: action-procs.tcl,v 1.44 2022/09/28 09:12:55 gustafn Exp $

Procedures in this file

Detailed information

workflow::action::callback_insert (public)

 workflow::action::callback_insert -action_id action_id -name name \
    [ -sort_order sort_order ]

Add a side-effect to an action.

Switches:
-action_id (required)
The ID of the action.
-name (required)
Name of service contract implementation, in the form (impl_owner_name).(impl_name), for example, bug-tracker.CaptureResolutionCode
-sort_order (optional)
The sort_order for the rule. Leave blank to add to the end of the list
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::edit workflow::action::edit (public) workflow::action::callback_insert workflow::action::callback_insert workflow::action::edit->workflow::action::callback_insert db_dml db_dml (public) workflow::action::callback_insert->db_dml db_string db_string (public) workflow::action::callback_insert->db_string db_transaction db_transaction (public) workflow::action::callback_insert->db_transaction workflow::action::flush_cache workflow::action::flush_cache (private) workflow::action::callback_insert->workflow::action::flush_cache workflow::action::get_workflow_id workflow::action::get_workflow_id (public) workflow::action::callback_insert->workflow::action::get_workflow_id

Testcases:
No testcase defined.

workflow::action::delete (public)

 workflow::action::delete -action_id action_id

Delete action with given id.

Switches:
-action_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::edit workflow::action::edit (public) workflow::action::delete workflow::action::delete workflow::action::edit->workflow::action::delete

Testcases:
No testcase defined.

workflow::action::edit (public)

 workflow::action::edit [ -operation operation ] \
    [ -action_id action_id ] [ -workflow_id workflow_id ] \
    [ -array array ] [ -internal ] [ -no_complain ] \
    [ -handlers handlers ]

Edit an action. Attributes of the array:

  • short_name
  • pretty_name
  • pretty_past_tense
  • edit_fields
  • description
  • description_mime_type
  • sort_order
  • always_enabled_p
  • assigned_role
  • timeout_seconds
  • trigger_type
  • parent_action
  • parent_action_id
  • privileges
  • allowed_roles
  • callbacks
  • child_actions
Deprecated but still supported:
  • initial_action_p

Switches:
-operation (optional, defaults to "update")
insert, update, delete
-action_id (optional)
For update/delete: The action to update or delete. For insert: Optionally specify a pre-generated action_id for the action.
-workflow_id (optional)
For update/delete: Optionally specify the workflow_id. If not specified, we will execute a query to find it. For insert: The workflow_id of the new action.
-array (optional)
For insert/update: Name of an array in the caller's namespace with attributes to insert/update.
-internal (optional, boolean)
Set this flag if you're calling this proc from within the corresponding proc for a particular workflow model. Will cause this proc to not flush the cache or call workflow::definition_changed_handler, which the caller must then do.
-no_complain (optional, boolean)
Silently ignore extra attributes that we don't know how to handle.
-handlers (optional, defaults to " roles "workflow::role" actions "workflow::action" ")
Returns:
action_id
Author:
Lars Pind <lars@collaboraid.biz>
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::delete workflow::action::delete (public) workflow::action::edit workflow::action::edit workflow::action::delete->workflow::action::edit workflow::action::fsm::edit workflow::action::fsm::edit (public) workflow::action::fsm::edit->workflow::action::edit workflow::action::new workflow::action::new (public) workflow::action::new->workflow::action::edit db_boolean db_boolean (public) workflow::action::edit->db_boolean db_dml db_dml (public) workflow::action::edit->db_dml db_map db_map (public) workflow::action::edit->db_map db_nextval db_nextval (public) workflow::action::edit->db_nextval db_transaction db_transaction (public) workflow::action::edit->db_transaction

Testcases:
No testcase defined.

workflow::action::flush_cache (private)

 workflow::action::flush_cache -workflow_id workflow_id

Flush all caches related to actions for the given workflow_id. Used internally by the workflow API only.

Switches:
-workflow_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::callback_insert workflow::action::callback_insert (public) workflow::action::flush_cache workflow::action::flush_cache workflow::action::callback_insert->workflow::action::flush_cache workflow::flush_cache workflow::flush_cache (private) workflow::flush_cache->workflow::action::flush_cache util_memoize_flush util_memoize_flush (public) workflow::action::flush_cache->util_memoize_flush

Testcases:
No testcase defined.

workflow::action::fsm::delete (public)

 workflow::action::fsm::delete -action_id action_id

Delete FSM action with given id.

Switches:
-action_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::fsm::edit workflow::action::fsm::edit (public) workflow::action::fsm::delete workflow::action::fsm::delete workflow::action::fsm::edit->workflow::action::fsm::delete workflow::action::fsm::set_enabled_in_state workflow::action::fsm::set_enabled_in_state (public) workflow::action::fsm::set_enabled_in_state->workflow::action::fsm::delete

Testcases:
No testcase defined.

workflow::action::fsm::edit (public)

 workflow::action::fsm::edit [ -operation operation ] \
    [ -action_id action_id ] [ -workflow_id workflow_id ] \
    [ -array array ] [ -internal ] [ -handlers handlers ]

Edit an action. Attributes:

  • new_state_id
  • enabled_states
  • enabled_state_ids
  • enabled_actions
  • enabled_action_ids
  • child_states

Switches:
-operation (optional, defaults to "update")
insert, update, delete
-action_id (optional)
For update/delete: The action to update or delete. For insert: Optionally specify a pre-generated action_id for the action.
-workflow_id (optional)
For update/delete: Optionally specify the workflow_id. If not specified, we will execute a query to find it. For insert: The workflow_id of the new action.
-array (optional)
For insert/update: Name of an array in the caller's namespace with attributes to insert/update.
-internal (optional, boolean)
Set this flag if you're calling this proc from within the corresponding proc for a particular workflow model. Will cause this proc to not flush the cache or call workflow::definition_changed_handler, which the caller must then do.
-handlers (optional, defaults to " roles "workflow::role" actions "workflow::action::fsm" states "workflow::state::fsm" ")
Returns:
action_id
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/workflow/www/admin/action-ae.tcl packages/workflow/ www/admin/action-ae.tcl workflow::action::fsm::edit workflow::action::fsm::edit packages/workflow/www/admin/action-ae.tcl->workflow::action::fsm::edit packages/workflow/www/admin/delete-confirm.tcl packages/workflow/ www/admin/delete-confirm.tcl packages/workflow/www/admin/delete-confirm.tcl->workflow::action::fsm::edit workflow::action::fsm::delete workflow::action::fsm::delete (public) workflow::action::fsm::delete->workflow::action::fsm::edit workflow::action::fsm::new workflow::action::fsm::new (public) workflow::action::fsm::new->workflow::action::fsm::edit workflow::action::fsm::parse_spec workflow::action::fsm::parse_spec (private) workflow::action::fsm::parse_spec->workflow::action::fsm::edit db_dml db_dml (public) workflow::action::fsm::edit->db_dml db_string db_string (public) workflow::action::fsm::edit->db_string db_transaction db_transaction (public) workflow::action::fsm::edit->db_transaction workflow::action::edit workflow::action::edit (public) workflow::action::fsm::edit->workflow::action::edit workflow::action::get_element workflow::action::get_element (public) workflow::action::fsm::edit->workflow::action::get_element

Testcases:
No testcase defined.

workflow::action::fsm::generate_spec (private)

 workflow::action::fsm::generate_spec [ -action_id action_id ] \
    [ -one_id one_id ] [ -handlers handlers ]

Generate the spec for an individual action definition.

Switches:
-action_id (optional)
The id of the action to generate spec for.
-one_id (optional)
Same as action_id, just used for consistency across roles/actions/states.
-handlers (optional)
Returns:
spec The actions spec
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::fsm::get workflow::action::fsm::get (public) workflow::action::fsm::generate_spec workflow::action::fsm::generate_spec workflow::action::fsm::generate_spec->workflow::action::fsm::get

Testcases:
No testcase defined.

workflow::action::fsm::get (public)

 workflow::action::fsm::get -action_id action_id -array array

Return information about an action with a given id, including FSM-related info: enabled_states, enabled_state_ids, assigned_states, assigned_state_ids, new_state, new_state_id.

Switches:
-action_id (required)
-array (required)
Authors:
Peter Marklund
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 packages/workflow/www/admin/workflow-edit.tcl packages/workflow/ www/admin/workflow-edit.tcl workflow::action::fsm::get workflow::action::fsm::get packages/workflow/www/admin/workflow-edit.tcl->workflow::action::fsm::get workflow::action::fsm::generate_spec workflow::action::fsm::generate_spec (private) workflow::action::fsm::generate_spec->workflow::action::fsm::get workflow::action::fsm::get_element workflow::action::fsm::get_element (public) workflow::action::fsm::get_element->workflow::action::fsm::get workflow::case::action::enable workflow::case::action::enable (private) workflow::case::action::enable->workflow::action::fsm::get workflow::case::new workflow::case::new (public) workflow::case::new->workflow::action::fsm::get workflow::action::get workflow::action::get (public) workflow::action::fsm::get->workflow::action::get

Testcases:
No testcase defined.

workflow::action::fsm::get_element (public)

 workflow::action::fsm::get_element [ -action_id action_id ] \
    [ -one_id one_id ] -element element

Return element from information about an action with a given id, including FSM-related info such as 'enabled_in_states', and 'new_state'. Return a single element from the information about a action.

Switches:
-action_id (optional)
The ID of the action
-one_id (optional)
Same as action_id, just used for consistency across roles/actions/states.
-element (required)
The element you want
Returns:
The element you asked for
Authors:
Peter Marklund
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::fsm::get_initial_state workflow::fsm::get_initial_state (public) workflow::action::fsm::get_element workflow::action::fsm::get_element workflow::fsm::get_initial_state->workflow::action::fsm::get_element workflow::action::fsm::get workflow::action::fsm::get (public) workflow::action::fsm::get_element->workflow::action::fsm::get

Testcases:
No testcase defined.

workflow::action::fsm::get_ids (public)

 workflow::action::fsm::get_ids [ -all ] -workflow_id workflow_id \
    [ -parent_action_id parent_action_id ]

Get the action_id's of all the actions in the workflow.

Switches:
-all (optional, boolean)
-workflow_id (required)
The ID of the workflow
-parent_action_id (optional)
Returns:
list of action_id's.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::graph::draw workflow::graph::draw (public) workflow::action::fsm::get_ids workflow::action::fsm::get_ids workflow::graph::draw->workflow::action::fsm::get_ids workflow::action::get_ids workflow::action::get_ids (public) workflow::action::fsm::get_ids->workflow::action::get_ids

Testcases:
No testcase defined.

workflow::action::fsm::get_new_state (public)

 workflow::action::fsm::get_new_state -action_id action_id

Return the ID of the new state for an action

Switches:
-action_id (required)
The action_id of the action.
Returns:
The ID of the new state after executing this action, or the empty string if the action doesn't change the state.

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::fsm::get_new_state workflow::action::fsm::get_new_state workflow::action::fsm::get_new_state->workflow::action::get_from_request_cache

Testcases:
No testcase defined.

workflow::action::fsm::new (public)

 workflow::action::fsm::new -workflow_id workflow_id \
    [ -action_id action_id ] [ -sort_order sort_order ] \
    [ -short_name short_name ] -pretty_name pretty_name \
    [ -pretty_past_tense pretty_past_tense ] \
    [ -edit_fields edit_fields ] [ -allowed_roles allowed_roles ] \
    [ -assigned_role assigned_role ] [ -privileges privileges ] \
    [ -enabled_states enabled_states ] \
    [ -assigned_states assigned_states ] \
    [ -enabled_state_ids enabled_state_ids ] \
    [ -assigned_state_ids assigned_state_ids ] \
    [ -new_state new_state ] [ -new_state_id new_state_id ] \
    [ -callbacks callbacks ] [ -initial_action_p initial_action_p ] \
    [ -always_enabled_p always_enabled_p ] \
    [ -trigger_type trigger_type ] [ -parent_action parent_action ] \
    [ -description description ] \
    [ -description_mime_type description_mime_type ] \
    [ -timeout_seconds timeout_seconds ]

Add an action to a certain FSM (Finite State Machine) workflow. This procedure invokes the generic workflow::action::new procedures and does additional inserts for FSM specific information. See the parameter documentation for the proc workflow::action::new.

Switches:
-workflow_id (required)
-action_id (optional)
-sort_order (optional)
-short_name (optional)
-pretty_name (required)
-pretty_past_tense (optional)
-edit_fields (optional)
-allowed_roles (optional)
-assigned_role (optional)
-privileges (optional)
-enabled_states (optional)
-assigned_states (optional)
-enabled_state_ids (optional)
-assigned_state_ids (optional)
-new_state (optional)
-new_state_id (optional)
-callbacks (optional)
-initial_action_p (optional)
-always_enabled_p (optional, defaults to "f")
-trigger_type (optional, defaults to "user")
-parent_action (optional)
-description (optional)
-description_mime_type (optional)
-timeout_seconds (optional)
Returns:
the new action_id.
Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::test::workflow_setup workflow::test::workflow_setup (public) workflow::action::fsm::new workflow::action::fsm::new workflow::test::workflow_setup->workflow::action::fsm::new workflow::action::fsm::edit workflow::action::fsm::edit (public) workflow::action::fsm::new->workflow::action::fsm::edit

Testcases:
No testcase defined.

workflow::action::fsm::parse_spec (private)

 workflow::action::fsm::parse_spec -workflow_id workflow_id \
    -short_name short_name -spec spec \
    [ -parent_action_id parent_action_id ]

Parse the spec for an individual action definition.

Switches:
-workflow_id (required)
The id of the workflow to delete.
-short_name (required)
The short_name of the action
-spec (required)
The action spec
-parent_action_id (optional)
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::fsm::edit workflow::action::fsm::edit (public) workflow::action::fsm::parse_spec workflow::action::fsm::parse_spec workflow::action::fsm::parse_spec->workflow::action::fsm::edit

Testcases:
No testcase defined.

workflow::action::fsm::set_enabled_in_state (public)

 workflow::action::fsm::set_enabled_in_state -action_id action_id \
    -state_id state_id [ -enabled ] [ -assigned ] \
    [ -workflow_id workflow_id ]

Edit the enabled state of an action

Switches:
-action_id (required)
-state_id (required)
-enabled (optional, boolean)
-assigned (optional, boolean)
-workflow_id (optional)
Optionally provide the workflow_id. If not, this will be gotten from a query.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 db_boolean db_boolean (public) db_dml db_dml (public) db_string db_string (public) workflow::action::fsm::delete workflow::action::fsm::delete (public) workflow::action::get_element workflow::action::get_element (public) workflow::action::fsm::set_enabled_in_state workflow::action::fsm::set_enabled_in_state workflow::action::fsm::set_enabled_in_state->db_boolean workflow::action::fsm::set_enabled_in_state->db_dml workflow::action::fsm::set_enabled_in_state->db_string workflow::action::fsm::set_enabled_in_state->workflow::action::fsm::delete workflow::action::fsm::set_enabled_in_state->workflow::action::get_element

Testcases:
No testcase defined.

workflow::action::generate_short_name (public)

 workflow::action::generate_short_name -workflow_id workflow_id \
    -pretty_name pretty_name [ -short_name short_name ] \
    [ -action_id action_id ]

Generate a unique short_name from pretty_name.

Switches:
-workflow_id (required)
-pretty_name (required)
-short_name (optional)
-action_id (optional)
If you pass in this, we will allow that action's short_name to be reused.

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::edit workflow::action::edit (public) workflow::action::generate_short_name workflow::action::generate_short_name workflow::action::edit->workflow::action::generate_short_name _ _ (public) workflow::action::generate_short_name->_ util_text_to_url util_text_to_url (public) workflow::action::generate_short_name->util_text_to_url workflow::action::get_existing_short_names workflow::action::get_existing_short_names (public) workflow::action::generate_short_name->workflow::action::get_existing_short_names

Testcases:
No testcase defined.

workflow::action::get (public)

 workflow::action::get -action_id action_id -array array

Return information about an action with a given id.

Switches:
-action_id (required)
-array (required)
Returns:
The array will contain the following entries: workflow_id, sort_order, short_name, pretty_name, pretty_past_tense, assigned_role (short_name), assigned_role_id, always_enabled_p, trigger_type, parent_action, parent_action_id, description, description_mime_type values for an action.
Authors:
Peter Marklund
Lars Pind <lars@collaboraid.biz>
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 bug_tracker::bug::get_list bug_tracker::bug::get_list (public) workflow::action::get workflow::action::get bug_tracker::bug::get_list->workflow::action::get bug_tracker::scheduled::close_bugs bug_tracker::scheduled::close_bugs (public) bug_tracker::scheduled::close_bugs->workflow::action::get bug_tracker::security_violation bug_tracker::security_violation (public) bug_tracker::security_violation->workflow::action::get packages/acs-tcl/lib/page-error.tcl packages/acs-tcl/ lib/page-error.tcl packages/acs-tcl/lib/page-error.tcl->workflow::action::get packages/bug-tracker/www/bug.tcl packages/bug-tracker/ www/bug.tcl packages/bug-tracker/www/bug.tcl->workflow::action::get workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::get->workflow::action::get_from_request_cache

Testcases:
No testcase defined.

workflow::action::get_all_info (private)

 workflow::action::get_all_info -workflow_id workflow_id

This proc is for internal use in the workflow API only. Returns all information related to actions for a certain workflow instance. Uses util_memoize to cache values.

Switches:
-workflow_id (required)
Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::get_all_info workflow::action::get_all_info workflow::action::get_from_request_cache->workflow::action::get_all_info workflow::action::get_ids workflow::action::get_ids (public) workflow::action::get_ids->workflow::action::get_all_info workflow::action::refresh_request_cache workflow::action::refresh_request_cache (private) workflow::action::refresh_request_cache->workflow::action::get_all_info util_memoize util_memoize (public) workflow::action::get_all_info->util_memoize workflow::action::get_all_info_not_cached workflow::action::get_all_info_not_cached (private) workflow::action::get_all_info->workflow::action::get_all_info_not_cached workflow::cache_timeout workflow::cache_timeout (private) workflow::action::get_all_info->workflow::cache_timeout

Testcases:
No testcase defined.

workflow::action::get_all_info_not_cached (private)

 workflow::action::get_all_info_not_cached -workflow_id workflow_id

This proc is for internal use in the workflow API only and should not be invoked directly from application code. Returns all information related to actions for a certain workflow instance. Goes to the database on every invocation and should be used together with util_memoize.

Switches:
-workflow_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::get_all_info workflow::action::get_all_info (private) workflow::action::get_all_info_not_cached workflow::action::get_all_info_not_cached workflow::action::get_all_info->workflow::action::get_all_info_not_cached db_foreach db_foreach (public) workflow::action::get_all_info_not_cached->db_foreach util_memoize_seed util_memoize_seed (public) workflow::action::get_all_info_not_cached->util_memoize_seed workflow::action::get_workflow_id_not_cached workflow::action::get_workflow_id_not_cached (private) workflow::action::get_all_info_not_cached->workflow::action::get_workflow_id_not_cached workflow::fsm::get_states workflow::fsm::get_states (public) workflow::action::get_all_info_not_cached->workflow::fsm::get_states workflow::state::fsm::get workflow::state::fsm::get (public) workflow::action::get_all_info_not_cached->workflow::state::fsm::get

Testcases:
No testcase defined.

workflow::action::get_allowed_roles (public)

 workflow::action::get_allowed_roles -action_id action_id

Return the allowed roles of the given action

Switches:
-action_id (required)
The action_id of the action.
Returns:
List of role_id of the allowed roles

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::action::permission_p workflow::case::action::permission_p (public) workflow::action::get_allowed_roles workflow::action::get_allowed_roles workflow::case::action::permission_p->workflow::action::get_allowed_roles workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::get_allowed_roles->workflow::action::get_from_request_cache

Testcases:
No testcase defined.

workflow::action::get_assigned_role (public)

 workflow::action::get_assigned_role -action_id action_id

Return the assigned role of the given action

Switches:
-action_id (required)
The action_id of the action.
Returns:
role_id of the assigned role.

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::action::notify workflow::case::action::notify (public) workflow::action::get_assigned_role workflow::action::get_assigned_role workflow::case::action::notify->workflow::action::get_assigned_role workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::get_assigned_role->workflow::action::get_from_request_cache

Testcases:
No testcase defined.

workflow::action::get_callbacks (private)

 workflow::action::get_callbacks -action_id action_id \
    -contract_name contract_name

Return a list of implementation names for the callbacks of a given workflow action.

Switches:
-action_id (required)
-contract_name (required)
Author:
Peter Marklund
See Also:
  • workflow::case::role::get_callbacks

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::action::do_side_effects workflow::case::action::do_side_effects (public) workflow::action::get_callbacks workflow::action::get_callbacks workflow::case::action::do_side_effects->workflow::action::get_callbacks workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::get_callbacks->workflow::action::get_from_request_cache

Testcases:
No testcase defined.

workflow::action::get_element (public)

 workflow::action::get_element [ -action_id action_id ] \
    [ -one_id one_id ] -element element

Return a single element from the information about a action.

Switches:
-action_id (optional)
The ID of the action
-one_id (optional)
Same as action_id, just used for consistency across roles/actions/states.
-element (required)
The element you want
Returns:
The element you asked for
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 bug_tracker::scheduled::close_bugs bug_tracker::scheduled::close_bugs (public) workflow::action::get_element workflow::action::get_element bug_tracker::scheduled::close_bugs->workflow::action::get_element packages/acs-tcl/lib/page-error.tcl packages/acs-tcl/ lib/page-error.tcl packages/acs-tcl/lib/page-error.tcl->workflow::action::get_element packages/bug-tracker/www/bug.tcl packages/bug-tracker/ www/bug.tcl packages/bug-tracker/www/bug.tcl->workflow::action::get_element packages/bug-tracker/www/bulk-update-op.tcl packages/bug-tracker/ www/bulk-update-op.tcl packages/bug-tracker/www/bulk-update-op.tcl->workflow::action::get_element packages/bug-tracker/www/related-file-add.tcl packages/bug-tracker/ www/related-file-add.tcl packages/bug-tracker/www/related-file-add.tcl->workflow::action::get_element workflow::action::get workflow::action::get (public) workflow::action::get_element->workflow::action::get

Testcases:
No testcase defined.

workflow::action::get_existing_short_names (public)

 workflow::action::get_existing_short_names -workflow_id workflow_id \
    [ -ignore_action_id ignore_action_id ]

Returns a list of existing action short_names in this workflow. Useful when you're trying to ensure a short_name is unique, or construct a new short_name that is guaranteed to be unique.

Switches:
-workflow_id (required)
-ignore_action_id (optional)
If specified, the short_name for the given action will not be included in the result set.

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::generate_short_name workflow::action::generate_short_name (public) workflow::action::get_existing_short_names workflow::action::get_existing_short_names workflow::action::generate_short_name->workflow::action::get_existing_short_names workflow::action::get_element workflow::action::get_element (public) workflow::action::get_existing_short_names->workflow::action::get_element workflow::get_actions workflow::get_actions (public) workflow::action::get_existing_short_names->workflow::get_actions

Testcases:
No testcase defined.

workflow::action::get_from_request_cache (private)

 workflow::action::get_from_request_cache action_id [ element ]

This provides some abstraction for the Workflow API cache and also some optimization - we only convert lists to arrays once per request. Should be used internally by the workflow API only.

Parameters:
action_id (required)
element (optional)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::fsm::get_new_state workflow::action::fsm::get_new_state (public) workflow::action::get_from_request_cache workflow::action::get_from_request_cache workflow::action::fsm::get_new_state->workflow::action::get_from_request_cache workflow::action::get workflow::action::get (public) workflow::action::get->workflow::action::get_from_request_cache workflow::action::get_allowed_roles workflow::action::get_allowed_roles (public) workflow::action::get_allowed_roles->workflow::action::get_from_request_cache workflow::action::get_assigned_role workflow::action::get_assigned_role (public) workflow::action::get_assigned_role->workflow::action::get_from_request_cache workflow::action::get_callbacks workflow::action::get_callbacks (private) workflow::action::get_callbacks->workflow::action::get_from_request_cache workflow::action::get_all_info workflow::action::get_all_info (private) workflow::action::get_from_request_cache->workflow::action::get_all_info workflow::action::get_workflow_id workflow::action::get_workflow_id (public) workflow::action::get_from_request_cache->workflow::action::get_workflow_id workflow::action::refresh_request_cache workflow::action::refresh_request_cache (private) workflow::action::get_from_request_cache->workflow::action::refresh_request_cache

Testcases:
No testcase defined.

workflow::action::get_id (public)

 workflow::action::get_id -workflow_id workflow_id \
    -short_name short_name

Return the action_id of the action with the given short_name in the given workflow.

Switches:
-workflow_id (required)
The ID of the workflow
-short_name (required)
The short_name of the action
Returns:
action_id of the desired action, or the empty string if it can't be found.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/bug-tracker/www/bulk-update-op.tcl packages/bug-tracker/ www/bulk-update-op.tcl workflow::action::get_id workflow::action::get_id packages/bug-tracker/www/bulk-update-op.tcl->workflow::action::get_id packages/bug-tracker/www/patch.tcl packages/bug-tracker/ www/patch.tcl packages/bug-tracker/www/patch.tcl->workflow::action::get_id workflow::action::edit workflow::action::edit (public) workflow::action::edit->workflow::action::get_id workflow::state::fsm::edit workflow::state::fsm::edit (public) workflow::state::fsm::edit->workflow::action::get_id workflow::test::run_bug_tracker_test workflow::test::run_bug_tracker_test (public) workflow::test::run_bug_tracker_test->workflow::action::get_id workflow::action::refresh_request_cache workflow::action::refresh_request_cache (private) workflow::action::get_id->workflow::action::refresh_request_cache

Testcases:
No testcase defined.

workflow::action::get_ids (public)

 workflow::action::get_ids [ -all ] -workflow_id workflow_id \
    [ -parent_action_id parent_action_id ]

Get the action_id's of all the actions in the workflow.

Switches:
-all (optional, boolean)
-workflow_id (required)
The ID of the workflow
-parent_action_id (optional)
Returns:
list of action_id's.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::fsm::get_ids workflow::action::fsm::get_ids (public) workflow::action::get_ids workflow::action::get_ids workflow::action::fsm::get_ids->workflow::action::get_ids workflow::get_actions workflow::get_actions (public) workflow::get_actions->workflow::action::get_ids workflow::action::get_all_info workflow::action::get_all_info (private) workflow::action::get_ids->workflow::action::get_all_info workflow::action::get_element workflow::action::get_element (public) workflow::action::get_ids->workflow::action::get_element

Testcases:
No testcase defined.

workflow::action::get_options (public)

 workflow::action::get_options [ -all ] -workflow_id workflow_id \
    [ -parent_action_id parent_action_id ]

Get an options list of actions for use with form builder.

Switches:
-all (optional, boolean)
-workflow_id (required)
-parent_action_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::get workflow::action::get (public) workflow::get_actions workflow::get_actions (public) workflow::action::get_options workflow::action::get_options workflow::action::get_options->workflow::action::get workflow::action::get_options->workflow::get_actions

Testcases:
No testcase defined.

workflow::action::get_privileges (public)

 workflow::action::get_privileges -action_id action_id

Return the assigned role of the given action

Switches:
-action_id (required)
The action_id of the action.
Returns:
List of privileges that give permission to do this action

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::action::permission_p workflow::case::action::permission_p (public) workflow::action::get_privileges workflow::action::get_privileges workflow::case::action::permission_p->workflow::action::get_privileges workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::get_privileges->workflow::action::get_from_request_cache

Testcases:
No testcase defined.

workflow::action::get_workflow_id (public)

 workflow::action::get_workflow_id -action_id action_id

Lookup the workflow_id of a certain action_id.

Switches:
-action_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::callback_insert workflow::action::callback_insert (public) workflow::action::get_workflow_id workflow::action::get_workflow_id workflow::action::callback_insert->workflow::action::get_workflow_id workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::get_from_request_cache->workflow::action::get_workflow_id util_memoize util_memoize (public) workflow::action::get_workflow_id->util_memoize workflow::action::get_workflow_id_not_cached workflow::action::get_workflow_id_not_cached (private) workflow::action::get_workflow_id->workflow::action::get_workflow_id_not_cached

Testcases:
No testcase defined.

workflow::action::get_workflow_id_not_cached (private)

 workflow::action::get_workflow_id_not_cached -action_id action_id

This is a proc that should only be used internally by the workflow API, applications should use workflow::action::get_workflow_id instead.

Switches:
-action_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::get_all_info_not_cached workflow::action::get_all_info_not_cached (private) workflow::action::get_workflow_id_not_cached workflow::action::get_workflow_id_not_cached workflow::action::get_all_info_not_cached->workflow::action::get_workflow_id_not_cached workflow::action::get_workflow_id workflow::action::get_workflow_id (public) workflow::action::get_workflow_id->workflow::action::get_workflow_id_not_cached db_string db_string (public) workflow::action::get_workflow_id_not_cached->db_string

Testcases:
No testcase defined.

workflow::action::new (public)

 workflow::action::new -workflow_id workflow_id \
    [ -action_id action_id ] [ -sort_order sort_order ] \
    [ -short_name short_name ] -pretty_name pretty_name \
    [ -pretty_past_tense pretty_past_tense ] \
    [ -edit_fields edit_fields ] [ -assigned_role assigned_role ] \
    [ -allowed_roles allowed_roles ] [ -privileges privileges ] \
    [ -callbacks callbacks ] [ -always_enabled_p always_enabled_p ] \
    [ -initial_action_p initial_action_p ] \
    [ -trigger_type trigger_type ] [ -parent_action parent_action ] \
    [ -description description ] \
    [ -description_mime_type description_mime_type ] \
    [ -timeout_seconds timeout_seconds ] [ -internal ]

This procedure is normally not invoked from application code. Instead a procedure for a certain workflow implementation, such as for example workflow::action::fsm::new (for Finite State Machine workflows), is used.

Switches:
-workflow_id (required)
The id of the FSM workflow to add the action to
-action_id (optional)
Optionally specify the ID of the new action.
-sort_order (optional)
The number which this action should be in the sort ordering sequence. Leave blank to add action at the end. If you provide a sort_order number which already exists, existing actions are pushed down one number.
-short_name (optional)
Short name of the action for use in source code. Should be on Tcl variable syntax.
-pretty_name (required)
Human readable name of the action for use in UI.
-pretty_past_tense (optional)
Past tense of pretty name
-edit_fields (optional)
A space-separated list of the names of form fields which should be opened for editing when this action is carried out.
-assigned_role (optional)
The short_name of an assigned role. Users in this role are expected (obliged) to take the action.
-allowed_roles (optional)
A list of role short_names or IDs. Users in these roles are allowed to take the action.
-privileges (optional)
Users with these privileges on the object treated by the workflow (i.e. a bug in the Bug Tracker) will be allowed to take this action.
-callbacks (optional)
List of names of service contract implementations of callbacks for the action in impl_owner_name.impl_name format.
-always_enabled_p (optional, defaults to "f")
-initial_action_p (optional)
Deprecated. Use this switch to indicate that this is the initial action that will fire whenever a case of the workflow is created. The initial action is used to determine the initial state of the worklow as well as any procedures that should be executed when the case created.
-trigger_type (optional, defaults to "user")
user, auto, message, time, init, workflow, parallel, dynamic.
-parent_action (optional)
Short_name of the action's parent action.
-description (optional)
-description_mime_type (optional)
-timeout_seconds (optional)
If zero, the action will automatically fire whenever it becomes enabled. If greater than zero, the action will automatically fire x number of seconds after the action is enabled. If empty, will never fire automatically.
-internal (optional, boolean)
Set this flag if you're calling this proc from within the corresponding proc for a particular workflow model. Will cause this proc to not flush the cache or call workflow::definition_changed_handler, which the caller must then do.
Returns:
The id of the created action
Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::edit workflow::action::edit (public) workflow::action::new workflow::action::new workflow::action::new->workflow::action::edit

Testcases:
No testcase defined.

workflow::action::pretty_name_unique_p (public)

 workflow::action::pretty_name_unique_p -workflow_id workflow_id \
    -pretty_name pretty_name [ -parent_action_id parent_action_id ] \
    [ -action_id action_id ]

Check if suggested pretty_name is unique.

Switches:
-workflow_id (required)
-pretty_name (required)
-parent_action_id (optional)
-action_id (optional)
Returns:
1 if unique, 0 if not unique.

Partial Call Graph (max 5 caller/called nodes):
%3 db_string db_string (public) workflow::action::pretty_name_unique_p workflow::action::pretty_name_unique_p workflow::action::pretty_name_unique_p->db_string

Testcases:
No testcase defined.

workflow::action::refresh_request_cache (private)

 workflow::action::refresh_request_cache workflow_id

Initializes the cached array with information about actions for a certain workflow so that it can be reused within one request.

Parameters:
workflow_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::get_from_request_cache workflow::action::get_from_request_cache (private) workflow::action::refresh_request_cache workflow::action::refresh_request_cache workflow::action::get_from_request_cache->workflow::action::refresh_request_cache workflow::action::get_id workflow::action::get_id (public) workflow::action::get_id->workflow::action::refresh_request_cache workflow::action::get_all_info workflow::action::get_all_info (private) workflow::action::refresh_request_cache->workflow::action::get_all_info

Testcases:
No testcase defined.

workflow::action::update_sort_order (private)

 workflow::action::update_sort_order -workflow_id workflow_id \
    -sort_order sort_order

Increase the sort_order of other actions, if the new sort_order is already taken.

Switches:
-workflow_id (required)
-sort_order (required)

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::edit workflow::action::edit (public) workflow::action::update_sort_order workflow::action::update_sort_order workflow::action::edit->workflow::action::update_sort_order db_dml db_dml (public) workflow::action::update_sort_order->db_dml db_string db_string (public) workflow::action::update_sort_order->db_string

Testcases:
No testcase defined.
[ show source ]