Hi All,
iam facing problems while retrieving records assigned to a workflow, am able to get the Record Ids of a work flow. Now am trying to retrieve Records using RetrieveRecordsByIdCommand , am getting run time exception. Please check the code and suggest if any modification have to be made.
RetrieveRecordsByIdCommand retRecById= new RetrieveRecordsByIdCommand(connPool);
retRecById.setSession(session);
retRecById.setIds(workId);
ResultDefinition resultDefinition = new ResultDefinition(tId);
retRecById.setResultDefinition(resultDefinition);
// retRecById.getResultDefinition();
RecordResultSet recResultSet = retRecById.getRecords();
try {
retRecById.execute();
System.out.println("SESSION Execute");
} catch (CommandException e) {
String errMsg = "Failed to authenticate the repository session!";
System.out.println("SESSION Not Execute");
throw new RuntimeException(errMsg);
}
// Run Time Expception //
java.lang.NullPointerException: Parameter 'lookupId' must not be null
at com.sap.mdm.valuetypes.LookupValue.<init>(Unknown Source)
at com.sap.mdm.data.commands.RetrieveRecordsByIdCommand.execute(Unknown Source)
at sap.mdm.GetWorkflows.main(GetWorkflows.java:177)
Exception in thread "main"
Pls provide Solution
Thanks
Praveen K