If Discovery and SCCM are running in parallel with Software Asset Management enabled, an SCCM transform map populates a primary key value on the Software Installation [cmdb_sam_sw_install] table that is already populated by a ServiceNow business rule running on that table. This action results in duplicate Discovery model records that prevent software installations from being picked up by Client Software Distribution (CSD) revocation workflows. When a user submits a request to revoke a software installation, the request does not recognize the installation.
Steps to Reproduce
- Activate the Software Asset Management Premium plugin.
- Run Discovery.
- Go to one of the software installations and notice the primary key.
The key should only be constructed with <publisher>.<display name>.<version>.
- Install an SCCM integration plugin (for example, Integration - Microsoft SCCM 2012 v2).
- Run SCCM Discovery.
- Open the same software installation from step 3.
Note that the primary key has changed to include prod_id and revisions like <publisher>.<display name>.<version>.<prod_id>.<revision>.
The primary key is updated, incorrectly, when the transform map on the SCCM Discovery overwrites the one created by the business rule. The primary key generation should only be performed by the business rule.
Remove the primary key from the Incremental Import (SAM enabled) transform map, since the Build Primary Key business rule running on the Software Installation [cmdb_sam_sw_install] table should generate this key. This makes the behavior consistent with the way the primary key is built in Discovery.
Related Problem: PRB1058467