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 ]
Defined in packages/workflow/tcl/action-procs.tcl
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):
- Testcases:
- No testcase defined.
Source code: # Wrapper for workflow::action::edit array set row [list] foreach col { initial_action_p sort_order short_name pretty_name pretty_past_tense edit_fields allowed_roles assigned_role privileges callbacks always_enabled_p description description_mime_type timeout_seconds trigger_type parent_action } { if { [info exists $col] } { set row($col) [set $col] } } foreach elm { new_state new_state_id enabled_states assigned_states enabled_state_ids assigned_state_ids } { if { ([info exists $elm] && $$elm ne "") } { set row($elm) [set $elm] } } set action_id [workflow::action::fsm::edit -operation "insert" -action_id $action_id -workflow_id $workflow_id -array row] return $action_idGeneric XQL file: <fullquery name="workflow::action::fsm::new.insert_fsm_action"> <querytext> insert into workflow_fsm_actions (action_id, new_state) values (:action_id, :new_state_id) </querytext> </fullquery>packages/workflow/tcl/action-procs.xql
PostgreSQL XQL file: packages/workflow/tcl/action-procs-postgresql.xql
Oracle XQL file: packages/workflow/tcl/action-procs-oracle.xql