Integrations (PTC products, 3rd party products and code) > 3rd party product integrations (CM, DOORS, Rose, Simulink and XML) > Integration for IBM Rational DOORS > Concepts > Defining additional filtering and access control through DXL (Integration for IBM Rational DOORS)
  
Defining additional filtering and access control through DXL (Integration for IBM Rational DOORS)
In addition to defining items to export and import through an Integration for IBM Rational DOORS mapping, you can define filtering and access control through a referenced DXL file.
Through the Common Mapping Options page you can reference a DXL file for a mapping. The referenced DXL file must include the functions that are described in this topic to control filtering and access control.
You can create a template DXL file that provides syntax information for the functions that follow: On the Common Mapping Options page, click the Select button, type a new File Name, and then click Open.
ARTCanUpdateModule function
The ARTCanUpdateModule function provides a way of defining whether a DOORS module can be updated by Integration for IBM Rational DOORS or not.
Return TRUE to allow Integration for IBM Rational DOORS to update the module, or FALSE to prevent Integration for IBM Rational DOORS from updating the module.
When the ARTCanUpdateModule function returns FALSE, the synchronization direction is resolved as follows:
A Modeler -> DOORS direction results in the synchronization being aborted.
A DOORS -> Modeler direction results in the synchronization being performed as normal.
A Modeler <-> DOORS direction results in a dialog being displayed that gives you the option to perform a DOORS -> Modeler synchronization or abort.
* 
If you have been making changes in DOORS and Modeler, and performing Modeler <-> DOORS synchronizations, perform a DOORS -> Modeler synchronization with caution as it could result in Modeler model changes being lost.
When the ARTCanUpdateModule function returns FALSE and a DOORS -> Modeler synchronization is performed, you can use the blnCanUpdateARTAttributes parameter to allow updates of PTC specific attributes in DOORS and control whether items are created in Modeler for objects that have empty PTC specific attributes:
When the blnCanUpdateARTAttributes parameter is set to True:
Integration for IBM Rational DOORS can change PTC specific attributes in DOORS, even though the ARTCanUpdateModule function returns FALSE.
Integration for IBM Rational DOORS can create items in Modeler regardless of whether of an object's PTC specific attributes are empty or not.
When the blnCanUpdateARTAttributes parameter is set to False:
Integration for IBM Rational DOORS cannot change PTC specific attributes in DOORS.
Integration for IBM Rational DOORS can create items in Modeler only if an object's PTC specific attributes are set.
ARTCanReadObject function
The ARTCanReadObject function provides a way of defining whether an object should be ignored by Integration for IBM Rational DOORS.
Return TRUE to allow Integration for IBM Rational DOORS to read the object, or FALSE to make Integration for IBM Rational DOORS ignore the object and all its child objects.
ARTCanWriteObject function
The ARTCanWriteObject function provides a way of defining whether a DOORS object can be updated by Integration for IBM Rational DOORS or not.
Return TRUE to allow Integration for IBM Rational DOORS to update the object, or FALSE to prevent Integration for IBM Rational DOORS from updating an object:
When FALSE is returned for the root object, Integration for IBM Rational DOORS is prevented from updating the root object and all its child objects.
When FALSE is returned for an object that is not a root object, Integration for IBM Rational DOORS is prevented from updating that object only.
Note that if the ARTCanUpdateModule function prevents the module from being updated, the ARTCanWriteObject function cannot then allow Integration for IBM Rational DOORS to update any objects in that module.
When the ARTCanWriteObject function returns FALSE, the synchronization direction is resolved as follows:
A Modeler -> DOORS direction results in the synchronization being aborted.
A DOORS -> Modeler direction results in the synchronization being performed as normal.
* 
If you have been making changes in DOORS and Modeler, and performing Modeler <-> DOORS synchronizations, perform a DOORS -> Modeler synchronization with caution as it could result in Modeler model changes being lost.
A Modeler <-> DOORS direction results in a dialog being displayed that gives you the option to perform a DOORS -> Modeler synchronization or abort.
When the ARTCanWriteObject function returns FALSE and a DOORS -> Modeler synchronization is performed, you can use the blnCanUpdateARTAttributes parameter to allow updates of PTC specific attributes in DOORS and control whether items are created in Modeler for objects that have empty PTC specific attributes:
When the blnCanUpdateARTAttributes parameter is set to True:
Integration for IBM Rational DOORS can change PTC specific attributes in DOORS, even though the ARTCanWriteObject function returns FALSE.
Integration for IBM Rational DOORS can create items in Modeler regardless of whether of an object's PTC specific attributes are empty or not.
When the blnCanUpdateARTAttributes parameter is set to False:
Integration for IBM Rational DOORS cannot change PTC specific attributes in DOORS.
Integration for IBM Rational DOORS can create items in Modeler only if an object's PTC specific attributes are set.
bool ARTCanWriteObject(Object objObject, bool &blnCanUpdateARTAttributes, string &strErrorMsg)
{
string strAbsNo = "" objObject."Absolute Number" "";
if (strAbsNo == "1")
{
strErrorMsg = "Not allowed.";
blnCanUpdateARTAttributes = true;
return false
}
else
{
strErrorMsg = null;
blnCanUpdateARTAttributes = true;
return true;
}
}
ARTOnAfterSyncObject function
The ARTOnAfterSyncObject function provides a way of running DXL script against an object after that object has been updated by Integration for IBM Rational DOORS.
Return TRUE if the object was processed correctly, or FALSE if an error occurred (you can include an optional error message).
Example:
bool ARTOnAfterSyncObject(Object objObject, string &strErrorMsg)
{
strErrorMsg = null;
return true;
}
ARTFinalizeSync function
The ARTFinalizeSync function provides a way of running DXL script after the synchronization is complete and all the preceding functions have been run.
Return TRUE if the finalize was processed correctly, or FALSE if an error occurred (you can include an optional error message).
{
strErrorMsg = "Error.";
print "Finalize";
return true;
}