Skip to content

Submit Appworx batch job (instance)

This operation builds and executes the submit_appworx_job stored-procedure call using the properties set on a clsRequestAppworxJob instance, and normalizes any failure into a single exception type.

Field Value
Operation ID OP-APX-001
Trigger Caller invokes SubmitBatchJob() on a clsRequestAppworxJob instance with ModuleName (and optionally Requestor/Printer/Arg1–Arg20) already set.
Inputs ModuleName, Requestor (default "APPWORX"), Printer (default "SYSOUT"), Arg1–Arg20
Outputs No return value (NonQuery); side effect is the Appworx job submission in Oracle; throws ApplicationException on failure
Primary components clsRequestAppworxJob.SubmitBatchJob
Entry point SAIF.Services.Appworx\clsRequestAppworxJob.vb

Steps

  1. Build a new IPortalRequest/IDataRequest pair; set RequestType = DataRequestType.NonQuery, CommandType = CommandType.StoredProcedure, SQLStatement = "submit_appworx_job" (SQL-APPWORX-001).
  2. Add required parameters inModule (30 chars), inRequestor (32 chars), inPrinter (30 chars).
  3. For each of Arg1–Arg20, if the corresponding clsSmartString IsEmpty is False, add parameter inArgN (4000 chars) with the argument's value (BR-APX-001, SQL-APPWORX-001).
  4. If IsEmpty is True: the corresponding inArgN parameter is omitted entirely.
  5. Call DPI.ProcessPortalRequest(PortalRequest) inside a Try/Catch, delegating execution to the SAIF.BOF.Framework package's data portal (SQL-APPWORX-001).
  6. On failure: catch the exception and rethrow as ApplicationException("Error Submiting Appworx Job " & ex.Message, ex) (BR-APX-002).

Origin: Connection acquisition and command execution against the configured Oracle target are implemented inside IDataPortalInfo.ProcessPortalRequest, provided by the referenced SAIF.BOF.Framework package. This step's internal logic was not traced from local source and no local operations page documents it**. 5. Clear local PortalRequest/DataRequest references (= Nothing) at the end of the method.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([SubmitBatchJob called]) --> S1[Build IDataRequest: NonQuery, StoredProcedure, submit_appworx_job]
    S1 --> S2[Add required params: inModule, inRequestor, inPrinter]
    S2 --> S3[Add optional inArg1..inArg20 for non-empty ArgN]
    S3 --> S4[Call DPI.ProcessPortalRequest]
    S4 --> D{Exception thrown?}
    D -->|Yes| EndErr([Throw ApplicationException])
    D -->|No| EndOk([Job submitted, references cleared])

Failure and edge-case behavior

  • Any exception from DPI.ProcessPortalRequest is wrapped as ApplicationException with a fixed message prefix (containing a source-level typo, "Submiting") and the original exception preserved as InnerException (BR-APX-002).
  • Argument slots that were never set (still empty from InitArgs()) are silently omitted from the stored-procedure call rather than sent as empty values (BR-APX-001).

Sources

  • SAIF.Services.Appworx\clsRequestAppworxJob.vb