namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::workflow_case {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object
set :abstract_p f
set :auto_save false
set :name_method {}
set :object_type ::xo::db::sql::workflow_case
set :security_inherit_p t
set :sql_package_name workflow_case
set :supertype acs_object
set :with_table true}
::xo::db::sql::workflow_case proc sweep_hold_timeout {{-dbn {}}} {
foreach var [list ] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__sweep_hold_timeout()
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc cancel_task {{-dbn {}} -task_id:required -journal_id:required} {
foreach var [list TASK_ID JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__cancel_task($_TASK_ID, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc task_action {{-dbn {}} -task_id:required -action:required -action_ip:required -user_id:required -msg} {
foreach var [list TASK_ID ACTION ACTION_IP USER_ID MSG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__task_action($_TASK_ID, $_ACTION, $_ACTION_IP, $_USER_ID, $_MSG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc finished_p {{-dbn {}} -case_id:required -journal_id:required} {
foreach var [list CASE_ID JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__finished_p($_CASE_ID, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc release_token {{-dbn {}} -task_id:required -journal_id:required} {
foreach var [list TASK_ID JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__release_token($_TASK_ID, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc add_token {{-dbn {}} -case_id:required -place_key:required -journal_id:required} {
foreach var [list CASE_ID PLACE_KEY JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__add_token($_CASE_ID, $_PLACE_KEY, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc resume {{-dbn {}} -case_id:required -user_id -ip_address -msg} {
foreach var [list CASE_ID USER_ID IP_ADDRESS MSG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__resume($_CASE_ID, $_USER_ID, $_IP_ADDRESS, $_MSG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc evaluate_guard {{-dbn {}} -callback:required -custom_arg:required -case_id:required -workflow_key:required -transition_key:required -place_key:required -direction:required} {
foreach var [list CALLBACK CUSTOM_ARG CASE_ID WORKFLOW_KEY TRANSITION_KEY PLACE_KEY DIRECTION] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__evaluate_guard($_CALLBACK, $_CUSTOM_ARG, $_CASE_ID, $_WORKFLOW_KEY, $_TRANSITION_KEY, $_PLACE_KEY, $_DIRECTION)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc new {{-dbn {}} -case_id -workflow_key:required -context_key -object_id:required {-creation_date now()} -creation_user -creation_ip -childof} {
foreach var [list CASE_ID WORKFLOW_KEY CONTEXT_KEY OBJECT_ID CREATION_DATE CREATION_USER CREATION_IP] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__new($_CASE_ID, $_WORKFLOW_KEY, $_CONTEXT_KEY, $_OBJECT_ID, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc ensure_task_in_state {{-dbn {}} -task_id:required -state:required} {
foreach var [list TASK_ID STATE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__ensure_task_in_state($_TASK_ID, $_STATE)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc set_attribute_value {{-dbn {}} -journal_id:required -attribute_name:required -value:required} {
foreach var [list JOURNAL_ID ATTRIBUTE_NAME VALUE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__set_attribute_value($_JOURNAL_ID, $_ATTRIBUTE_NAME, $_VALUE)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc execute_hold_timeout_callback {{-dbn {}} -callback:required -custom_arg:required -case_id:required -transition_key:required} {
foreach var [list CALLBACK CUSTOM_ARG CASE_ID TRANSITION_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__execute_hold_timeout_callback($_CALLBACK, $_CUSTOM_ARG, $_CASE_ID, $_TRANSITION_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc sweep_timed_transitions {{-dbn {}}} {
foreach var [list ] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__sweep_timed_transitions()
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc remove_manual_assignment {{-dbn {}} -case_id:required -role_key:required -party_id:required} {
foreach var [list CASE_ID ROLE_KEY PARTY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__remove_manual_assignment($_CASE_ID, $_ROLE_KEY, $_PARTY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc delete {{-dbn {}} -case_id:required} {
foreach var [list CASE_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__delete($_CASE_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc fire_transition_internal {{-dbn {}} -task_id:required -journal_id:required} {
foreach var [list TASK_ID JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__fire_transition_internal($_TASK_ID, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc set_case_deadline {{-dbn {}} -case_id:required -transition_key:required -deadline:required} {
foreach var [list CASE_ID TRANSITION_KEY DEADLINE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__set_case_deadline($_CASE_ID, $_TRANSITION_KEY, $_DEADLINE)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc cancel {{-dbn {}} -case_id:required -user_id -ip_address -msg} {
foreach var [list CASE_ID USER_ID IP_ADDRESS MSG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__cancel($_CASE_ID, $_USER_ID, $_IP_ADDRESS, $_MSG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc remove_case_deadline {{-dbn {}} -case_id:required -transition_key:required} {
foreach var [list CASE_ID TRANSITION_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__remove_case_deadline($_CASE_ID, $_TRANSITION_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc add_manual_assignment {{-dbn {}} -case_id:required -role_key:required -party_id:required} {
foreach var [list CASE_ID ROLE_KEY PARTY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__add_manual_assignment($_CASE_ID, $_ROLE_KEY, $_PARTY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc get_task_id {{-dbn {}} -case_id:required -transition_key:required} {
foreach var [list CASE_ID TRANSITION_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__get_task_id($_CASE_ID, $_TRANSITION_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc sweep_automatic_transitions {{-dbn {}} -case_id:required -journal_id:required} {
foreach var [list CASE_ID JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__sweep_automatic_transitions($_CASE_ID, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc get_attribute_value {{-dbn {}} -case_id:required -attribute_name:required} {
foreach var [list CASE_ID ATTRIBUTE_NAME] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__get_attribute_value($_CASE_ID, $_ATTRIBUTE_NAME)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc remove_task_assignment {{-dbn {}} -task_id:required -party_id:required -permanent_p:required} {
foreach var [list TASK_ID PARTY_ID PERMANENT_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__remove_task_assignment($_TASK_ID, $_PARTY_ID, $_PERMANENT_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc start_task {{-dbn {}} -task_id:required -user_id:required -journal_id:required} {
foreach var [list TASK_ID USER_ID JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__start_task($_TASK_ID, $_USER_ID, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc execute_transition_callback {{-dbn {}} -callback:required -custom_arg:required -case_id:required -transition_key:required} {
foreach var [list CALLBACK CUSTOM_ARG CASE_ID TRANSITION_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__execute_transition_callback($_CALLBACK, $_CUSTOM_ARG, $_CASE_ID, $_TRANSITION_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc start_case {{-dbn {}} -case_id:required -creation_user -creation_ip -msg} {
foreach var [list CASE_ID CREATION_USER CREATION_IP MSG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__start_case($_CASE_ID, $_CREATION_USER, $_CREATION_IP, $_MSG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc lock_token {{-dbn {}} -case_id:required -place_key:required -journal_id:required -task_id:required} {
foreach var [list CASE_ID PLACE_KEY JOURNAL_ID TASK_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__lock_token($_CASE_ID, $_PLACE_KEY, $_JOURNAL_ID, $_TASK_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc set_task_assignments {{-dbn {}} -task_id:required -callback:required -custom_arg:required} {
foreach var [list TASK_ID CALLBACK CUSTOM_ARG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__set_task_assignments($_TASK_ID, $_CALLBACK, $_CUSTOM_ARG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc suspend {{-dbn {}} -case_id:required -user_id -ip_address -msg} {
foreach var [list CASE_ID USER_ID IP_ADDRESS MSG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__suspend($_CASE_ID, $_USER_ID, $_IP_ADDRESS, $_MSG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc consume_token {{-dbn {}} -case_id:required -place_key:required -journal_id:required -task_id} {
foreach var [list CASE_ID PLACE_KEY JOURNAL_ID TASK_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__consume_token($_CASE_ID, $_PLACE_KEY, $_JOURNAL_ID, $_TASK_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc add_task_assignment {{-dbn {}} -task_id:required -party_id:required -permanent_p:required} {
foreach var [list TASK_ID PARTY_ID PERMANENT_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__add_task_assignment($_TASK_ID, $_PARTY_ID, $_PERMANENT_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc finish_task {{-dbn {}} -task_id:required -journal_id:required} {
foreach var [list TASK_ID JOURNAL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__finish_task($_TASK_ID, $_JOURNAL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc clear_task_assignments {{-dbn {}} -task_id:required -permanent_p:required} {
foreach var [list TASK_ID PERMANENT_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__clear_task_assignments($_TASK_ID, $_PERMANENT_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc fire_message_transition {{-dbn {}} -task_id:required} {
foreach var [list TASK_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__fire_message_transition($_TASK_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc enable_transitions {{-dbn {}} -case_id:required} {
foreach var [list CASE_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__enable_transitions($_CASE_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc begin_task_action {{-dbn {}} -task_id:required -action:required -action_ip:required -user_id:required -msg} {
foreach var [list TASK_ID ACTION ACTION_IP USER_ID MSG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__begin_task_action($_TASK_ID, $_ACTION, $_ACTION_IP, $_USER_ID, $_MSG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc execute_time_callback {{-dbn {}} -callback:required -custom_arg:required -case_id:required -transition_key:required} {
foreach var [list CALLBACK CUSTOM_ARG CASE_ID TRANSITION_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__execute_time_callback($_CALLBACK, $_CUSTOM_ARG, $_CASE_ID, $_TRANSITION_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc end_task_action {{-dbn {}} -journal_id:required -action:required -task_id:required} {
foreach var [list JOURNAL_ID ACTION TASK_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__end_task_action($_JOURNAL_ID, $_ACTION, $_TASK_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc notify_assignee {{-dbn {}} -task_id:required -user_id:required -callback:required -custom_arg:required} {
foreach var [list TASK_ID USER_ID CALLBACK CUSTOM_ARG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__notify_assignee($_TASK_ID, $_USER_ID, $_CALLBACK, $_CUSTOM_ARG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc clear_manual_assignments {{-dbn {}} -case_id:required -role_key:required} {
foreach var [list CASE_ID ROLE_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__clear_manual_assignments($_CASE_ID, $_ROLE_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc get_task_deadline {{-dbn {}} -callback:required -custom_arg:required -attribute_name:required -case_id:required -transition_key:required} {
foreach var [list CALLBACK CUSTOM_ARG ATTRIBUTE_NAME CASE_ID TRANSITION_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__get_task_deadline($_CALLBACK, $_CUSTOM_ARG, $_ATTRIBUTE_NAME, $_CASE_ID, $_TRANSITION_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::workflow_case proc execute_unassigned_callback {{-dbn {}} -callback:required -task_id:required -custom_arg:required} {
foreach var [list CALLBACK TASK_ID CUSTOM_ARG] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select workflow_case__execute_unassigned_callback($_CALLBACK, $_TASK_ID, $_CUSTOM_ARG)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}