StartPcValueConfiguration

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.

You need to compare the data sent from REST to the Data that Epicor Sends in the Trace and see what’s missing. That’s really the easiest / only way.

2 Likes

Thanks Jose.

I went through line by line and found the issue. It can be tedious, especially because we’re comparing JSON with XML. I think I’m slowly getting the hang of what I need to do now.

Thanks again for your input. :+1:

So tedious man, yet it’s the only way.

I feel like Jose has a cool tool to compare datasets though I might be wrong… I don’t know if it worked with JSON, I believe it was XML?

Am I dreaming or does this tool exist Jose?

Hello @RJM
Sorry for the question, did you find the cause of the error “Configuration was not found in the configuration sequence table, a valid StructTag is required”?
Thank you so much for your answer.
Regards

Hello,

As Jose said in the solution to this, the only way to find the differences is to compare the tableset in your tracelog and the tableset that comes back from your rest call. I don’t remember the exact differences in this instance though I have a feeling it was one of the RowMods that changed flag.

Have a look at your trace logs and see if you can find differences in the in and out data. Make your REST data match. It’s pretty tedious but it works. If you’re still stuck after doing that start a new post and tag me, I’ll see what I can do.

Cheers, Ryan

Hello RJM,

thank you for your answer. I have a doubt, how do I enable the logs to be able to compare the in and out data? Is in Tracing options Forms?
Thank you

image

Client tracing, bottom of the homepage (note this is E10.2)
Anything further, please start a new thread.

Cheers, Ryan.

1 Like

Hello RJM,
I was able to correct the request to SavePcValueConfiguration, there were two fields RowMod and SubBasePartNum were wrong. I used track log as you recommended.
Thank you.
Regards.

1 Like