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”);
}
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