workflow::case::action::complete (private)

 workflow::case::action::complete -enabled_action_id enabled_action_id \
    [ -user_id user_id ]

Defined in packages/workflow/tcl/case-procs.tcl

Mark an action complete.

Switches:
-enabled_action_id (required)
-user_id (optional)
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::action::execute workflow::case::action::execute (public) workflow::case::action::complete workflow::case::action::complete workflow::case::action::execute->workflow::case::action::complete db_dml db_dml (public) workflow::case::action::complete->db_dml db_transaction db_transaction (public) workflow::case::action::complete->db_transaction workflow::action::get workflow::action::get (public) workflow::case::action::complete->workflow::action::get workflow::case::enabled_action_get workflow::case::enabled_action_get (public) workflow::case::action::complete->workflow::case::enabled_action_get

Testcases:
No testcase defined.
Source code:
    db_transaction {
        workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action
        workflow::action::get -action_id $enabled_action(action_id) -array action
        
        if {$enabled_action(parent_trigger_type) in { parallel dynamic }} {
            db_dml completed_p {
                update workflow_case_enabled_actions
                set    completed_p = 't'
                where  enabled_action_id = :enabled_action_id
            }

            # Delete children
            db_dml delete_enabled_actions {
                delete
                from   workflow_case_enabled_actions
                where  parent_enabled_action_id = :enabled_action_id
            }
        } else {
            # Delete the workflow_case_enabled_actions row
            # Will cascade delete the corresponding state information
            set case_id $enabled_action(case_id)
            db_dml delete_enabled_actions {
                delete
                from   workflow_case_enabled_actions
                where  enabled_action_id = :enabled_action_id
            }
        }
    }
Generic XQL file:
packages/workflow/tcl/case-procs.xql

PostgreSQL XQL file:
packages/workflow/tcl/case-procs-postgresql.xql

Oracle XQL file:
packages/workflow/tcl/case-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: