Skip to content

clsRequestAppworxJob

clsRequestAppworxJob is the sole hand-written type in SAIF.Services.Appworx. It is a thin client-side adapter — not a BOF business object, and not itself a hosted service — that translates a "run this batch job" intent into a call to the Oracle stored procedure submit_appworx_job through the BOF data portal. It exposes both a mutable, reusable instance API and a stateless Shared convenience overload that all in-repo callers (clsCreateFileManager, clsMailDateManager, clsRequestManager in SAIF.Application.Claim.Legal) use exclusively.

Purpose

  • Normalize submission of a batch job to the Appworx scheduler: fixed 20 positional argument slots, empty-slot suppression, and defaults for requestor ("Appworx"/"APPWORX") and printer ("SYSOUT") (BR-004).
  • Optionally redirect a submission away from the caller's own data portal to a fixed, hard-coded Appworx-hosting Oracle database (PRADT on WCISPROD/WCISDEV1) via the inUseWCISDEV1AppworxForAllDevEnv flag (BR-001, BR-002).
  • Guarantee a reused instance cannot leak argument values from a previous submission by resetting all 20 argument slots on construction and before each shared-overload submission (BR-007).

Context

  • Namespace: SAIF.Services.Appworx
  • Assembly/package: SAIF.Services.Appworx (VB.NET class library, TargetFrameworkVersion v4.6.2)

Public members

Member Signature Purpose
New Public Sub New(ByVal inDPI As IDataPortalInfo) Binds the instance to a BOF data-portal context used to reach the Appworx submission procedure, and calls InitArgs() so all 20 argument slots start empty (BR-007).
DPI Public ReadOnly Property DPI() As IDataPortalInfo Exposes the data-portal context supplied at construction; used internally to create and execute the portal request.
ModuleName Public Property ModuleName() As String The Appworx module (scheduler job definition) to run — the only value with no default, so it must be set by the caller.
Requestor Public Property Requestor() As String Identifies the requesting system recorded against the scheduled job; defaults to "APPWORX" on the instance API.
Printer Public Property Printer() As String Output destination passed to the scheduler; defaults to "SYSOUT". Accepted by submit_appworx_job but never persisted by the procedure (PR-004, see Procedures).
Arg1 … Arg20 Public Property ArgN() As String (20 members) Positional job arguments handed to the Appworx module. Each is backed by a clsSmartString field; setting a value marks the slot non-empty, and only non-empty slots are transmitted (BR-003).
SubmitBatchJob Public Sub SubmitBatchJob() Instance entry point: builds a BOF portal request that calls submit_appworx_job with the module/requestor/printer and every populated argument slot, executes it, and rethrows any failure wrapped in an ApplicationException (BR-006). See Execute the Appworx submission stored procedure.
InitArgs Public Sub InitArgs() Resets all 20 argument slots to the clsSmartString "empty" state so a reused instance does not leak arguments from a previous submission (BR-007). See Reset argument slots.
SubmitBatchJob (Shared) Public Shared Sub SubmitBatchJob(inDPI As IDataPortalInfo, inModule As String, Optional inRequestor As String = "Appworx", Optional inPrinter As String = "SYSOUT", Optional inArg1..inArg20 As String = Nothing, Optional inUseWCISDEV1AppworxForAllDevEnv As Boolean = False) The form actually used by all in-repo callers: a one-call façade that optionally redirects the submission to a fixed Appworx-hosting database, constructs the instance, maps only the non-Nothing arguments, and submits. See Submit an Appworx batch job (shared overload).

Behavioral notes

  • The instance field default for Requestor is "APPWORX" (upper case) while the shared overload's optional parameter default is "Appworx" (mixed case); because the shared overload always assigns .Requestor = inRequestor, callers that omit the argument get "Appworx", and the "APPWORX" field default is only observable when the class is constructed directly*.
  • The instance API is mutable and reusable (InitArgs exists precisely so an instance can be reset between submissions), but the shared overload creates a fresh instance per call, so in practice the class is used statelessly by this repository's code*.
  • The submission is fire-and-forget — RequestType = DataRequestType.NonQuery, no output parameters are registered, and the unused vResult local is never assigned or read, so callers cannot correlate a submission with a scheduler job instance from this class (BR-008).
  • No caller in this repository uses the instance API directly or sets inUseWCISDEV1AppworxForAllDevEnv; both exist for consumers outside this repository, or are dead code — not determinable here**.

Constraints and usage notes

  • No validation exists on ModuleName, Requestor, Printer, or argument content within this class (BR-004); the receiving procedure also performs no validation (PR-008, see Procedures).
  • Parameter sizes are fixed to the scheduler's contract: module 30, requestor 32, printer 30, each argument 4000 characters (BR-005).
  • Only argument slots explicitly set (non-Nothing on the shared overload, non-empty clsSmartString on the instance) are transmitted, so positional argument gaps are possible and expected — observed callers skip arg3 (BR-003).
  • No authorization checks are performed by this class; any caller holding a valid IDataPortalInfo can submit any Appworx module with any arguments — enforcement is the responsibility of the calling application layer and the database account behind the data portal*.

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.

Sources

  • SAIF.Services.Appworx/clsRequestAppworxJob.vb