12 Replies Latest reply on Jan 16, 2018 1:34 PM by Gustavo del Gerbo

    Create CI with additional Asset Attributes via Spoon

    Jeff Sikorski

      Remedy 8.1.02


      So here's the problem in a nutshell:
      I want an AI job that creates a CI from a spreadsheet

      The kicker here is that the "CI" will also need to be created with a few "ASSET" only attributes.


      My spoon job is:
      Text Source -> CMDBOutput -> CMDBLookUp -> AROutput


      CMDBOutput goes directly to BMC.ASSET as a BMC_ComputerSystem
      AROutput goes directly to AST:Attributes


      I'm able to get the CI created, I can find it in BaseElement
      The "Asset" record is also being created, I can find it in AST:Attributes via ReconID from BaseElement


      I think the problem is that the AROutput step is not REALLY working.


      My hunch (could be way wrong) is that there is a 'delay' (less than a few secs) between the CI being created, and the AST:Attributes record being created ... and it happens so fast that by the time AROutput step runs, the entry doesn't exist in AST:Attributes yet.


      That or I'm totally off on the AROutput step. 


      Can anyone see what I'm doing wrong?  Any help appreciated , thanks !










        • 1. Re: Create CI with additional Asset Attributes via Spoon
          Vamsi Yemadabthni

          Hi Jeff,

          I usually do reconciliations ID for the duplicate match. Give a try taking out instance ID and just use reconciliation ID for filtering duplicates.


          Let me know how it works or else we can come up with different ideas.


          Thank You

          • 2. Re: Create CI with additional Asset Attributes via Spoon
            Jeff Sikorski

            Thanks ...


            That got me a little closer (or maybe further!)


            Good news:

            I can lookup the ReconID in AST:Attributes form ... and it has the data in the attributes that i want


            Bad news:

            I can't find the record in the Asset Manager Console Web UI portion by doing a Search -> System -> ComputerSystem


            Interesting news:

            However, doing a query directly against the database, I can find an entry for the asset I just created in the ast_computersystem table/view, and the ast_baseelement table/view.  The instanceID, classID, ReconID, all look good and match the CI in the BMC_CORE form


            So I'm not sure what the problem is now -- and is there some kind of job that runs that will sync up the Asset Manager console?



            • 3. Re: Create CI with additional Asset Attributes via Spoon
              Vamsi Yemadabthni

              Can you let me know are you adding data to any custom fields?

              • 4. Re: Create CI with additional Asset Attributes via Spoon
                Jeff Sikorski

                Yes there are a couple custom fields in Asset that I'm trying to add the data to:



                It's almost like the simpler fix is to just add those fields to the BaseElement form and sync them with the AssetManager form... then I wouldn't have to mess with trying to push "Asset Specific Fields".  Creating the CI and Asset via spreadsheet is easy... it's getting these "Asset-Only Fields" populated that's causing me the grief !



                • 5. Re: Create CI with additional Asset Attributes via Spoon
                  Vamsi Yemadabthni

                  I have added lot of custom fields in AST:Attributes and then added the same field to multiple classes and also I have choosed the same database ID for the field in both forms.


                  Can you try to update any out of the box field using the same spoon job and see if its getting updated? So that its easy to find if its the issue with the spoon job or custom field.

                  • 6. Re: Create CI with additional Asset Attributes via Spoon
                    Jeff Sikorski

                    I stripped down the AROutput step to bare minimum as far as mapping fields goes.  Same issue... the CI gets created in BMC_CORE ... i can find the corresponding record in AST:Attributes ... I can even query the database directly and see the recon ID in the AST_BaseElement form. 


                    But i cannot search for the record via the UI.











                    select * from AST_BaseElement where Reconciliation_Identity = 'REHAA5V0H5HP5APC2WLT3JHCPSN7R9' 

                    select * from AST_ComputerSystem where Reconciliation_Identity = 'REHAA5V0H5HP5APC2WLT3JHCPSN7R9' 

















                    • 7. Re: Create CI with additional Asset Attributes via Spoon
                      Jeff Sikorski

                      When I completely disable the AROutput step -- the CI and Asset record get created fine.  I am able to view the Asset through the Asset Management console.


                      So clearly the problem lies with the AROutput step.  Something is happening in that step that is preventing the asset from showing up in the Asset Management Console... which is weird.









                      • 8. Re: Create CI with additional Asset Attributes via Spoon
                        Vamsi Yemadabthni

                        Can you try to split the transformation? since you already have the CMDB output. Can you create new transformation for AR output?


                        Ex - Textfile --> CMDB lookup--> AR output.


                        Also can you add Submitter (values to return from CMDB lookup table) in the CMDB lookup step and give it new name ex- zsubmitter. Merge this field in the AR Output Submitter field.


                        Also just want to make sure you are mentioning company also right?

                        • 9. Re: Create CI with additional Asset Attributes via Spoon
                          Jeff Sikorski

                          Will try this tomorrow.  Thanks a ton for your assistance and tips, I appreciate it !


                          I do have "Company" being mapped in the CMDBOutput step.  I am not able to map "Company" in the AROutput step because it's not a valid field in the AST:Attributes form.


                          I took a screenshot of what a "good Asset"  looks like in the AST:Attributes form (witht he AROutput step disabled).  I might try running the process again with the AROutput step ... and comparing the AST:Attributes to see what data might be missing between the 'works' and 'doesnt work' (like Submitter, etc).



                          • 10. Re: Create CI with additional Asset Attributes via Spoon
                            Jeff Sikorski

                            So I'm comparing the AST:Attributes form between a CI&Asset that gets created without the AROutput step... and a CI&Asset I'm having trouble creating with the above method.


                            In the 'good record' vs 'bad record', these values are different:

                            Short Description

                            Good: CREATE_ASSET_LIFECYCLE_STATUS

                            Bad: n/a



                            Good:  BMC_COMPUTERSYSTEM

                            Bad: <null>




                            Good: Computer System

                            Bad:  <null>



                            Good: BMC_COMPUTERSYSTEM

                            Bad:  <null>



                            Good:  Computer System

                            Bad:  <null>


                            So I'm thinking of hardcoding some of the values in the AROutput step to see if that helps move it along.  Perhaps it needs some of that data in order to complete the process of creating the Asset Record.



                            • 11. Re: Create CI with additional Asset Attributes via Spoon
                              Jeff Sikorski

                              And that seemed to do it... i hardcoded all of those values just to be on the safe side... and it works now!  I am able to :
                                 A) Create the CI & Asset
                                 B)  Find the CI in BaseElement
                                 C)  Find the Asset in the UI
                                 D)  All the Asset specific/custom attributes got updated in the Asset Record


                              So basically .. the AST:Attributes form needs some additional help when you are doing this method.


                              It might be the "UserDisplayObjectName" being Computer System that finally allowed the asset to show up in the console.  But I don't feel like messing around and figuring out which one of those fields is necessary.  There's no harm I can see in just doing them all !


                              Constants I hardcoded:








                              Mappings in the AROutput:




                              Thanks a ton for your help and guidance!



                              • 12. Re: Create CI with additional Asset Attributes via Spoon
                                Gustavo del Gerbo

                                ClassID I think is the one that is making the difference here.