Skip to content

SAIF.Services.Appworx business rules

This page captures business rules enforced by this library.

BR-APX-001 Optional arguments omitted when empty

Field Value
Statement When submitting an Appworx job, an argument slot (Arg1–Arg20) is included as a stored-procedure parameter only if its clsSmartString value is not empty.
Trigger SubmitBatchJob() instance method execution.
Enforcement If Not m_ArgN.IsEmpty Then DataRequest.AddParm("inArgN", ArgN, 4000) for each of the 20 argument slots.
Outcome The submit_appworx_job stored procedure receives only the populated arguments as bound parameters; unpopulated slots are omitted rather than passed as empty/null values.
SQL SQL-APPWORX-001
Source SAIF.Services.Appworx\clsRequestAppworxJob.vb (SubmitBatchJob)

BR-APX-002 Submission failures are wrapped and rethrown

Field Value
Statement Any exception raised while processing the Appworx job submission portal request is caught and rethrown as an ApplicationException with a fixed prefix message and the original exception as inner exception.
Trigger An exception thrown by DPI.ProcessPortalRequest(PortalRequest) inside SubmitBatchJob().
Enforcement Catch ex As Exception → Throw New ApplicationException("Error Submiting Appworx Job " & ex.Message, ex).
Outcome Callers see a uniform ApplicationException (message contains a typo, "Submiting", present verbatim in source) regardless of the underlying data-access failure cause; the original exception is preserved as InnerException.
SQL SQL-APPWORX-001
Source SAIF.Services.Appworx\clsRequestAppworxJob.vb (SubmitBatchJob)

BR-APX-003 Non-production Appworx target override

Field Value
Statement When the shared SubmitBatchJob overload is called with inUseWCISDEV1AppworxForAllDevEnv = True, the job is submitted against a fixed Oracle target (WCISPROD in Prod, WCISDEV1 otherwise) using schema PRADT, instead of the caller-supplied data portal.
Trigger Shared SubmitBatchJob(...) overload invoked with inUseWCISDEV1AppworxForAllDevEnv:=True.
Enforcement If inUseWCISDEV1AppworxForAllDevEnv Then branches on AppGlobal.EnvironmentService.GetApplicationEnvironment(): when the result is ApplicationEnvironment.Prod, lDAL = New clsMSOracleDataLayer("PRADT", "WCISPROD"); otherwise (any non-production environment), lDAL = New clsMSOracleDataLayer("PRADT", "WCISDEV1"). The resulting lDAL is then used to construct the IDataPortalInfo passed to the new clsRequestAppworxJob instance instead of the caller-supplied data portal.
Outcome All non-production environments funnel Appworx submissions through a single shared WCISDEV1 Appworx/Oracle target when this flag is set, avoiding per-environment Appworx configuration drift.
SQL SQL-APPWORX-001
Source SAIF.Services.Appworx\clsRequestAppworxJob.vb (Shared SubmitBatchJob)

BR-APX-004 Unspecified arguments left unset in shared overload

Field Value
Statement In the shared SubmitBatchJob convenience overload, an optional argument parameter (inArg1–inArg20) is only assigned to the underlying instance property if the caller passed a non-Nothing value; omitted arguments retain their default empty state from InitArgs().
Trigger Shared SubmitBatchJob(...) overload execution, per-argument.
Enforcement If inArgN IsNot Nothing Then .ArgN = inArgN End If for each of the 20 optional argument parameters.
Outcome Combined with BR-APX-001, an argument omitted (or passed as Nothing) by the caller of the shared overload is never sent to the stored procedure at all.
SQL SQL-APPWORX-001
Source SAIF.Services.Appworx\clsRequestAppworxJob.vb (Shared SubmitBatchJob)

Stored procedure business rules

The retrieved Oracle source for WCIS_DBA.submit_appworx_job exposes the following server-side rules.

Rule ID Rule Source Link
BR-APX-005 Each execution assigns JOB_QUEUE.JOBID from SO_MAX_JOBID.NEXTVAL. WCIS_DBA.submit_appworx_job Details
BR-APX-006 Every inserted row uses a fixed MASTER_JOB_NUMBER value of -1. WCIS_DBA.submit_appworx_job Details
BR-APX-007 inarg1 through inarg20 default to '' when callers omit them. WCIS_DBA.submit_appworx_job Details
BR-APX-008 NO_DATA_FOUND is swallowed without raising an error to the caller. WCIS_DBA.submit_appworx_job Details
BR-APX-009 All non-NO_DATA_FOUND exceptions are re-raised. WCIS_DBA.submit_appworx_job Details

Sources

  • SAIF.Services.Appworx\clsRequestAppworxJob.vb
  • Oracle retrieval: C:\Users\chrfre\AppData\Local\Temp\oracle-sources\submit_appworx_job.json