Service Connect: Business object returns unexpected error within workflow, but works fine with BLTester

Hello everyone!
I try to create a workflow that replicates the process of the users in the module Engineering Workbench,
but I have problems when inserting materials to the operations, to show the error with this business object, I made a simple workflow and its sample data (I attached both):

Business object and method: Erp.Proxy.BO.EngWorkBenchImpl.InsertMaterial

Business object returns unexpected error within workflow, but works fine with BLTester
Unspecified error: Unknown fatal errors occurred: Failed to execute proxy assembly: Record not available.

Works fine with BLTester:

Same business object and method fail within simple workflow:


WorkFlow.zip (2.3 MB)

Just a guess - I bet you need to have a parent record present in the dataset you pass to that method

Signature of the method specifies that it does not require DS:

InsertMaterial(String ipGroupID, String ipPartNum, String ipRevisionNum, String ipAltMethod, DateTime] ipAsOfDate, Boolean ipCompleteTree, String ipPartPartNum, Int32 ipOperSeq, Int32 ipMtlSeq, String ipBeforeMtlRowid, Boolean ipReturn, Boolean ipGetDatasetForTree, Boolean ipUseMethodForParts)

unlike the UpdateEx method, for example:
UpdateExt(UpdExtEngWorkBenchDataSet ds, Boolean continueProcessingOnError, Boolean rollbackParentOnChildError, out Boolean errorsOccurred)

I see, did you try marking the row with RowMod = “U”…well i dont guess theres a row to mark. Interesting method, I’ll have to look at the decomp

In Conversion it seems it does not have RowMod

Ah I see - it builds a tableset on the fly based on the parameters. You are confident of all your passed parameters?

In the second screenshot it is clear that the parameters are passed correctly in msg:dta

Right, but it’s kind of irrelevant if the working SC is passing the right params - I mean your code. You should trap the failing call so you can see the params is passing (and failing on)

I see 2 key failure points that throw Record Not Found
if (ECOGroup == null)
if (bECORev == null)

I was thinking this was code - i only read bits and pieces apparently. :stuck_out_tongue:
So just because you are correctly mapped, doesnt mean the params it is passing are right. Know what I mean? Determine the failing record and check that the ECO group and rev exist

Yes, I understand, I need to validate that all the required fields, but this simple workflow I just did to exemplify where the BO fails :confused:

I have seem some crazy SC workflows from @josecgomez where he did error handling and created supporting records as needed - like ECOgroup in your case.

Finally I found the mistake, I never pass this param: String ipAltMethod

InsertMaterial(String ipGroupID, String ipPartNum, String ipRevisionNum, String ipAltMethod, DateTime]