clsTask¶
clsTask is the abstract base for every task business object in the SAIF BOF architecture. It owns the full persistence lifecycle against the pk82036_task Oracle stored-procedure package (insert/update/delete/select), common properties (category, priority, source, MailID, date, text, context), rule wiring for the shared task business rules, and snapshot/restore state for the framework's edit/cancel lifecycle. Concrete subclasses (in SAIF.Business.Tasks.Claim) supply source-system-specific behavior such as ActionCode, SourceCode, SourceSystem, Load, PostFill, CopyTo, MarkCompleted, and NewTask.
Purpose¶
- Provide the shared persistence contract for a single task row, routing create/update/delete through
pk82036_taskand retrieval throughpk82036_task.task_select(SQL-001, SQL-002, SQL-013, SQL-014). - Enforce the common task validation rules (required category/source/priority/MailID, valid source/category combination, current-or-future date) (BR-001–BR-008).
- Normalize task due dates to a working day via
AssignTaskDate(BR-009). - Provide an extensibility point (
OverrideRules) so descendants can relax or approve a failing common rule (BR-026).
Context¶
- Namespace:
SAIF.Business.Tasks - Assembly/package:
SAIF.Business.Tasks(embedded in theLegalMaintenanceweb deployment)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
CategoryCode |
Property CategoryCode As String |
Task category code; must be set for a task to save (BR-001). |
ClaimID |
Property ClaimID As clsSmartDecimal |
Optional claim this task is attached to; nullable via SetClaimIDNull. |
ImageSeqNum |
Property ImageSeqNum As clsSmartDecimal |
Optional imaging document sequence number associated with the task. |
MailID |
Property MailID As String |
Assigned user; setter trims/upper-cases and fires the required-MailID rule (BR-004, BR-016). |
PolicyNumber |
Property PolicyNumber As clsSmartDecimal |
Optional policy this task is attached to; nullable via SetPolicyNumberNull. |
PriorityCode |
Property PriorityCode As String |
Task priority code; must be set for a task to save (BR-003). |
TaskDate |
Property TaskDate As clsSmartDate |
Task due date; setter routes through AssignTaskDate, normalizing non-working days (BR-009). |
TaskSecurity |
Property TaskSecurity As String |
Security classification string; persisted but never evaluated in this library**. |
Text |
Property Text As String |
Task narrative text; Nothing is coerced to String.Empty (BR-027). |
CreateDate |
ReadOnly Property CreateDate As clsSmartDate |
Date the task row was created. |
CreateUser |
ReadOnly Property CreateUser As String |
User who created the task; defaults to the DPI user identity when unset (BR-014). |
UpdateDate |
ReadOnly Property UpdateDate As clsSmartDate |
Date of the last successful update. |
UpdateUser |
ReadOnly Property UpdateUser As String |
User who performed the last update. |
TaskSeqNum |
ReadOnly Property TaskSeqNum As clsSmartDecimal |
Primary key of the task row; the optimistic-concurrency token pair with UpdateSeqNum protects updates/deletes (BR-013). |
IsMailIDModified |
ReadOnly Property IsMailIDModified As Boolean |
Whether MailID has changed since load. |
IsTaskDateModified |
ReadOnly Property IsTaskDateModified As Boolean |
Whether TaskDate has changed since load. |
TaskDateModified |
ReadOnly Property TaskDateModified As Boolean |
Set when AssignTaskDate auto-shifted the date to a working day; drives the BR-008 warning. |
MyCriteria |
ReadOnly Property MyCriteria As CriteriaBase |
The nested IBusinessCriteria instance carrying the stored-procedure names and DPI for this task. |
ActionCode |
MustOverride ReadOnly Property ActionCode As String |
Abstract — descendant supplies the task's action code. |
DisplayField1, DisplayField2, DisplayField3 |
MustOverride ReadOnly Property DisplayFieldN As String |
Abstract — descendant supplies source-system-specific display text. |
RequiresNotePadEntry |
MustOverride ReadOnly Property RequiresNotePadEntry As Boolean |
Abstract — descendant determines whether a notepad entry is mandatory. |
SourceCode |
MustOverride ReadOnly Property SourceCode As String |
Abstract — descendant supplies the task's source category code. |
SourceSystem |
MustOverride ReadOnly Property SourceSystem As TaskSourceSystem |
Abstract — descendant supplies its TaskSourceSystem enum value. |
Load |
MustOverride Sub Load(dpi As IDataPortalInfo, reader As IDataReader) |
Abstract — descendant maps its own additional columns after the base Fill. |
PostFill |
MustOverride Sub PostFill() |
Abstract — hook called at the end of Fill for descendant-specific mapping. |
CopyTo |
MustOverride Function CopyTo(inMailID As String) As iTask |
Abstract — descendant creates a new instance and calls CopyTask to populate it (see Copy a task to another user). |
MarkCompleted |
MustOverride Sub MarkCompleted() |
Abstract — descendant-specific completion behavior. |
Append |
Sub Append(inText As String) |
Appends text to the task's narrative. |
Pend |
Sub Pend(inTimeSpan As TimeSpan) |
Defers the task by the given time span*. |
Equals |
Function Equals(obj As Object) As Boolean |
Value-equality comparison, likely keyed on TaskSeqNum*. |
GetHashCode |
Function GetHashCode() As Integer |
Hash code consistent with Equals*. |
ToString |
Function ToString() As String |
Formats as dd-MMM-yyyy + hyphen + task text. |
SetClaimIDNull, SetImageSeqNumNull, SetPolicyNumberNull |
Sub Set*Null() |
Explicitly nulls the corresponding optional smart value. |
IsClaimIDNull, IsImageSeqNumNull, IsPolicyNumberNull, IsUpdateDateNull, IsUpdateUserNull |
Function Is*Null() As Boolean |
Reports whether the corresponding value is currently null/empty. |
BatchRules |
Protected Property BatchRules As Boolean |
When true, bypasses the current/future date rule (BR-007). |
DeleteFlag |
Protected Property DeleteFlag As String |
Underlying soft-delete/completion flag column value. |
NotepadFlag |
Protected Property NotepadFlag As String |
Underlying notepad-entry flag column value. |
TaskContext |
Protected Property TaskContext As clsTaskContext |
The six-column context value holder for this task. |
TaskDateModifier |
Protected Property TaskDateModifier As TaskDateModifierType |
Controls which direction AssignTaskDate shifts a non-working-day date. |
UpdateSeqNum |
Protected Property UpdateSeqNum As clsSmartDecimal |
The optimistic-concurrency token value (BR-013). |
CopyTask |
Protected Sub CopyTask(inTask As clsTask) |
Copies core fields and duplicates context onto a target instance (see Copy a task to another user). |
StoreValues |
Protected Sub StoreValues() |
Snapshots 25 keyed field values into a TaskStore (see Snapshot/restore task state). |
RestoreValues |
Protected Sub RestoreValues() |
Restores field values from the TaskStore snapshot; the context-text key mismatch means restored context text is always empty*. |
OverrideRules |
Protected Overridable Function OverrideRules(inRuleName As String, ...) As Boolean |
No-op hook by default; descendants can convert a failing common rule into a pass (BR-026). |
TaskDateModifierType |
Public Enum TaskDateModifierType |
Nested enum controlling automatic due-date adjustment: CurrentDay, PriorWorkDay, NextWorkDay. |
CriteriaBase |
Public Class CriteriaBase (nested, implements IBusinessCriteria) |
Holds the pk82036_task stored-procedure names and DPI for clsTask persistence. |
TaskStore |
Private Class TaskStore (nested, <Serializable>) |
Hashtable-backed snapshot store used by StoreValues/RestoreValues. |
Behavioral notes¶
- Every public property is decorated with
<Reportable()>, exposing it to the framework reporting/binding surface*. - The class is
<Serializable()>, consistent with remoting/session persistence of BOF objects across the web tier*. MyCriteria.WhereClause-equivalent logic is not present onclsTaskitself; seeclsTaskCollection.Criteriafor the analogous (and effectively dead) property.
Constraints and usage notes¶
clsTaskisMustInherit— this library never instantiates a concrete task type directly; concrete task types live inSAIF.Business.Tasks.Claim.- Business objects never open database connections directly; all persistence flows through the caller-supplied
IDataPortalInfo.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Related documentation¶
Sources¶
- SAIF.Business.Tasks/clsTask.vb