Functions to insert, update, and delete records to built-in table in a workflow.
Tips
$fn.createCase
Register a new record in the $case table.
Arguments
Name
Type
Description
param
object
Input Object
Property
Type
Description
database
string
Database with built-in tables
status_id
string
Status ID
owner_id
string
User ID of the next person in charge
Return value
Type
Description
Promise<{case: Case}>
Objects with the case property
Property
Type
Description
case
Case
Case Object
Tips
Sample
$fn.updateCase
Updates the $case table with the target case subject to the case_id according to the argument.
Arguments
Name
Type
Description
param
object
Input object
Property
Type
Description
database
string
Database with built-in tables
case_id
string
Case ID
status_id
string
Status ID
owner_id
string
User ID of the next person in charge
Return value
Type
Description
Promise<{case: Case}>
Objects with the case property
Property
Type
Description
case
Case
Case Object
Tips
Sample
$fn.remandCase
Updates the target case according to the arguments subject to case_id for the $case table. The status_id and owner_id of the $case table are updated to the previous status_id and the person in charge from the history in the $case_history table.
Arguments
Name
Type
Description
param
object
Input Object
Property
Type
Description
database
string
Database with built-in tables
case_id
string
Case ID
Return value
Type
Description
Promise<{case: Case}>
Objects with the case property
Property
Type
Description
case
Case
Case Object
Tips
Sample
$fn.withdrawCase
Updates the target case according to the argument subject to case_id for the $case table. The owner_id of the $case table is updated with the user who executed $fn.withdrawCase (=sign-in user).
Arguments
Name
Type
Description
param
object
Input Object
Property
Type
Description
database
string
Database with built-in tables
status_id
string
Status ID
owner_id
string
User ID of the next person in charge
Return value
Type
Description
Promise<{case: Case}>
Objects with the case property
Property
Type
Description
case
Case
Case Object
Tips
Sample
$fn.rejectCase
Updates the target case according to the argument subject to case_id for the $case table. The $case table is updated with a blank owner_id.
Arguments
Name
Type
Description
param
object
Input Object
Property
Type
Description
database
string
Database with built-in tables
case_id
string
Case ID
status_id
string
Status ID
Return value
Type
Description
Promise<{case: Case}>
Objects with the case property
Property
Type
Description
case
Case
Case Object
Tips
Sample
$fn.getWorkflowDef
Retrieve workflow definition information defined in the Workflow Editor