GetNextProcessInstance

Mon 01 January 2018

Syntax

GetNextProcessInstance([Commit])

Description

Use the GetNextProcessInstance function to retrieve the next available process instance from the Process Scheduler System table. When determining to find the next process instance in the sequence, the function ensures the next available process instance does not exist in both the Process Request and Message Log tables.

By default, the function commits the changes to the Process Scheduler system table to set it to the next available process instance for the next available request. If this function is called within a PeopleCode function for which issuing a COMMIT to the database destroys a unit of work, specify "0" for Commit.

Parameters

Field or Control

Definition

Commit

Specify whether the current data instance should be committed to the database. This parameter takes a string value: "1", commit the data, "0", do not commit the data. "1" is the default value.

Returns

An integer representing the next available process instance if successful, otherwise 0 in case of a failure.