CUSTAUDIT

Usage

TIBCO iProcess Workspace (Browser)

TIBCO iProcess Workspace (Windows)

Append user defined audit trail entries to a specified case’s audit trail.

Syntax

CUSTAUDIT (procname, casenum, auditID, stepname, stepdesc, user)

where:

procname is the name of the procedure that the case belongs to. If you specify procname as an empty string (""), it defaults to the current procedure at the current node.
Note: For EAISCRIPT, passing the procname is mandatory. If an empty string("") is specified, then you get 2 as a return value.
casenum is the case number to add the audit trail entry to. If you specify casenum as SW_CASENUM, it defaults to the current case.
auditID is the audit trail entry ID, as defined in the SWDIR\etc\language.lng\auditusr.mes file. This must be a value between 256 and 999. (Values 0 to 255 are reserved for use by iProcess.)
stepname is the step name. If you specify stepname as SW_STEPNAME, it defaults to the current step name. stepname must be 8 characters or less (unless you use SW_STEPNAME). Any characters above this are truncated.
stepdesc is the step description. If you specify stepdesc as SW_STEPDESC, it defaults to the current step description. stepdesc must be 24 characters or less.
user is the iProcess user. If you specify user as SW_USER:NAME, it defaults to the currently logged in iProcess user. user must be 255 characters or less.
Note: You can provide any value for stepname, stepdesc and user but the interpretation of these values depends on the application used to display the audit trails. If you use iProcess audit trail windows, ensure there is an entry for the given audit trail ID in the SWDIR\etc\language.lng\auditusr.mes file. The given values are used to replace the %USER and %DESC variables in the auditusr.mes message format string. Refer to “Audit Trails” in the TIBCO iProcess swutil and swbatch Reference Guide for more information about the auditusr.mes file.

Returns

One of the following values:

Value

Description

0

Success.

1

Invalid auditID parameter.

2

Procedure or host name not found.

3

Case number not found.

4

CUSTAUDIT is not supported on this version of the iProcess Engine you are logged in to.

5

Failed to add the audit trail entry request to the queue.

Examples

TIBCO iProcess Modeler:

This example adds a user defined audit trail entry to step1 of a procedure called CARPOOL for case number 52.

CUSTAUDIT (“carpool“, 52, 256, “step1“, “request for vehicle“, “swusr001“)

This example adds a user-defined audit trail entry to the current step of the current procedure, for the current case.

CUSTAUDIT ("", SW_CASENUM, 256, SW_STEPNAME, SW_STEPDESC, SW_USER:NAME)

TIBCO Business Studio:

These examples are equivalent to the previous TIBCO iProcess Modeler examples.

IPEEnvironmentUtil.CUSTAUDIT("carpool", 52, 256, "step1", "request for vehicle", "swusr001");

IPEEnvironmentUtil.CUSTAUDIT("", IPESystemValues.SW_CASENUM, 256, IPESystemValues.SW_STEPNAME, IPESystemValues.SW_STEPDESC, IPEStarterUtil.GETATTRIBUTE("Name"));