Business Action: Set Import Status Attributes
While not strictly required, it may be helpful to implement change flags; a way for users to view what data has been created or changed due to an import.
In order to enable the system to indicate when data is new and/or changed, metadata attributes and the 'Set import status attributes' business action can be used within the Import state of a workflow. At a minimum, at least one attribute is required for delete statuses, new statuses, and changed statuses for all imports. If additional distinction is desired, unique attributes can be created to store delete, new, and changed statuses for varying objects or imports. In either case, when an importer determines that data should be flagged as delete, new, or changed, it writes 'true' in the attributes indicated in the business action configuration. This allows each customer to determine their own strategy for managing delete, new, and/or changed data, such as processing the new and/or changed data via a workflow.
In the example below, an ACES import created a new application for part VC21499. Because the application is new, the configured attribute New Object displays the value of 'true.'
If the application had previously existed and had information changed during the import, then only the Changed Object attribute value would display 'true.'
Important: This business action can ONLY be used within the Import state of a workflow. Additionally, an error will occur when delete flags are used for TecDoc reference data on an 8.2 system. It is recommended that change flags for TecDoc reference data only be implemented on 8.3 (or newer) releases.
Configuring Change Flags for New and/or Updated Objects
To properly configure this business action to track new and/or updated objects, the following is needed:
- Create / Identify Valid Attributes
- Configure a Business Action to Use the Set Import Status Attributes Operation
- Update Workflow Settings
Create / Identify Valid Attributes
- Create the necessary attributes (or verify that they exist) to be used to store the new and/or changed data (i.e., Delete Status, New Object, Changed Object).
- Make sure the attributes are valid for the object(s) being managed by the import.
For example, an attribute used in the AutoCare ACES Application Importer must be valid on ACES Application objects. Alternatively, an attribute used in the AutoCare PCdb Importer must be valid on all nodes in the PCdb classification hierarchy.
Configure a Business Action to Use the Set Import Status Attributes Operation
- Create a business action and give it a name that users can easily identify. In the example below, Set Change Flags is used.
- Click the ellipsis button (
) to the right of the Valid Object Types parameter to find and select the necessary object type(s). In the Set Change Flags example below, 'All object types valid' is selected.
- On the Operations tab, click the edit Operation button, and the Edit Operation dialog will display.
- Click on the Edit Operation dropdown, click Import flow, and then click Set import status attributes.
- Three parameters will display. Configure the parameters to use the necessary attributes.
- Deleted object attribute:Click the ellipsis button (
) to find and select the attribute which is configured in the Delta Calculation state within the 'Delete status attribute' parameter. This parameter clears the delete flag status (if any) upon successful import of the same object again. The attribute that is used in this parameter should be the same attribute that is configured in the Delta Calculation state. For the example above, the Delete Status attribute (created / identified in the previous section) is selected.
- New object attribute: Click the ellipsis button (
) to find and select an attribute to be used to identify when an object is added. For the example above, the New Object attribute (created / identified in the previous section) is selected.
- Updated values attribute: Click the ellipsis button (
) to find and select an attribute to be used to identify when an object is changed. For the example above, the Changed Object (created / identified in the previous section) is selected.
Note: PMDM for Automotive solution, upon configuration, only provides an option to automatically erase the existing flags in the attribute marked for deletion. Wherein the flags (attribute value) marked for notifying newly added objects and changed objects cannot be erased automatically. User needs to determine their own strategy for erasing the flags (attribute value). For information on erasing the existing delete status flags, refer to topic Use Cases - Clearing Delete Status Flag here.
- Click the Save buttons to save and close the business rule.
For more information on creating and/or editing business rules, refer to the Creating a Business Rule, Function, or Library topic (here), and the Editing a Business Rule or Function topic (here) within the Business Rules guide.
Update Workflow Settings
Once the business rule is configured, the necessary workflows need to be updated to use the business rule. Below are the steps to update a workflow to use the business rule created in the previous section.
Important: Because the business rule created in the previous section is configured to work with ACES Application valid object types, the ACES Import Workflow is used for the example below. If the business rule is configured to also work with TecDoc and/or NAPA Applications, then those import workflows would need to also be edited.
- Go to workbench > System Setup > Workflows > select a workflow.
- Right-click, and select Edit STEP Workflow.
- On the STEP Workflow Designer window, double click on the Import state to open the State Editor.
- Select the On Entry tab, and within the Operations tab, click the Edit icon to display the Edit Operations Dialog (as shown below).
- In the Edit Operation dialog, Click the ellipsis button (
) to the right of the Import action parameter to find and select the business action previously created.
- Click the Save button, and exit the workflow.