bug_tracker::bug::instance_workflow_create (private)
bug_tracker::bug::instance_workflow_create -package_id package_id \ [ -workflow_id workflow_id ]
Defined in packages/bug-tracker/tcl/bug-procs.tcl
Creates a clone of the given workflow for a specific package instance, or reassign an existing clone if it already exists.
- Switches:
- -package_id (required)
- -workflow_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if { ![info exists workflow_id] } { set workflow_id [get_package_workflow_id] } if { ![db_0or1row get_workflow_id {}] } { # The workflow package only allows one instance of a workflow to be bound to # a given object. If the workflow doesn't exist for this package instance, # we clone the package workflow. If it does, we just reuse the existing clone. set workflow_id [workflow::fsm::clone -workflow_id $workflow_id -object_id $package_id] } db_dml update_project {} return $workflow_idGeneric XQL file: <fullquery name="bug_tracker::bug::instance_workflow_create.get_workflow_id"> <querytext> select w1.workflow_id from workflows w, workflows w1 where w.workflow_id = :workflow_id and w.short_name = w1.short_name and w1.object_id = :package_id </querytext> </fullquery> <fullquery name="bug_tracker::bug::instance_workflow_create.update_project"> <querytext> update bt_projects set workflow_id = :workflow_id where project_id = :package_id </querytext> </fullquery>packages/bug-tracker/tcl/bug-procs.xql
PostgreSQL XQL file: packages/bug-tracker/tcl/bug-procs-postgresql.xql
Oracle XQL file: packages/bug-tracker/tcl/bug-procs-oracle.xql