audit_manager
audit_manager
Teamcenter 12.2
Audit Manager
PLM00022 • 12.2
Contents
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.
• TC_audit_manager_version
Ensure the preference is set to 3.
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 the Summary view of the following Teamcenter applications to access or view audit logs in
the Audit logs tab.
o My Teamcenter
o ADA License
o Structure Manager
o Multi-Structure Manager
o Schedule Manager
o Workflow Viewer
o Organization
• 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:
• 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
After updating the preferences:
• Restart Teamcenter server pool manager if you are on a four-tier installation.
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.
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.
• 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:
o 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.
o 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.
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
• 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.
• 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.
D. Click Add to the right of the Availability table and perform the following in the Extension
availability dialog box:
i. In the Business Object Name box, select Fnd0AuditDefinition.
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.
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.
Generated code has method signature as int P3_CustomAuditLog ( METHOD_message_t
*msg, va_list args )
Replace the method signature as below in P3_CustomAuditLog.cxx and
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 )
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;
}
ifail = POM_class_of_instance( primaryAuditBOTag, &auditClassId );
ifail = POM_name_of_class (auditClassId, &audit_class_name );
//ifail = EPM_ask_job(targetObjTag, &job_tag);
ifail = POM_string_to_tag(signoff, &signoffTag);
ifail = POM_class_of_instance( signoffTag, &signoffClassId );
ifail = POM_name_of_class (signoffClassId, &signoff_class_name );
isProp = false;
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 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.
• 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.
If you specify the Delete event type, then in the condition
specify only the UserSession parameter.
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.
The Primary Object Audit Definition Properties dialog box is displayed.
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.
Note
The isTrue and isFalse conditions are supported for all event types, including the Delete
event type.
The Audit Definition display name changes from ObjectType:__EventType:Condition
to ObjectType:__EventType:Status. Specify the status as active or inactive based on
the IsActive flag on the audit definition.
Parameters Parameter
Name
UserSessionThis parameter is UserSession. us
Business This parameter can be a BusinessObject or any child of a Business bo1
Object Object. (This will be the primary object of the audit definition.)
Business This parameter can be a BusinessObject or any child of a Business bo2
Object Object. (This will be the secondary object of the audit definition.)
Note
If the condition does not match the above criteria, the audit log will always create.
If you specify the Delete event type, specify User Session as the one and only parameter
in your condition.
An out-of-the-box sample condition is provided, for your convenience.
Note
Creating conditions means you can control the type of information you gather from data.
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 Iman file audit definition.
• 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.
• 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 objects allow administrators to define what information to log for Teamcenter object and event
combinations. For example, when:
• Specified item types are checked out.
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:
• Any change is made to a specific type of document revision.
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.
You can make smart, cost-effective decisions while managing audit records, with greater flexibility
in purging and archiving audit data.
The audit_purge utility enables you to archive or purge audit logs. This gives greater flexibility to:
• Control data growth.
Audit reports
The following audit reports are available when you choose the Tools→Reports→Report Builder
Reports menu command in My Teamcenter:
• Audit - Workflow Attachment Report
Displays workflow logs for the specified workflow attachment.
Note
Ensure that audit definitions exist for the objects for which you have created saved queries.
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.
<section title="Security Logs" titleKey="tc_xrt_SecurityLogs" initialstate="c
<objectSet source="fnd0SecurityAuditLogs.Fnd0SecurityAudit" defaultdispla
<tableDisplay>
<property name="fnd0LoggedDate"/>
<property name="fnd0EventTypeName"/>
<property name="fnd0PrimaryObjectID"/>
<property name="object_type"/>
<property name="object_name"/>
<property name="fnd0UserId"/>
<property name="fnd0GroupName"/>
<property name="fnd0RoleName"/>
<property name="fnd0SecondaryObjectID"/>
<property name="fnd0SecondaryObjectType"/>
<property name="fnd0SecondaryObjectName"/>
<property name="fnd0SecondaryObjDispName"/>
</tableDisplay>
</objectSet>
<customPanel java="com.teamcenter.rac.auditmanager.SecuritySecondaryAudit
</section>
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.
In the Summary view, select the Audit Logs 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.
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 UNIX clients.
• 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:
o To export audit logs, set the value of the Opt_exp_auditrec option to True. The default
value is False.
o 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:
o To export audit logs, set the value of the Opt_exp_auditrec option to True. The default
value is True.
o To export workflow audit logs, set the value of the Opt_exp_workflow option to True. The
default value is False.
o EPMTask:__Add_Attachment
o EPMTask:__Remove_Attachment
o ADA_License:__Attach_License
o ADA_License:__Detach_License
o BOMView Revision:__Component_Add
o BOMView Revision:__Component_Remove
o ScheduleTask:__ResourceAssignment_Create
o ScheduleTask:__ResourceAssignment_Modify
o ScheduleTask:__ResourceAssignment_Delete
o ScheduleTask:__TaskDependency_Create
o ScheduleTask:__TaskDependency_Modify
o 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.
Headquarters
Europe
Granite Park One
Stephenson House
5800 Granite Parkway
Sir William Siemens Square
Suite 600
Frimley, Camberley
Plano, TX 75024
Surrey, GU16 8QD
USA
+44 (0) 1276 413200
+1 972 987 3000
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