egain-config
Version:
JavaScript library for interfacing with eGain back-end systems.
49 lines (46 loc) • 1.38 kB
JavaScript
module.exports = {
getNextSequence () {
// SQL input parameters:
// @table_name
//
// SQL output parameters:
// @v_new_seq bigint - the new sequence number
// @v_sql_code int - SQL status code for query. 0 is success.
// @v_sql_message nvarchar - SQL status text for errors. empty if success.
//
return `DECLARE int,
numeric(19, 0),
int,
nvarchar(1024)
EXEC = [dbo].[egpl_f_get_next_seq]
= ,
= OUTPUT,
= OUTPUT,
= OUTPUT
SELECT as v_new_seq,
as v_sql_code,
as v_sql_message`
},
lock () {
// input
// @locked_object_id bigint - the alias ID
// @locked_object_type int - 6 for email alias type
// @locking_object_id bigint - the workflow ID
// @locking_object_type int - 1057 for workflow type
// example input 1008,6,1039,1057
// 1008,6,1042,1057
//
// 1038,1056,1044,1057
return `INSERT INTO egpl_object_locking (
locked_object_id,
locked_object_type,
locking_object_id,
locking_object_type
) VALUES (
,
,
,
)`
}
}