Skip to content

Submit an Appworx batch job (shared overload)

This is the form actually used by all in-repo callers: a single static call that decides which data portal to use, constructs a fresh clsRequestAppworxJob instance, maps only the arguments the caller supplied, and submits the job.

Field Value
Operation ID OP-01
Trigger Application manager needs a scheduler job run (in this repo: printing LegalNet letters after a create-file, a mailed-date update, or a new reconsideration request)
Inputs inDPI (data-portal context), inModule (required), inRequestor (default "Appworx"), inPrinter (default "SYSOUT"), inArg1..inArg20 (all optional, default Nothing), inUseWCISDEV1AppworxForAllDevEnv (default False)
Outputs None (Sub). Side effect: a job request row is created in the Appworx scheduler by the stored procedure.
Primary components clsRequestAppworxJob.SubmitBatchJob (Shared)
Entry point SAIF.Services.Appworx/clsRequestAppworxJob.vb

Steps

  1. Decide which data portal to use (BR-001, BR-002).
  2. If inUseWCISDEV1AppworxForAllDevEnv is True: query AppGlobal.EnvironmentService.GetApplicationEnvironment(); when the result is ApplicationEnvironment.Prod, build New clsMSOracleDataLayer("PRADT", "WCISPROD"), otherwise build New clsMSOracleDataLayer("PRADT", "WCISDEV1"), then take lDAL.DataPortalInfo() as the portal.
  3. If the flag is False: use the caller-supplied inDPI unchanged.
  4. Construct New clsRequestAppworxJob(lDPI); the constructor calls InitArgs() (BR-007).
  5. Call RequestJob.InitArgs() again explicitly — redundant, the constructor already did it*.
  6. Assign ModuleName, Requestor, Printer from the parameters unconditionally, so the optional defaults always win over the field defaults (BR-004).
  7. For each of inArg1..inArg20, assign the corresponding ArgN property only when the parameter IsNot Nothing (BR-003).
  8. An explicitly passed empty string is assigned here, but is still suppressed later by the clsSmartString empty test in Execute the Appworx submission stored procedure*.
  9. Call the instance SubmitBatchJob().
  10. Origin: Step 6 delegates to Execute the Appworx submission stored procedure, implemented in the same class (clsRequestAppworxJob).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start(["Application manager needs a<br>job run"]) --> D{inUseWCISDEV1AppworxForAllDevEnv?}
    D -->|Yes| Env{Environment = Prod?}
    Env -->|Yes| PortalProd[Portal = PRADT@WCISPROD]
    Env -->|No| PortalDev[Portal = PRADT@WCISDEV1]
    D -->|No| PortalCaller[Portal = caller's inDPI]
    PortalProd --> Construct[Construct clsRequestAppworxJob<br>InitArgs]
    PortalDev --> Construct
    PortalCaller --> Construct
    Construct --> Assign[Assign ModuleName, Requestor, Printer,<br>non-Nothing ArgN]
    Assign --> Submit[Call instance SubmitBatchJob]
    Submit --> EndOk(["Returns, or exception<br>propagates"])

Failure and edge-case behavior

  • No error handling of its own; any exception from the instance SubmitBatchJob (already wrapped as ApplicationException per BR-006) propagates to the caller.

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