overrideProcesses

This method defines the list of processes that are available to a user when creating a process view or starting a process instance. This function is called once while initializing the list of available processes.

When creating a new process view, this method can be used to restrict the list of available processes when “Include selected processes” is selected in the view creation wizard. If “Include all processes” is selected, the list is not restricted by this method; all processes are listed.

Note that even though a user is restricted by this method to certain processes when creating a process view, the user may still have access to instances of the restricted processes if a system view had been created for the user by another user.

A list of all available processes is provided as input to this method. The method may be customized to output an altered list by removing specific processes, making them unavailable for selection.

Syntax

classProto.overrideProcesses = function(oValue, oContext)

Parameters

  • oValue - (Object) An object containing the following property, which specifies the processes available in the New Process View dialog or Start Process Instance dialog:
    • oValue.availableProcesses[] - (Array of objects) Each object has the following properties that identify an available process:
    • processName - (string read-only) Name of the process.
    • version - (string read-only) Version of the process.
  • oContext - (Object) An object that provides information about the list being modified with the following properties:
    • oContext.userName - (string read-only) The name of the logged-in user.
    • oContext.userGuid - (string read-only) A unique identifier of the logged-in user.
    • oContext.listType - (string read-only) Either "ProcessView" for a list of processes available when creating a process view, or "StartInstance" for a list of processes available for starting an instance.

Returns

The modified oValue object, or null if no changes are to be made.