Highlighted
Absent Member.. Absent Member..
Absent Member..
157 views

AMGenericAdapter (push): ApiWrapper not available for Groovy

Jump to solution

Hi Experts,

We have a setup in Asset Manager with separate staging tables, where all new computers/CIs should be put, before they are (manually) accepted and transferred into the standard production tables (amComputer, amPortfolio, amAsset ++) of Asset Manager.

 

When using the AMGenericAdapter, the push (am-push-config.xml) in the "am-mapping" tag, is as default set up to use "operation-type=update_else_insert".

 

We would like to change this behaviour to only do "operation-type=update", and when the insert is rejected (since "operation-type=update") do an insert to the staging tables.

 

We know that the object ApiWrapper is available in "am-mapping", but unfortunately it is not available inside the "reconciliation/reconciliation-advanced" tags. If it was, we could hooked into one of these tags and with a Groovy script inserted a record into the staging tables instead.

 

The questions:

1. Are there any objects available for Groovy inside the "reconciliation/reconciliation-advanced" tags which can be used for communication with Asset Manager?

2. Is there a different way to accomplish what we are trying to do, except for running 2 separate push jobs; one for inserting into the staging tables, and one for updating the standard production tables?

 

Kind regards,

Johnny

0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.
Super Contributor.

Re: AMGenericAdapter (push): ApiWrapper not available for Groovy

Jump to solution

Hello Johnny,

 

This is something that would be better handle by the AM team, but after checking there is no option to do what you are requesting, in that case you would need to do it on 2 separated jobs.

 

The reason for this is that there is no "Try - Catch" option for example in case that the update fails do this, instead it would throw an error/warning.

HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution

View solution in original post

1 Reply
Highlighted
Super Contributor.
Super Contributor.

Re: AMGenericAdapter (push): ApiWrapper not available for Groovy

Jump to solution

Hello Johnny,

 

This is something that would be better handle by the AM team, but after checking there is no option to do what you are requesting, in that case you would need to do it on 2 separated jobs.

 

The reason for this is that there is no "Try - Catch" option for example in case that the update fails do this, instead it would throw an error/warning.

HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.