Changing status from CCB to released throws exception

Hi Friends,

I am doing one SDK program of Create a change, add Affected items into it and promote it to last status of the workflow from submitted>ccb>relased->Implemented.

public static IChange releseECO(IChange change,IAgileSession m_session )
throws APIException {
// Set workflow
//IWorkflow workflow = change.getWorkflows()[0];
m_session.disableAllWarnings();
//IStatus submit = getStatus(change, StatusConstants.TYPE_SUBMIT);
IStatus submit=change.getDefaultNextStatus();
IWorkflow workflows = change.getWorkflows()[0];
change.setWorkflow(workflows);

IDataObject[] defaultApprovers = change.getApproversEx(submit);
// Get default observers for the next status
IDataObject[] defaultObservers = change.getObserversEx(submit);

change.changeStatus(submit, false, “”, false, false, null, defaultApprovers, defaultObservers, false);
// Change status to CCB

System.out.println(“Moved to the submit status”);

IStatus ccb=change.getDefaultNextStatus();

IDataObject[] defaultObservers1 = change.getObserversEx(ccb);

IDataObject[] defaultApprovers1 = change.getApproversEx(ccb);

change.changeStatus(ccb, false, “”, false, false,null, defaultObservers1, defaultApprovers1, false);

System.out.println(“Moved to the CCB status”);
IStatus released=change.getDefaultNextStatus();
IDataObject[] defaultObservers2 = change.getObserversEx(released);

IDataObject[] defaultApprovers2 = change.getApproversEx(released);

change.changeStatus(released, false, “”, false, false,null, defaultObservers2, defaultApprovers2, false);

System.out.println(“Moved to the Released status”);

return change;

}

These are the outputs- Provide the assistance as i am moving to ccb to the relased state as i am getting exception:-

Connected to server
Added the Affected Item!!!
Moved to the submit status
Moved to the CCB status
Sample did not execute successfully!!!
com.agile.pc.cmserver.base.AuditException
at weblogic.utils.StackTraceDisabled.unknownMethod()
com.agile.pc.cmserver.base.AuditException
at weblogic.utils.StackTraceDisabled.unknownMethod()
Error code : 60104
Error message : See multiple root causes.
Root Cause exception : com.agile.pc.cmserver.base.AuditException

at com.agile.api.pc.APIObject.createError(APIObject.java:121)
at com.agile.api.pc.RouteObject$ChangeStatusExAction.doSdkAction(RouteObject.java:2531)
at com.agile.api.common.SDKAction.run(SDKAction.java:23)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:368)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:163)
at weblogic.security.Security.runAs(Security.java:61)
at com.agile.api.common.WebLogicAuthenticator.doAs(WebLogicAuthenticator.java:111)
at com.agile.api.common.Security.doAs(Security.java:54)
at com.agile.api.common.Security.doAs(Security.java:109)
at com.agile.api.pc.RouteObject.doChangeStatusEx(RouteObject.java:898)
at com.agile.api.pc.RouteObject.changeStatus(RouteObject.java:887)
at agile.Addaffecteditem.releseECO(Addaffecteditem.java:85)
at agile.Addaffecteditem.main(Addaffecteditem.java:28)

Add Comment
3 Answer(s)

You could catch the exception in a try & catch(APIException e) and then print out e.getRootCause().  Based on the Audit Exception, my guess is there are required fields at the release status (perhaps Revision??) that are not filled in.

Agile Talent Answered on March 28, 2023.
Add Comment

Thanks for the response – Now i could move the status from pending to release – when i try to move the status one more i.e Implemented – Is there any changes could be made from changestatus(), I am getting the below error- Attaching the latest code snippets and Errors…please guide Ref : ApproveECO.java code from the SDK sample code reference

m_session.disableAllWarnings();
eco.changeStatus(submitted, false, “submit ECO”, false, false, null,
null, null, false);
eco.changeStatus(ccb, false, “route to CCB”, false, false, null, null,
null, false);

eco.addApprovers(ccb, approverList, observerList, false,
“add approver/observer”);
eco.addApprovers(released, approverList, observerList, false,
“add approver/observer”);

eco.setValue(ChangeConstants.ATT_COVER_PAGE_REASON_FOR_CHANGE,
“Replacement”);
eco.setValue(ChangeConstants.ATT_COVER_PAGE_DESCRIPTION_OF_CHANGE,
“replace motherboard”);

eco.approve(args[2], “Approve!!”);

m_session.disableWarning(new Integer(426));
m_session.disableWarning(new Integer(344));
eco.changeStatus(released, false, “release ECO”, false, false, null,
null, null, false);

m_session.disableAllWarnings();

eco.changeStatus(complete, false, “complete ECO”, false, false, null,
null, null, false);

} catch (APIException e) {

System.out.println(“Sample did not execute successfully!!!”);
e.printStackTrace();

 

Error:

Sample did not execute successfully!!!
com.agile.pc.cmserver.base.AuditException
at weblogic.utils.StackTraceDisabled.unknownMethod()
com.agile.pc.cmserver.base.AuditException
at weblogic.utils.StackTraceDisabled.unknownMethod()
Error code : 60104
Error message : See multiple root causes.
Root Cause exception : com.agile.pc.cmserver.base.AuditException

at com.agile.api.pc.APIObject.createError(APIObject.java:121)
at com.agile.api.pc.RouteObject$ChangeStatusAction.doSdkAction(RouteObject.java:2483)
at com.agile.api.common.SDKAction.run(SDKAction.java:23)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:368)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:163)
at weblogic.security.Security.runAs(Security.java:61)
at com.agile.api.common.WebLogicAuthenticator.doAs(WebLogicAuthenticator.java:111)
at com.agile.api.common.Security.doAs(Security.java:54)
at com.agile.api.common.Security.doAs(Security.java:109)
at com.agile.api.pc.RouteObject.doChangeStatus(RouteObject.java:835)
at com.agile.api.pc.RouteObject.changeStatus(RouteObject.java:812)
at agile.Addaffecteditem.main(Addaffecteditem.java:66)

Agile User Answered on March 29, 2023.
Add Comment

Hi, I could help.

Would you like to set up a quick call?

Agile User Answered on April 13, 2023.
Add Comment

Your Answer

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