Updating ECO Affected Items table responds statusCode=SUCCESS yet updates did not happen.

Hello Again,

I am trying to update the Affected Items table (of an ECO) and I get statusCode=SUCCESS in the UpdateRowsResponseType.  I am trying to update the “Affected Items.Lifecycle Phase” field (and itemDescription) but when I look at the ECO in the Java client, the fields are not changed.   Next, I am trying to do a ChangeStatusRequestType on the ECO and I get an error as follows:

Agile Exceptions:Exception Id: -60086- Except ion Message: -The following required fields are missing: C53228: Affected Items.Lifecycle Phase: GGO2B-MPMT-00P0- Exception Cause: -null-

 

Clearly, I am doing something wrong (my fault), but I have tried to figure it out and so far failed.  Any advice, please?

My code:

public void updateTable(Integer tableId, String ecoNumber, String revision, Integer objectClass, String partNumber, Map<String,String> paramsMap) {

// See: https://docs.oracle.com/cd/E69230_12/otn/pdf/integration/html_agaap/output/chapter_4.htm

// See: https://docs.oracle.com/cd/E50306_29/otn/pdf/user/html_agaad/output/chapter_8.htm

String log = null;

LoadTableResponseType loadTableResponseType = getTables(ecoNumber, revision, objectClass.toString(), tableId.toString());

if (loadTableResponseType == null) {

throw new AgileException("Response is null while retrieving Table " + tableId.toString() + " " + ecoNumber + " " + revision);

} else {

log = ToStringBuilder.reflectionToString(loadTableResponseType, ToStringStyle.MULTI_LINE_STYLE);

System.out.println("loadTableResponseType: " + log);

checkStatus(loadTableResponseType.getStatusCode(), loadTableResponseType.getExceptions());

}
// Find the target row in the ECO Affected Items table

AgileRowType targetRow = null;

for (AgileTableType agileTable: loadTableResponseType.getTableContents()) {

List<AgileRowType> rows = agileTable.getRow();

for (AgileRowType row : rows) {

List<Element> any = row.getAny();

for (Element elt: any) {

if (partNumber.equals(elt.getTextContent())) {

targetRow = row;

break;

}

}

}

}

if (targetRow == null) {

String msg = "ERROR: part number missing from ECO AffectedItems";

System.out.println(msg);

throw new AgileException(msg);

}
// Build Request

UpdateRowsRequestType updateRowsRequestType = new UpdateRowsRequestType();

AgileUpdateRowsRequest agileUpdateRowsRequest = new AgileUpdateRowsRequest();

RequestTableType table = new RequestTableType();

table.setClassIdentifier( "ECO" );

table.setObjectNumber( ecoNumber );

table.setTableIdentifier( "AffectedItems" );

AgileUpdateRow updateRow = new AgileUpdateRow();

updateRow.setRowId(targetRow.getRowId());

paramsMap = new HashMap<String,String>();

paramsMap.put("itemDescription", "Maptile Bundle");

paramsMap.put("description", "Maptile Bundle");

paramsMap.put("lifecyclePhase", "Preliminary");

//paramsMap.put("itemLifecyclePhase", "Production");

//paramsMap.put("workflow", "Production");

List<Element> elements = buildMessageElements(paramsMap);

log = ToStringBuilder.reflectionToString(elements, ToStringStyle.MULTI_LINE_STYLE);

System.out.println("List<Elements>: " + log);

targetRow.getAny().addAll(elements);

updateRow.setRow(targetRow);

agileUpdateRowsRequest.setObjectInfo(table);

updateRowsRequestType.getData().add(agileUpdateRowsRequest);
createTableProxy();

UpdateRowsResponseType resp = agileStubTable.updateRows(updateRowsRequestType);

if (resp == null)

throw new AgileException("UpdateRowsResponseType is null");

else {

log = ToStringBuilder.reflectionToString(resp, ToStringStyle.MULTI_LINE_STYLE);

System.out.println("UpdateRowsResponseType: " + log);

}

}

 

And my logs:

 

2020-01-05 19:52:22,675 INFO [main] [Workflower] - Updating ECO Affected Items WorkflowParameters(partNumber=GGO2B-MPMT-00P0, ecoNumber=C53228, revision=A)

loadTableResponseType: com.agile.ws.schema.table.v1.jaxws.LoadTableResponseType@2f67a4d3[

tableContents=[com.agile.ws.schema.common.v1.jaxws.AgileTableType@49b2a47d]

outputParameters=<null>

messageId=<null>

messageName=<null>

statusCode=SUCCESS

sessionParameters=<null>

generalParameters=<null>

notes=<null>

exceptions=<null>

warnings=<null>

]

List<Elements>: java.util.LinkedList@147e2ae7[

]

UpdateRowsResponseType: com.agile.ws.schema.table.v1.jaxws.UpdateRowsResponseType@2235eaab[

messageId=<null>

messageName=<null>

statusCode=SUCCESS

sessionParameters=<null>

generalParameters=<null>

notes=<null>

exceptions=<null>

warnings=<null>

]

2020-01-05 19:52:23,810 INFO [main] [Workflower] - Updated ECO Affected Items WorkflowParameters(partNumber=GGO2B-MPMT-00P0, ecoNumber=C53228, revision=A) {lifecyclePhase=Preliminary}

2020-01-05 19:52:23,811 INFO [main] [Workflower] - Changing Status for ECO Number C53228 to Review State

2020-01-05 19:52:24,790 ERROR [main] [Workflower] - Workflow.workflowEco failed with AgileException: Agile Exceptions:Exception Id: -60086- Exception Message: -The following required fields are missing: C53228: Affected Items.Lifecycle Phase: GGO2B-MPMT-00P0- Exception Cause: -null-

 

 

Thank you very much !!

Randy

 

 

 

Agile User Asked on January 6, 2020 in Agile PLM (v9).
Add Comment
3 Answer(s)

Hello

Preliminary is not a valid lifecycle phase that you can set in the Affected Items. Can you please try setting any other lifecycle phase?

– Raj

Agile Angel Answered on January 6, 2020.
Add Comment

Thank you Raj.  What would you suggest I try as a value?  I have tried both “Preliminary” and “Production”.  It would be nice to be able to edit / update the ECO Affected Items’s table column for “Lifecycle Phase” so that I would hopefully do the subsequent workflow of the ECO to the next work flow state.

Thanks in advance,

Randy

Agile User Answered on January 6, 2020.

Can you please try using the example outlined in Section 13-4

Example 13–4 Working with Lifecycle Phase cells

of the SDK manual

https://docs.oracle.com/cd/E83928_04/otn/docset.html

 

 

on January 7, 2020.
Add Comment

Also, a gentile reminder of the text and message thread above: None of the row/column cell values are updated in the ECO Affected Items table, even through the update request gives a result of “SUCCESS”.  Hmm.   Thanks in advance for the present and future help.

Randy

Agile User Answered on January 6, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.