How to get change number by PX

Hi

i want to get the change number , write following code, print change.getName() is “null”

how can i modify it, and print correct change number ?

 

========

public class Call_CopyFileDCN implements ICustomAction {

public ActionResult doAction(IAgileSession iAgileSession, INode iNode,
IDataObject iDataObject) {

IChange change = (IChange) iDataObject;

try {
// PLM

String v_number = change.getName()+” _is No.”;

} catch (IOException e) {

return new ActionResult(ActionResult.STRING,
“Exception IOException”);
} catch (APIException e) {

return new ActionResult(ActionResult.STRING,
“Exception APIException”);
}
return new ActionResult(ActionResult.STRING,
“Finished Java Call_CopyFileDCN.jar”);
}

Agile User Asked on September 23, 2021 in Agile PLM (v9).
Add Comment
1 Answer(s)

You may need something like this…

IEventInfo req = obj.getPXEventInfo();

IObjectEventInfo info=(IObjectEventInfo)req;
IDataObject changeObj = info.getDataObject();
IChange change=(IChange)changeObj;

Hope that helps,

Steve

Agile Professional Answered on October 4, 2021.
Add Comment

Your Answer

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