Jump to content

Asset Import Tool


Recommended Posts

Hello,

I'm having some issues with the asset import tool, the log states its complaining about unable to lookup a customer. I'm striped my json file down to bare minimal first removing anything that suggests it would look up a customer and then hard coded a customer in but i keep getting the same error.

Is there a default field that must be filled in that i'm missing?

 

 "AssetGenericFieldMapping": {
        "h_name": "[h_name]",
        "h_site": "[h_site]",
        "h_asset_tag": "[h_asset_tag]",
        "h_created_date": "[h_created_date]",
        "h_description": "[h_description]",
        "h_last_updated_by": "Admin",
        "h_owned_by": "Admin"


    },
    "AssetTypeFieldMapping": {
        "h_name": "[h_name]",
        "h_average_pages_per_minute": "[h_average_pages_per_minute]",
        "h_description": "[h_description]"
    }

 

Create Asset: 17687
2019/09/19 14:07:52 [ERROR] Unable to Search for Customer [<nil>]: FlowCode Exception (com.hornbill.servicemanager/flowcode/fc_ops/shrGetCustomerDetails): nodeName: API Call: userProfileGet; nodeId: 3e1a9a7d-45ca-4e80-ae16-3a473865b996; At 182/1: "Uncaught EspMethodCall::invoke: Operation[session::userProfileGet] The value in element <userId> did not meet the required input pattern constraints. at location '/methodCall/params/userId'"
    throw(e);
_fc_node_exec_3e1a9a7d_45ca_4e80_ae16_3a473865b996
2019/09/19 14:07:52 [DEBUG] API XML: <params><customerId>&lt;nil&gt;</customerId><customerType>0</customerType></params>
2019/09/19 14:07:52 [ERROR] Unable to Search for Customer [<nil>]: FlowCode Exception (com.hornbill.servicemanager/flowcode/fc_ops/shrGetCustomerDetails): nodeName: API Call: userProfileGet; nodeId: 3e1a9a7d-45ca-4e80-ae16-3a473865b996; At 182/1: "Uncaught EspMethodCall::invoke: Operation[session::userProfileGet] The value in element <userId> did not meet the required input pattern constraints. at location '/methodCall/params/userId'"
    throw(e);
_fc_node_exec_3e1a9a7d_45ca_4e80_ae16_3a473865b996
2019/09/19 14:07:52 [DEBUG] API XML: <params><customerId>&lt;nil&gt;</customerId><customerType>0</customerType></params>
2019/09/19 14:07:52 [DEBUG] Asset Create XML <params><application>com.hornbill.servicemanager</application><entity>Asset</entity><returnModifiedData>true</returnModifiedData><primaryEntityData><record><h_class>printer</h_class><h_type>40</h_type><h_last_updated>2019-09-19 14:07:51+01:00</h_last_updated><h_last_updated_by>Import - Add</h_last_updated_by><h_created_date>2018-08-24 12:56:01</h_created_date><h_description>Epson Printer</h_description><h_last_updated_by>Admin</h_last_updated_by><h_owned_by>urn:sys:0:System Administrator:Admin</h_owned_by><h_owned_by_name>System Administrator</h_owned_by_name><h_name>17687</h_name></record></primaryEntityData><relatedEntityData><relationshipName>AssetClass</relationshipName><entityAction>insert</entityAction><record><h_type>40</h_type><h_name>17687</h_name><h_description>Epson Printer</h_description></record></relatedEntityData></params>
2019/09/19 14:07:52 [DEBUG] Create Asset: 17688
2019/09/19 14:07:53 [ERROR] Unable to Search for Customer [<nil>]: FlowCode Exception (com.hornbill.servicemanager/flowcode/fc_ops/shrGetCustomerDetails): nodeName: API Call: userProfileGet; nodeId: 3e1a9a7d-45ca-4e80-ae16-3a473865b996; At 182/1: "Uncaught EspMethodCall::invoke: Operation[session::userProfileGet] The value in element <userId> did not meet the required input pattern constraints. at location '/methodCall/params/userId'"
    throw(e);
_fc_node_exec_3e1a9a7d_45ca_4e80_ae16_3a473865b996
2019/09/19 14:07:53 [DEBUG] API XML: <params><customerId>&lt;nil&gt;</customerId><customerType>0</customerType></params>
2019/09/19 14:07:53 [ERROR] Unable to Search for Customer [<nil>]: FlowCode Exception (com.hornbill.servicemanager/flowcode/fc_ops/shrGetCustomerDetails): nodeName: API Call: userProfileGet; nodeId: 3e1a9a7d-45ca-4e80-ae16-3a473865b996; At 182/1: "Uncaught EspMethodCall::invoke: Operation[session::userProfileGet] The value in element <userId> did not meet the required input pattern constraints. at location '/methodCall/params/userId'"
    throw(e);
_fc_node_exec_3e1a9a7d_45ca_4e80_ae16_3a473865b996
2019/09/19 14:07:53 [DEBUG] API XML: <params><customerId>&lt;nil&gt;</customerId><customerType>0</customerType></params>
2019/09/19 14:07:53 [DEBUG] Asset Create XML <params><application>com.hornbill.servicemanager</application><entity>Asset</entity><returnModifiedData>true</returnModifiedData><primaryEntityData><record><h_class>printer</h_class><h_type>40</h_type><h_last_updated>2019-09-19 14:07:51+01:00</h_last_updated><h_last_updated_by>Import - Add</h_last_updated_by><h_description>Epson Printer</h_description><h_last_updated_by>Admin</h_last_updated_by><h_owned_by>urn:sys:0:System Administrator:Admin</h_owned_by><h_owned_by_name>System Administrator</h_owned_by_name><h_name>17688</h_name><h_created_date>2018-08-24 12:56:01</h_created_date></record></primaryEntityData><relatedEntityData><relationshipName>AssetClass</relationshipName><entityAction>insert</entityAction><record><h_type>40</h_type><h_name>17688</h_name><h_description>Epson Printer</h_description></record></relatedEntityData></params>
2019/09/19 14:07:53 [DEBUG] Create Asset: 18809
2019/09/19 14:07:53 [ERROR] Unable to Search for Customer [<nil>]: FlowCode Exception (com.hornbill.servicemanager/flowcode/fc_ops/shrGetCustomerDetails): nodeName: API Call: userProfileGet; nodeId: 3e1a9a7d-45ca-4e80-ae16-3a473865b996; At 182/1: "Uncaught EspMethodCall::invoke: Operation[session::userProfileGet] The value in element <userId> did not meet the required input pattern constraints. at location '/methodCall/params/userId'"
    throw(e);
_fc_node_exec_3e1a9a7d_45ca_4e80_ae16_3a473865b996
2019/09/19 14:07:53 [DEBUG] API XML: <params><customerId>&lt;nil&gt;</customerId><customerType>0</customerType></params>
2019/09/19 14:07:54 [ERROR] Unable to Search for Customer [<nil>]: FlowCode Exception (com.hornbill.servicemanager/flowcode/fc_ops/shrGetCustomerDetails): nodeName: API Call: userProfileGet; nodeId: 3e1a9a7d-45ca-4e80-ae16-3a473865b996; At 182/1: "Uncaught EspMethodCall::invoke: Operation[session::userProfileGet] The value in element <userId> did not meet the required input pattern constraints. at location '/methodCall/params/userId'"
    throw(e);
_fc_node_exec_3e1a9a7d_45ca_4e80_ae16_3a473865b996
2019/09/19 14:07:54 [DEBUG] API XML: <params><customerId>&lt;nil&gt;</customerId><customerType>0</customerType></params>
2019/09/19 14:07:54 [DEBUG] Asset Create XML <params><application>com.hornbill.servicemanager</application><entity>Asset</entity><returnModifiedData>true</returnModifiedData><primaryEntityData><record><h_class>printer</h_class><h_type>40</h_type><h_last_updated>2019-09-19 14:07:51+01:00</h_last_updated><h_last_updated_by>Import - Add</h_last_updated_by><h_created_date>2018-08-24 12:56:02</h_created_date><h_description>Dot Martix Printer</h_description><h_last_updated_by>Admin</h_last_updated_by><h_owned_by>urn:sys:0:System Administrator:Admin</h_owned_by><h_owned_by_name>System Administrator</h_owned_by_name><h_name>18809</h_name></record></primaryEntityData><relatedEntityData><relationshipName>AssetClass</relationshipName><entityAction>insert</entityAction><record><h_type>40</h_type><h_name>18809</h_name><h_description>Dot Martix Printer</h_description></record></relatedEntityData></params>
 

Link to comment
Share on other sites

  • 3 weeks later...

Hi @Joanne,

I've not actually been able to replicate your issue, but I've made some changes to the way that nil-value interfaces are handled (which is what appears to be struggling, looking at your log entries). This is on Github now, v1.8.1, could you try that and let me know how you get on please?

https://github.com/hornbill/goDBAssetImport/releases/latest

Many thanks,

Steve

Link to comment
Share on other sites

  • 2 months later...

Hello. I have the latest GIT hub install of goDBAssetImport. But I am also getting the same error as Joanne.

It would appear it is failing when it calls the API, with the error <userid> did not meet the required input pattern contraints

The API key I am using has been created on the Admin user and is active and not expired.

Full error is:

2019/12/30 15:02:58 [DEBUG] ---- Hornbill CSV Asset Import Utility V1.2.1 ----
2019/12/30 15:02:59 [DEBUG] Flag - Config File conf_networkDevice.json
2019/12/30 15:02:59 [DEBUG] Flag - Dry Run true
2019/12/30 15:02:59 [DEBUG] Loading Config File: C:\Temp\goCSVAssetImport/conf_networkDevice.json
2019/12/30 15:02:59 [DEBUG] Processing Assets
2019/12/30 15:03:00 Unable to Search for Asset: Error in stored query, see log for more details
2019/12/30 15:03:00 [DEBUG] API Call XML: <params><application>com.hornbill.servicemanager</application><entity>Asset</entity><searchFilter><column>h_name</column><value></value></searchFilter><maxResults>1</maxResults></params>
2019/12/30 15:03:00 [DEBUG] Create Asset: 
2019/12/30 15:03:00 [ERROR] Unable to Search for Customer [<nil>]: FlowCode Exception (com.hornbill.servicemanager/flowcode/fc_ops/shrGetCustomerDetails): nodeName: API Call: userProfileGet; nodeId: 3e1a9a7d-45ca-4e80-ae16-3a473865b996; At 182/1: "Uncaught EspMethodCall::invoke: Operation[session::userProfileGet] The value in element <userId> did not meet the required input pattern constraints. at location '/methodCall/params/userId'"
    throw(e);

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...