Unable to approve for group using API

I am trying to approve a change for group using the following code:

IChange change = (IChange)aSession.getObject(ChangeConstants.CLASS_CHANGE_ORDERS_CLASS , "CO12345");

Collection<IUserGroup> group = new ArrayList<IUserGroup>();

IUserGroup myGroup = (IUserGroup)aSession.getObject(UserGroupConstants.CLASS_USER_GROUP_BASE_CLASS, "Drawing Approvers ");

//assert(myGroup.getName() != null);

group.add(myGroup);

change.approve("password", "I approve this as drw approver", null, group);

And I got the follow errors: Error message :

User1 is not a valid approver or observer. Root Cause exception : com.agile.util.exception.CMAppException: User1 is not a valid approver or observer. at com.agile.api.pc.APIObject.createError(APIObject.java:131) at com.agile.api.pc.RouteObject$ApproveActionEx.doSdkAction(RouteObject.java:1360) at com.agile.api.common.SDKAction.run(SDKAction.java:23) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146) 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.approve(RouteObject.java:81) at agile.test.main.AgileTest.main(AgileTest.java:58)

What is the correct call to approve for group?

Add Comment
2 Answer(s)

I will answer  my own question:

 

I need to use another overloaded version of the approve call which takes a signoffforself arguments.

Agile User Answered on January 10, 2020.
Add Comment

I believe an approval has to be by an individual. Not a group.

Agile Angel Answered on January 10, 2020.
Add Comment

Your Answer

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