SW_CASESTART

The SW_CASESTART procedure starts a case of a procedure.

Syntax

SW_CASESTART (
proc_namevarchar(8),
proc_maj_verinteger,
proc_min_verinteger,
case_descvarchar(24),
user_idvarchar(24),
step_namevarchar(8),
case_numnumeric(20),
request_idnumeric(20))

where:

proc_name is the name of the procedure that you want to start a case of.
proc_maj_ver is either the major version number of the proc_name procedure, or -1. See the notes .
proc_min_ver is either the minor version number of the proc_name procedure, or -1. See the notes .
case_desc is a suitable description for this case.
user_id is the name of the iProcess user who is starting the case.
step_name is the name of the step at which the case should start. If you want to use the default start step, specify this parameter as a null string (‘’).
case_num (output) is the name of a variable, defined in the calling program, into which SW_CASESTART will return the case number of the started case.
request_id (output) is the name of a variable, defined in the calling program, into which SW_CASESTART will return the REQ ID of the work item that is sent out when the case is started.

Notes

Instead of using the specific major and/or minor version number of the procedure, you can specify both the proc_maj_ver and proc_min_ver parameters as -1. If you do this, iProcess will determine which version of the procedure to use according to the following rules:

1. the latest released version of the procedure or, if no released version exists,
2. the latest unreleased version of the procedure.

Note 

If you specify one version number parameter as -1, you must also specify the other one as -1 .

Example

This example starts a case of the CUSTREQ procedure. Note that pack data values for the CustName and CustID fields are provided by separate calls to SW_ADD_PACK_DATA immediately before the SW_CASESTART call.

CALL owner.SW_ADD_PACK_DATA ('CustName', 'Allsop, J.A')/
CALL owner.SW_ADD_PACK_DATA ('CustID', '478163')/
CALL owner.SW_CASESTART ('CUSTREQ', -1, -1, 'Refund request', 'user35', '', ?, ?)/