Open topic with navigation

TIBCO iProcess® Engine 11.10.0

# SW_AUDIT

The `SW_AUDIT` procedure instructs the iProcess Engine background (BG) process to create the specified audit trail message for the specified case.

## Syntax

    SW_AUDIT (
    			proc_namevarchar(8),proc_maj_verinteger,			proc_min_verinteger,			case_numnumeric(20) output,			Audit_idintegerAudit_stepvarchar(8)			Audit_descvarchar(24)			User_idvarchar(255))

where:

| • | `proc_name` is the name of the procedure that you want to create an audit message for.

| • | `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_num` (input) is the name of a variable, defined in the calling program, into which `SW_AUDIT` will return the case number of the started case. If this information is not required, specify this parameter as `0`.

| • | `Audit_id` is the numeric value of the audit message required. User audit messages will be values greater than 256, as listed in the `SWDIR``/etc/english.lng/auditusr.mes` file. See "Understanding Audit Trails" in TIBCO iProcess Engine Administrator’s Guide for details.

| • | `Audit_step` is the stepname of this audit. If the step is not required for this audit message, specify this parameter as a null string (‘’) instead.

| • | `Audit_desc` is the description to be added to the audit message.

| • | `User_id` is the username that will be added to the audit trail entry.

## 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 use the version number of the procedure that the case was originally started with or, that it has subsequently been migrated to (if a subsequent version has been released while the case is still in progress).

Note | If you specify one version number parameter as `-1`, you must specify the other one as `-1` as well.

## Example

This example creates an audit message `131` for the `CARPOOL` procedure.

    EXEC swpro.SW_AUDIT 'CARPOOL', -1, -1, 99999, 131, '', 'BW Activity', 'BW User'

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO iProcess® Engine