xo::db::sql::workflow proc create_workflow (public)
xo::db::sql::workflow create_workflow [ -dbn dbn ] \ -workflow_key workflow_key -pretty_name pretty_name \ [ -pretty_plural pretty_plural ] [ -description description ] \ -table_name table_name [ -id_column id_column ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn (optional)
- -workflow_key (required)
- -pretty_name (required)
- -pretty_plural (optional)
- -description (optional)
- -table_name (required)
- -id_column (optional, defaults to
"case_id"
)- Testcases:
- No testcase defined.
Source code: #function_args: {WORKFLOW_KEY {}} {PRETTY_NAME {}} {PRETTY_PLURAL null} {DESCRIPTION null} {TABLE_NAME {}} {ID_COLUMN case_id} foreach var [list WORKFLOW_KEY PRETTY_NAME PRETTY_PLURAL DESCRIPTION TABLE_NAME ID_COLUMN] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select workflow__create_workflow($_WORKFLOW_KEY, $_PRETTY_NAME, $_PRETTY_PLURAL, $_DESCRIPTION, $_TABLE_NAME, $_ID_COLUMN) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }XQL Not present: Generic, PostgreSQL, Oracle