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 !

       

      ss0.png

       

       

      ss1.png

       

       

       

      ss2.png

        • 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?

             

            Thanks!
            Jeff

            • 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:
                InvScannerId

                InvDateTime

                 

                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 !

                 

                 

                Request_IDSubmitterCreate_DateAssigned_ToLast_Modified_ByModified_DateAssetLifecycleStatusShort_DescriptionAssigneeGroupPermissionsInstance_IdWrite_SecuritySales_TaxVSales_TaxCSales_TaxDVendorApplicationSerial_NumberCategoryTypeItemDepartmentSiteRegionPart_NumberNameAsset_HistoryRealmAsset_ID_zTmpKeywordDescriptionNotes_LogzPrevAssetIDModel_NumberManufacturer_Name_Manufacturer_ID_____foreign_keVersion_NumberSupplier_Name_Supplier_ID___foreign_key_Acquired_MethodBuildingSystemRoleCurrent_StateFloorRoomInstallation_DateChargeBackCodeY2K_CompliantAccounting_CodeSupportedTag_NumberBudget_CodeCost_CenterInvoice_NumberProject_NumberBackup_Asset_ID__Order_IDUsers_AffectedQuantityInStockBook_ValueVBook_ValueCBook_ValueDAvailable_DateReturnDateReceived_DatePurchase_DateDisposal_DateFixed_AssetConfigurationRequisition_IDPRInstanceIDTotal_Purchase_CostVTotal_Purchase_CostCTotal_Purchase_CostDTax_CreditVTax_CreditCTax_CreditDUnit_PriceVUnit_PriceCUnit_PriceDMarket_ValueVMarket_ValueCMarket_ValueDzConfigInstanceIDAdditionalDetailsSchedule_TypeMaintenance_LogAssetClassReturnReceiptIDzPOLineItemInstanceIDzPOInstanceIDLogicalIDzSchemaProperNameDepreciated_LastScanDateHomeCellImpactCostUnitOwner_contactOwner_nameImpactComputationModelInventoryInstance_Used_ByNameFormatFailed_Automatic_IdentificatioCostVCostCCostDPrioritymc_udidAccountIDComponentAliasesTaxCostInstanceIDPurchaseCostInstanceIDASTAttributeInstanceIdClass_IdOpIdWeakReferenceData_Set_IdMark_As_DeletedReconciliation_IdentityRel_Lead_Instance_IdRel_Lead_Class_IdLastREJobrunIdUserDisplayObjectNameTokenIdTokenFormatConfidentialityAvailabilityIntegrityAttributeDataSourceListReferenceInstancezCMDBEngTimestampStubDictionaryIdNormalizationStatusCITagParentCITagMFIntegrationIDReconciliationMergeStatusADDMIntegrationIdMarketVersionNEFeatureStatusMaskReconciliationIdTypeLastUpdatedDatasetIdReconciliationIdChangedReconciliationIdentificationErLicensingTypeCheckSumValueSystemEnvironmentCityNameScheduleIdImpactCostPerSecImpactCostPerSecOutPriorityWatchdogPriorityOutHomeCellAliasSelfPriorityFunctionSelfPriorityFunctionParamHomePageURIPublishToSIMEnterpriseCICompanyITSM_OrganizationStatus_ReasonUrgencyImpactPO_NumberInvOperatorInvScannerIdInvImportDateInvDateTimeInvPushedDateEnvDdmiMonitoredEnvOnNetworkLoaner_EndDateLoaner_StartDate
                000000095112892|000000041624380Remedy Application Service1.52E+09NULLRemedy Application Service1.52E+091176JDX91;1000000020;1000000000;OI-89be7b8b1d394082b4d092fb8370cf6dNULL0USD1.52E+09NULL76JDX91Hardware Processing UnitDesktopNULLThird Party LocationThird Party LocationNULL76JDX91NULLNULLNULLNULL76JDX91NULLNULLOptiplex GX760NULLNULLNULLNULLNULL0TRG RepairNULLNULLNULLNULLNULLNULL0NULL076JDX91NULLUnallocatedNULLNULLNULLNULLNULLNULL0USD1.52E+09NULLNULLNULLNULLNULL0NULLNULLNULL0USD1.52E+090USD1.52E+090USD1.52E+090USD1.52E+09NULLNULL0NULL0NULLNULLNULLNULLNULL1NULLNULLNULLNULLNULLSTANDARD1NULLNULL00USD1.52E+090NULLNULLNULLNULLNULLOI-89be7b8b1d394082b4d092fb8370cf6dBMC_COMPUTERSYSTEMNULLBMC.ASSETNULLREHAA5V0H5HP5APC2SFW3FRO1VN112NULLNULLNULLNULL0NULLNULLNULLNULLMiscAssets_AINULLNULLNULL2076JDX91NULLNULL40NULLNULL0NULLNULLNULLNULLNULLNULLNULLUSNULLNULLNULL00Default0NULLNULL01JCPenneyNULLNULLNULLNULLNULLNULLTRGNULL1.52E+09NULLNULLNULLNULLNULL
                • 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.

                     

                     

                     

                    ss4.png

                     

                     

                    ss5.png

                     

                     

                     

                    select * from AST_BaseElement where Reconciliation_Identity = 'REHAA5V0H5HP5APC2WLT3JHCPSN7R9' 

                    select * from AST_ComputerSystem where Reconciliation_Identity = 'REHAA5V0H5HP5APC2WLT3JHCPSN7R9' 

                     

                     

                     

                    ss0.png

                     

                     

                     

                     

                    ss1.png

                     

                     

                     

                     

                    ss2.png

                     

                    ss3.png

                    • 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.

                       

                      ss0.png

                       

                       

                       

                       

                       

                      ss1.png

                      • 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).

                           

                          ~Jeff

                          • 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

                             

                            ClassID

                            Good:  BMC_COMPUTERSYSTEM

                            Bad: <null>

                             

                             

                            zTmpSchemaProperName

                            Good: Computer System

                            Bad:  <null>

                             

                            zTmpKeyword

                            Good: BMC_COMPUTERSYSTEM

                            Bad:  <null>

                             

                            UserDisplayObjectName:

                            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.

                             

                            ~Jeff

                            • 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:

                               

                               

                               

                              ss10.png

                               

                               

                               

                              Mappings in the AROutput:

                              ss9.png

                               

                               

                              Thanks a ton for your help and guidance!

                               

                              ~Jeff

                              • 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.