Audit Manager
Audit Manager
Audit Manager
PLM00022 - 12.4
Contents
Getting started
Before you begin ────────────────────────────────────── 1-1
Basic concepts for using audit functionality ───────────────────── 1-1
Audit objects ──────────────────────────────────────── 1-2
Prerequisites You need Teamcenter administrator privileges to use the Audit Manager
application.
You need Microsoft Excel to export audit logs to Excel.
Note:
Before working with Microsoft Office datasets, verify that your computer
has the required software installed.
• TC_audit_manager
Ensure the preference is set to ON (default).
• TC_audit_manager_version
Ensure the preference is set to 3 (default).
Configure Audit There are additional steps you must perform to configure Audit Manager
Manager before you can use it.
To use audit functionality, you must first define audit logs by creating audit definition objects in Business
Modeler IDE. You can then view audit logs, using Teamcenter applications such as My Teamcenter, ADA
License, Structure Manager, Multi-Structure Manager, Manufacturing Process Planner, Schedule
Manager, Workflow Viewer, and Organization.
Audit logs are created based on the information specified in the audit definition objects. These define
the information that should be captured about a particular object when an event occurs.
If you want to capture audit logs for events that are not available for logging, you can create new
events.
When you create new events, you must associate the event with an object. Subsequently, you can
create audit definition objects for that event and object type.
• Use Business Modeler IDE for creating audit definitions, events, and event mappings.
• Use the Summary view of the following Teamcenter applications to access or view audit logs in the
Audit logs tab.
• My Teamcenter
• ADA License
• Multi-Structure Manager
• Organization
• Schedule Manager
• Structure Manager
• Workflow Viewer
• You can run predefined audit reports or create new reports, using the Report Builder application.
• You can create queries of audit logs, using the Query Builder application.
• You can run predefined audit queries, using the Teamcenter advanced search functionality.
Audit objects
The audit functionality in Teamcenter uses the following objects:
• Fnd0AuditDefinition
Specifies the audit definition object. Audit definition allows you to define what information to log for
a particular object and event type combination.
• Fnd0AuditDefProperty
Specifies the logged properties object. This object stores logged properties information.
• Fnd0DigitalSignatureAudit
Specifies digital signature audit logs.
• Fnd0EventTypeMapping
Specifies the event type mapping object. This object maps an event to an object, following which you
can create audit definitions for the mapped object and event type combination.
• ImanEventType
Specifies the event type object. This object stores events.
• Fnd0WorkflowAudit
Specifies workflow audit log object. This object stores process and signoff history audit logs.
• Fnd0LicenseChangeAudit
Stores the license change audit logs.
• Fnd0LicenseExportAudit
Stores the license export audit logs.
• Fnd0FileAccessAudit
Stores file access audit logs.
• Fnd0OrganizationAudit
Stores organization audit logs.
• Fnd0StructureAudit
Stores structure audit logs.
• Fnd0ScheduleAudit
Stores schedule audit logs.
• Fnd0SecurityAudit
Stores security audit logs.
• Fnd0GeneralAudit
Stores the audit logs that are not stored in other audit logs.
• Fnd0SecondaryAudit
Stores additional information or secondary information about objects such as attachments and
attachment properties.
• Fnd0AuditLink
Stores the link between primary and secondary audit logs.
Note:
If you update these preferences:
Value = Fnd0AuditLog
This access rule gives administrators read privileges to audit logs of deleted objects and denies read
privileges to the others.
Note:
If you are installing a new database, this rule is automatically created.
If you are upgrading an existing database, you must upgrade Access Manager rules.
To help you import these custom event types, the system identifies the custom event types definitions
during the upgrade process and writes them to a custom_audit_configurations.xml file generated
under the TC_DATA\model directory. At the end of the upgrade process, Teamcenter Environment
Manager (TEM) issues a warning if there are any custom event types.
Postupgrade, import these custom event type definitions into your custom template project before
deploying any changes to the upgraded database. If not, the next TEM update process or Business
Modeler IDE deployment tries to delete these event types, which may or may not pass based on whether
there are references to it in the database.
Perform the following steps in the Business Modeler IDE immediately after the successful upgrade to
Teamcenter and before deploying any data model changes:
1. Import the custom_audit_configurations.xml file from the TC_DATA\model directory into your
custom template project by choosing File→Import→Business Modeler IDE→Import template
file.
2. In the BMIDE view, right-click the project and choose Reload Data Model. Make sure there are no
model errors reported in Console view.
3. Populate the appropriate display names to the custom event types wherever necessary.
Note:
You can configure Audit Manager using the Business Modeler IDE.
• Fnd0ObjectIDToAudit
Specifies the property that holds the object ID for the business object type. The object ID property
differs across business object types. For example, on the Item business object type, the value for this
constant is item_id and on the ADA_License business object type, the value is id. When an audit log
is written for an instance of the business object, the property in this constant is used to obtain the
object’s ID for the audit log (and is written to the fnd0PrimaryObjectID property on the
Fnd0GeneralAudit business object). For custom objects that have their own property for the object
ID, change this constant to the property that holds the object ID so that the ID of the business object
is captured when the audit log is written.
This constant is placed on the POM_object business object and its children. There is no default value.
Type a value in the Value box to assign an object ID.
This constant is provided by the foundation template file.
• Fnd0ObjectNameToAudit
Specifies the property that holds the object name for the business object type. The object name
property is different for different business object types. For example, on the Workspace business
object type, the value for this constant is object_name and on the User business object type, the
value is user_name. When an audit log is written for an instance of the business object, the property
in this constant is used to obtain the object name for the audit log (and is written to the name
property on the AuditLog business object). For custom objects that have their own property for the
object name, change this constant to the property that holds the object name so that the name of the
business object is captured when the audit log is written.
This constant is placed on the POM_object business object and its children. There is no default value.
Type a value in the Value box to assign an object name.
This constant is provided by the foundation template file.
• Fnd0ObjectRevIDToAudit
Specifies the property that holds the revision ID for the business object type. The revision ID property
differs across business object types. For example, on the ItemRevision business object type, the value
for this constant is item_revision_id. When an audit log is written for an instance of the business
object, the property in this constant is used to obtain the object’s revision ID for the audit log. For
custom objects that have their own property for the revision ID, change this constant to the property
that holds the ID so that the revision ID of the business object is captured when the audit log is
written.
This constant is placed on the POM_object business object and its children. There is no default value.
Type a value in the Value box to assign an object revision ID.
This constant is provided by the foundation template file.
• Fnd0AuditRecordAccessLevel
Controls how access to a workflow audit record is evaluated. This constant is placed on the
Fnd0WorkflowAudit business object. The default value is 1. Click the arrow on the Value box to
select from the following available values:
• 1
Checks workflow audit record based on the read access to the objects referred by the fnd0Object
property (primary object) and the fnd0SecondaryObject property (secondary object). If the
primary and secondary objects are deleted, only the administrator user is provided with read access
to the audit record.
• 2
Checks workflow audit record based on the read access to all attachments for that workflow. Access
to the primary object is not evaluated. If any of the secondary objects are deleted, only the
administrator user is provided with read access.
For viewing audit logs of deleted objects, Teamcenter provides access control rules that restrict access
to audit logs of deleted objects to administrators.
The following table shows the conditions under which you can view audit logs, based on the access you
provide to objects:
Set access for workflow objects, using Access Manager and update the value of the
Fnd0AuditRecordAccessLevel constant as follows:
• Fnd0AuditRecordAccessLevel=1
The access check on the workflow audit records is evaluated based on the read access to the primary
and secondary objects. Only administrators can view the audit records if the primary or secondary
objects are deleted.
• Fnd0AuditRecordAccessLevel=2
The access check on the workflow audit records is evaluated based on the read access to the current
list of attachments for that workflow. Access to the primary object is not evaluated.
• Fnd0ArchiveLocation
Specifies the location of the audit logs (for example, c:\archive).
• Fnd0RetentionPeriod
Specifies the retention period of the audit log archives in days (for example, 90).
Note:
The time taken to load audit logs increases as you increase the value of this preference. Therefore
ensure that you test the summary view for the time taken to load audit logs after updating the
value of this preference.
A log extension allows you to write additional data, those other than the data captured by audit logs. To
capture the data you require, you can create custom log extensions in addition to those provided by
Teamcenter.
You can create custom log extensions by using the Business Modeler IDE extensions mechanism.
• Fnd0CICO_auditloghandler
Logs checkin and checkout information, change ID, and the reason to audit. Applies this information
to checkin and checkout events.
• Fnd0OCC_track_position_orientation_audithandler
Logs the occurrence position and orientation changes of the components in structures.
• Fnd0PROJInfo_audithandler
Logs project names that are assigned to the project. The project names are separated using commas.
• Fnd0USER_get_additional_log_info
Logs workflow information to audit logs. For example, for the __Assign event, this handler logs
information such as the process name, task type, user comments, and the user ID and user name the
workflow is assigned to.
• Fnd0WriteSignoffDetails
Logs the workflow signoff history.
• Fnd0WriteSecondaryProperties
Logs secondary properties.
1. In Business Modeler IDE, create a template project if you have not already created one.
D. Click Add to the right of the Availability table and perform the following in the
Extension availability dialog box:
a. From the Extensions view, open Audit Manager→Audit Definitions. Right-click the
EPMTask:_Reject:isTrue audit definition and choose Open.
b. Click Add to the right of the Audit Extensions table, and select the P3_CustomAuditLog
extension from the Find an Audit Extension dialog box.
c. To save the changes to the data model, choose BMIDE→Save Data Model.
The extension boilerplate code is generated into a P3_CustomAuditLog.cxx C++ file and a
P3_CustomAuditLog.hxx header file. To see these files, open the project in the Navigator
view and browse to the src\server\P3_custom directory.
Note:
You might need to right-click in the view and choose Refresh to see the files that were
generated.
b. Open the P3_CustomAuditLog.cxx file in a C/C++ editor and add your custom business logic.
int P3_CustomAuditLog
( tag_t /*targetObjTag*/,
int /*secondaryObjectCount*/,
tag_t* /*secondaryObjectTags*/,
char** /*secondaryQualifiers*/,
tag_t /*eventType*/,
int paramCount,
char** paramNames,
char** paramValues,
int /*errorCode*/,
const char* /*errorMessage*/,
tag_t primaryAuditBOTag )
#include <P3_custom/P3_CustomAuditLog.hxx>
int P3_CustomAuditLog
( tag_t /*targetObjTag*/,
int /*secondaryObjectCount*/,
tag_t* /*secondaryObjectTags*/,
char** /*secondaryQualifiers*/,
tag_t /*eventType*/,
int paramCount,
char** paramNames,
char** paramValues,
int /*errorCode*/,
const char* /*errorMessage*/,
tag_t primaryAuditBOTag )
{
int ifail = ITK_ok;
if ( paramCount ==0 )
{
return ITK_ok;
}
for ( int i=0; i<paramCount; i++ )
{
if(strcmp(paramNames[i],"signoff") == 0)
{
signoff=paramValues[i];
break;
}
}
if (signoff == 0)
{
return ITK_ok;
}
isProp = false;
ifail = POM_attr_exists("p3_decisioncode", signoff_class_name, &isProp);
if (isProp)
{
ifail = AOM_ask_value_string ( signoffTag, "p3_decisioncode" ,&propVal);
isProp=false;
ifail = POM_attr_exists("p3_decisioncode", audit_class_name, &isProp);
if (isProp)
{
ifail = AOM_set_value_string(primaryAuditBOTag, "p3_decisioncode", propVal);
}
}
if (audit_class_name)
{
MEM_free(audit_class_name);
}
if (signoff_class_name)
{
MEM_free(signoff_class_name);
}
if(propVal)
{
MEM_free(propVal);
}
return ITK_ok;
c. Open the P3_CustomAuditLog.hxx file and update it with the header information.
6. (For hot deploy only) Copy the P3_Custom.dll file to the TC_ROOT\bin directory.
Note:
In a TEM deploy the required libraries are deployed with the solution package.
If you want to capture audit logs for events that are not available for logging, you can create new
events.
When you create new events, you must assign the event to an object. Subsequently, you can create
audit definition objects for that event and object type.
• An event mapping has been created between the business object type and the event.
• If you want to set a specific condition for activating logging of an event, then ensure that the
condition is defined.
Example:
You may want an audit entry to be written when a user accesses datasets that are export
controlled, but not datasets that are not export controlled. Before creating the audit
definition, create the condition definition.
• On the menu bar, choose BMIDE→New Model Element, type Audit Definition in the Wizards
box, and click Next.
• Open the Extensions\Audit Manager folders, right-click the Audit Definitions folder, and
choose New Audit Definition.
Primary Object Click Browse and select the primary business object type that you
want to audit.
Event Type Click Browse and select the event that you want to audit for the
selected business object.
Condition Click Browse and select the condition under which the audit definition
applies.
Note:
If the specified condition criteria are not matched, the audit log
will always create.
Audit Extensions Click Add and select the log extensions to use in the definition.
Track Old Values? Select the check box to enable tracking of the old values of primary
object properties.
Note:
Attribute tracking is available only for primary objects and is not
supported for secondary objects.
Audit on Property Select the check box to log the information specified in this audit
Change Only? definition only if the property values change.
This functionality is enabled only if the Track Old Values? check box is
selected.
4. Click Next.
b. In the Add Audit Definition property dialog box, to the right of Property Name, click
Browse and select a property to track.
c. To change the display name of the property in audit logs, in Target Property Name type a
new display name.
d. The Target Old Value Property Name box and the Enable Tracking? box are enabled if you
selected the Track Old Values? check box in the Add an Audit Definition dialog box. As
applicable, enter additional parameters for the audit definition property.
Parameter Description
Target Old Value To change the display name of the old property value in audit logs,
Property Name type a new display name.
e. Click Finish.
6. (If the primary object can have secondary objects) To capture information from secondary objects
that are related to or referenced by the main object being audited, click Next in the New Audit
Definition dialog box and add secondary object audit definition properties.
7. When you are done adding properties, click Finish in the New Audit Definition dialog box.
Verify that the audit definition object can create audit logs.
To set the Condition under which the audit definition applies, either click Browse or add a condition.
The isTrue and isFalse conditions are supported for all event types, including the Delete event type.
If the condition does not match the above criteria, the audit log is always created.
If you specify the Delete event type, specify User Session as the only parameter in your condition.
Note:
The condition signature expects three parameters. If you add a condition or audit definition, use
the following allowable signature.
In the above signatures, primary object and secondary object can be ignored if it is not applicable. It can
also be ignored if it is not using it in a condition signature for evaluation by just stating, POM_object in
the signature, as it is required as condition signature to be in above format, i.e.
For example, if you are configuring condition on audit definition "Item:_Modify", you can write the
condition this way:
Here Primary object(Item) is Primary object type from audit definition, you can specify secondary object
as POM object if secondary object is not applicable.
To use this condition, configure it on ImanFile audit definitions and deploy the changes. Its default
condition expression indicates it will audit File events when the dataset types are one of the following:
• Microsoft Word
• Microsoft Excel
• Microsoft PowerPoint
Note:
Configure this condition on the ImanFile audit definition.
You only need to create a new event type if there is not an existing event type that covers your needs.
When you create a type, its name is only a text reminder of the type of information you are looking from
in the audit. The actual event information is captured by the audit type selected when you create the
event type mapping.
In the past, the install_event_types utility was used to create new events. Now you create new event
types using the Business Modeler IDE.
• On the menu bar, choose BMIDE→New Model Element, type Event Type in the Wizards box,
and click Next.
• Open the Extensions\Audit Manager folders, right-click the Event Types folder, and choose
New Event Type.
3. In the Display Name box, type the name that you want the event to have in the user interface.
4. In the Description box, type a description of the new event so that others know what it is used for.
5. Click Finish.
6. Create an event type mapping definition to connect the event to a business object type.
An event mapping must be created for a business object type and event before you use that business
object and event type in an audit definition. Event mapping is inherited by child business object types.
For example, instances of the Part business object type inherit the mapping from the Item business
object type.
In the past, the event mapping was created using the install_event_types utility. Now event mapping is
created using the Business Modeler IDE.
• On the menu bar, choose BMIDE→New Model Element, type Event Type Mapping in the
Wizards box, and click Next.
• Open the Extensions\Audit Manager folders, right-click the Event Types Mappings folder, and
choose New Event Type Mapping.
2. Click the Browse box to the right of the Primary Object box to select the type of business object
you want to audit.
3. Click the Browse box to the right of the Event Type box to select the event you want to audit for
the selected business object.
4. Click the Browse box to the right of the Audit Type box to select the type of audit to use for this
mapping. The audit types are represented by business objects that are children of the
Fnd0AuditLog business object.
5. Click the Browse box to the right of the Secondary Audit Type box to select the
Fnd0SecondaryAudit business object. This Secondary Audit object stores information and
properties about the secondary objects that are related to the main object being audited.
6. Select the Subscribable? check box to specify that the event type mapping can be subscribed to.
7. Select the Auditable? check box to specify that the event type mapping can be audited.
8. In the Description box, type a description for this mapping so that others know what it is used for.
9. Click Finish.
• Do not deactivate the EPMTask-Add Attachment audit definition as some workflow queries are
dependent on the Add Attachment event.
Audit logs record events that occur to objects in Teamcenter. Administrators can create audit logs for
virtually any event that occurs to a Teamcenter object. For example, audit logs can be created to track
when:
Audit logs can be searched and viewed from Teamcenter. End users view audit logs to see the history of
actions performed on objects.
Subscriptions are created by end users. Subscriptions are requests to be notified when data is modified
by another user or when the release status of an item revision changes.
Users are notified by Teamcenter mail when the specified events occur on the specified objects.
• Reducing the window of time required to back up your production Teamcenter instance.
When you archive data, you can also restore it at any time. The audit_purge utility is enhanced with two
arguments to support archive and restore of audit logs:
• Use the nearline_archive argument to move the production data to the archive site.
• Use the nearline_restore argument to move the archive data from the archive site to the production
site.
Note:
Ensure these prerequisites are met before enabling archiving and restoring.
In addition, there are many arguments in the audit_purge utility that enable you to archive data based
on given criteria. For example, which type of audit log, for which retention period, and so on.
You can perform recovery and cleanup of partially created data for these types of failures in the archive
and restore operation of audit logs using the ar_recover utility at the production site.
During the archive and restore critical operations, a recovery text dataset containing the operation ID
and object Unique Identifier (UID) is created in the current logged on user's NewStuff folder. After a
successful operation, the recovery dataset is automatically deleted. However, if a critical failure occurs,
the dataset is not deleted and you can use the ar_recover utility to attempt recovery of the data.
Note:
Before you can perform an archive or restore operation of audit logs or reissue, you must first use
the ar_recover utility to perform a recover operation from the previous failure.
Examples
For audit logs, only the recover operation (-f=recover) functionality is supported in the ar_recover
utility.
Note:
To perform the recover operation, you must execute the ar_recover utility at the production site.
The audit_purge utility enables you to archive or purge audit logs. This gives greater flexibility to:
Displays the start, complete, approved, rejected, assign status, demote, promote, fail, and update
actions for the specified workflow process.
Note:
Ensure that audit definitions exist for the objects for which you have created saved queries.
If someone has assigned or removed data from a project, you can view it in the Security section of the
Audit Logs tab in the Project summary page. You can customize viewing these logs by configuring the
Summary stylesheet of the respective object.
Configure the Summary stylesheet to enable the out-of-the-box Security section under the Audit Logs
tab in the rich client, so the audit log gets recorded under security audit logs.
For example, to add the Security Logs section for item revision, update the applicable stylesheet for the
item revision with the following content.
You can export audit logs to Microsoft Excel or csv formats from the Summary view of an object.
1. Select an object whose audit logs you want to export and click the Summary tab.
2. To export the audit logs in Microsoft Excel format, click the Export to Excel button.
To export the audit logs in csv format, click the Export to CSV button.
Depending on the export option you select, the Export to Excel or Export to CSV dialog boxes
appear.
3. In the Export to Excel or Export to CSV dialog box, select the audit log type you want to export.
4. Click OK.
Depending on the export format you choose, Teamcenter exports the audit logs in Microsoft Excel or csv
format.
• Click Export Selected Objects to export the selected rows in the view.
• Select Export All Visible Columns to export all the columns in the view.
Microsoft Excel opens a temporary file. You can create a permanent file by choosing File→Save As in
Excel to display the Save As dialog box.
If you save a live Excel file, you can open it later in My Teamcenter to reconnect it to the database.
Note:
You need Microsoft Excel installed on your computer to export audit logs to Excel.
Values that you cannot change in Teamcenter are unavailable in the cells of the live Excel file.
The export to Excel option is not available on Linux clients.
• To export audit logs, set the value of the Opt_exp_auditrec option to True. The default value is False.
• To include audit logs associated with items when you export and import items from one site to
another using high-level data transfer, update the TIEUnconfiguredExportDefault transfer option set
as follows:
• To export audit logs, set the value of the Opt_exp_auditrec option to True. The default value is
False.
• To export workflow audit logs, set the value of the Opt_exp_workflow option to True. The default
value is False.
To include audit logs associated with items when you export and import items from one site to
another using low-level data transfer, update the options in the SiteConsolidationDefault transfer
option set as follows:
• To export audit logs, set the value of the Opt_exp_auditrec option to True. The default value is
True.
• To export workflow audit logs, set the value of the Opt_exp_workflow option to True. The default
value is False.
• Fnd0WriteSecondaryProperties
This log extension writes secondary object properties to the primary object. The following secondary
properties are written to primary business objects:
fnd0SecondaryObject fnd0SecondaryObject
fnd0Secondary fnd0SecondaryObject
ObjectType Type
fnd0Secondary fnd0SecondaryObject
ObjectName Name
fnd0Secondary fnd0SecondaryObj
ObjDispName DispName
fnd0Secondary
ObjQualifier
• EPMTask:__Add_Attachment
• EPMTask:__Remove_Attachment
• ADA_License:__Attach_License
• ADA_License:__Detach_License
• BOMView Revision:__Component_Add
• BOMView Revision:__Component_Remove
• ScheduleTask:__ResourceAssignment_Create
• ScheduleTask:__ResourceAssignment_Modify
• ScheduleTask:__ResourceAssignment_Delete
• ScheduleTask:__TaskDependency_Create
• ScheduleTask:__TaskDependency_Modify
• ScheduleTask:__TaskDependency_Delete
• Fnd0OCC_track_position_orientation_audithandler
This log extension enables the logging of occurrence position and orientation changes of the
components in structures. It is attached to the PSOccurrence:__Modify audit definition.
Note:
You must not use this log extension in any audit definition except for audit definitions that log
position and orientation changes of components based on occurrence properties.
• Fnd0CICO_auditloghandler
This log extension applies to checkin and checkout events. It logs the change ID and reason why the
object is checked in or out.
• Fnd0PROJInfo_audithandler
This log extension logs information about objects that are assigned to projects. The project names are
separated by commas.
By default, this extension is not available on any audit definition.
• Fnd0USER_get_additional_log_info
This log extension logs workflow information. For example, for the __Assign event, this log extension
logs information like the process name, task type, user comments, user ID, and the user name the
workflow is assigned to.
This log extension applies to workflow-related events such as __Abort, __Add_attachment,
__Approve, __Assign, __Assign_Approver, __Complete, __Demote, __Fail, __Notify, __Perform,
__Reject, __Stand_In, __Remove_Attachment, __Resume, __Start, __Suspend, and
__Update_Process.
• Fnd0WriteSignoffDetails
This log extension logs workflow signoff history. For example, for the __Add_attachment event, this
log extension logs information like signoff decision, job, sign off, user ID, sign off group, and sign off
role name.
This log extension applies to workflow related events such as __Add_attachment, __Approve,
__Reject, __Stand_In, and __Remove_Attachment.
Asia-Pacific
Americas Suites 4301-4302, 43/F
Granite Park One AIA Kowloon Tower, Landmark East
5800 Granite Parkway 100 How Ming Street
Suite 600 Kwun Tong, Kowloon
Plano, TX 75024 Hong Kong
USA +852 2230 3308
+1 314 264 8499