Skip to content

clsRequestAppworxJob

clsRequestAppworxJob is the sole public type in SAIF.Services.Appworx. It represents a single Appworx batch-job submission request: it holds the module name, requestor, printer, and up to 20 optional string arguments, and submits them as an inline stored-procedure call (submit_appworx_job) through the SAIF BOF data portal (IDataPortalInfo/IPortalRequest/IDataRequest). It is a direct data-portal caller rather than a full BOF business object — it implements no IBusinessCriteria/Criteria pattern and has no Before*/After* lifecycle methods*. Callers in SAIF.Application.Claim.Legal\LegalNet\ use it (via the shared overload) to schedule the LGN0002_LEGALNET_LETTERS job for LegalNet letter, mailed-date, and create-file workflows.

Purpose

  • Owns the assembly and submission of a single Appworx batch-job request, encapsulating the fixed 3-required/20-optional parameter shape expected by submit_appworx_job.
  • Normalizes submission failures from the underlying data portal into a single ApplicationException, giving callers a uniform failure contract regardless of the underlying data-access error (BR-APX-002).
  • Optionally redirects Appworx submissions to a fixed non-production Oracle target via its shared/static overload, decoupling non-production environments from per-environment Appworx configuration (BR-APX-003).

Context

  • Namespace: SAIF.Services.Appworx
  • Assembly/package: SAIF.Services.Appworx (this library's own project has no <ProjectReference> elements to other in-repo projects — see Dependencies; it is itself distributed to consumers as a NuGet package, per its reference_type: package classification)

Public members

Member Signature Purpose
New Public Sub New(ByVal inDPI As IDataPortalInfo) Binds the instance to a data-portal context and clears all 20 argument slots via InitArgs(), so a freshly constructed instance never carries stale argument state.
DPI ReadOnly Property DPI As IDataPortalInfo Exposes the data-portal context this instance will submit the job through.
ModuleName Property ModuleName As String Identifies which Appworx module/job (e.g., LGN0002_LEGALNET_LETTERS) will be submitted; bound as inModule.
Requestor Property Requestor As String (default "APPWORX") Identity recorded with the job submission for auditing which system/user requested it; bound as inRequestor.
Printer Property Printer As String (default "SYSOUT") Output/print destination the Appworx job's output is routed to; bound as inPrinter.
Arg1…Arg20 Property ArgN As String (backed by clsSmartString) Up to 20 job-specific positional string arguments whose meaning is defined by the target Appworx module; each is included in the stored-procedure call only when non-empty (BR-APX-001).
SubmitBatchJob() Public Sub SubmitBatchJob() Executes the Submit Appworx batch job (instance) operation: builds and sends the submit_appworx_job stored-procedure request and wraps any failure as ApplicationException.
InitArgs() Public Sub InitArgs() Executes the Reset job arguments operation: clears all 20 argument slots to empty, enabling safe instance reuse between submissions.
SubmitBatchJob(inDPI, inModule, [inRequestor], [inPrinter], [inArg1..inArg20], [inUseWCISDEV1AppworxForAllDevEnv]) Public Shared Sub SubmitBatchJob(...) Executes the Submit Appworx batch job (shared overload) operation: convenience one-call wrapper that optionally redirects to a fixed non-production Appworx/Oracle target, constructs a clsRequestAppworxJob, populates supplied arguments, and delegates to the instance SubmitBatchJob().

Behavioral notes

  • The type has no Namespace block declared in source; it resolves into the SAIF.Services.Appworx root namespace via project settings*.
  • The shared overload's argument-assignment check (IsNot Nothing) differs from the instance-level empty check (clsSmartString.IsEmpty) used by SubmitBatchJob(), forming a two-tier optionality mechanism across the two call paths (BR-APX-004).
  • Imports SAIF.Framework.Security is present in the source file but no members from that namespace are referenced in the class body — the import appears unused**.

Constraints and usage notes

  • Argument capacity is fixed at 20 positional string arguments (Arg1–Arg20); there is no mechanism for additional or named arguments.
  • No validation is performed on ModuleName, Requestor, or Printer beyond passing them as fixed-length stored-procedure parameters (30/32/30 characters respectively).
  • Reusing an instance across multiple submissions requires an explicit call to InitArgs() between calls to avoid carrying over previous argument values, unless a new instance is constructed each time (the constructor calls InitArgs() automatically).

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