Skip to content

SQL-001 Insert a task

Inserts a new TASK row by calling the Oracle stored procedure pk82036_task.task_insert with 21 input parameters and a RowsAffected return value.

Classification

Field Value
SQL ID SQL-001
Operation type Create
Execution method Stored procedure
Database Oracle
Schema [unqualified]**
Command type StoredProcedure
Business object clsTask
Criteria property InsertSQL
Lifecycle method BeforeInsert / AfterInsert

Parameters

Parameter Direction Type Max length Description
:CreateUser Input String 30 Creating user ID (defaults to IDataPortalInfo.UserID, BR-014)
:UpdateUser Input clsSmartString 30 Last-update user ID (mirrors CreateUser on insert)
:DeleteFlag Input String 1 Completion/soft-delete flag; N on new tasks (BR-015)
:NotepadFlag Input String 1 Notepad-entry flag; N on new tasks (BR-015)
:TaskUser Input String 30 Assigned MailID (trimmed/upper-cased, BR-016) → TASK.TASK_USER
:TaskActionCode Input String 5 Action code from the concrete task's ActionCode
:TaskCategoryCode Input String 30 Task category code (column is 5-char in the code table; parameter declared 30)*
:TaskDate Input clsSmartDate — Task due date (normalized to a working day, BR-009)
:TaskPriorityCode Input String 5 Task priority code
:TaskSourceCode Input String 5 Source system code (insert only — immutable afterwards)
:TaskText Input String 4000 Task narrative text
:PolicyNum Input clsSmartDecimal — Optional policy number (nullable)
:ClaimID Input clsSmartDecimal — Optional claim ID (nullable)
:ImageSeqNum Input clsSmartDecimal — Optional imaging document sequence number (nullable)
:TaskSecurity Input String 30 Security classification string (stored, never evaluated in this library)
:ContextDate Input clsSmartDate — Context date value
:ContextNum Input clsSmartDecimal — Context numeric value
:ContextCode Input clsSmartString 5 Context code
:ContextCategory Input clsSmartString 100 Context category
:ContextKey Input clsSmartString 100 Context key
:ContextText Input clsSmartString 4000 Context text value
:RowsAffected ReturnValue Integer N/A Rows written; checked by AfterInsert (BR-010)

Tables

Table Access Columns used
TASK INSERT All 25 TASK columns (see parameter list)

Sample SQL

-- CommandType.StoredProcedure, RequestType = NonQuery, DataRequest.ID = "INSERT"
CALL pk82036_task.task_insert(
  :CreateUser,
  :UpdateUser,
  :DeleteFlag,
  :NotepadFlag,
  :TaskUser,
  :TaskActionCode,
  :TaskCategoryCode,
  :TaskDate,
  :TaskPriorityCode,
  :TaskSourceCode,
  :TaskText,
  :PolicyNum,
  :ClaimID,
  :ImageSeqNum,
  :TaskSecurity,
  :ContextDate,
  :ContextNum,
  :ContextCode,
  :ContextCategory,
  :ContextKey,
  :ContextText,
  :RowsAffected)

The procedure body resides in the Oracle database and could not be retrieved in this environment. Parameter order above reflects the AddParm call order in clsTask.BeforeInsert; the actual PL/SQL formal parameter list is unverified.**

Operations and processes

Business rules

Sources

  • SAIF.Business.Tasks/clsTask.vb