Following on from my previous post
So I got the PreStartConfiguration issues sorted out but immediately hit another roadblock.
Following through my trace log, the next method I need to call is StartPcValueConfiguration. This requires two datasets passed into it which are both obtained from PreStartConfiguration. Code for this part is as follows:
// get ds from PreStartConfiguration
dynamic dPreConfig = EpicorRest.BoPost("Erp.BO.ConfigurationRuntimeSvc", "PreStartConfiguration", dConfigRuntimeDS);
//create ds from dPreConfig
dConfigRuntimeDS = dPreConfig.ResponseData.parameters.configurationRuntimeDS;
//create ds2 from dPreConfig
dynamic dConfigSeqDS = dPreConfig.ResponseData.returnObj;
// get ds from StartPcValueConfiguration
dynamic dStartConfig = EpicorRest.BoPost("Erp.BO.ConfigurationRuntimeSvc", "StartPcValueConfiguration", new { ds = dConfigRuntimeDS, ds2 = dConfigSeqDS });
When I run this I get the following response from the REST call:
"{\"HttpStatus\":400,\"ReasonPhrase\":\"REST API Exception\",\"ErrorMessage\":\"Configuration was not found in the configuration sequence table, a valid StructTag is required.\", \"ErrorType\":\"Ice.BLException\",\"ErrorDetails\":[{\"Message\":\"Configuration was not found in the configuration sequence table, a valid StructTag is required.\", \"Type\":\"Error\",\"Program\":\"Erp.Services.BO.ConfigurationRuntime.dll\",\"Method\":\"StartPcValueConfiguration\",\"ColumnNumber\":17,\"LineNumber\":952}],\"CorrelationId\":\"0e672edd-17f4-4f7a-8fce-2877f6125393\"}"
The StructTag value is “/0”, which at a guess looks like it comes from the PcValueHead table. This looks consistent with the StructTag of other configurator sessions that have been run manually though there is no new entry added to PcValueHead at this stage.
@josecgomez sorry to bug you again with this one. Not wanting you to do the coding for me but how do you go about debugging something like this??? I’m feeling like I’m in over my head but I know if I can sort this out it will save my company countless hours of data processing. These roadblocks are taking me a very long time to stumble through and I feel like I need better methods for debugging them.
Any pointers you can give would be most welcome! Only too happy to code-share my results for the community here to benefit from.
Cheers! Ryan.