cancel
Showing results for 
Search instead for 
Did you mean: 

how to use ExecuteMatchingStrategyForNewRecordValuesCommand!!!

Former Member
0 Kudos

I use class ExecuteMatchingStrategyForNewRecordValuesCommand to execute a matching and use class RetrieveMatchedRecordsCommand to get the matching result, I have write

RetrieveMatchedRecordsCommand .setRecordId(new RecordId(RecordId.EMPTY_ID)); but i still can not get tht matching result ,when execute RetrieveMatchedRecordsCommand .execute() the progtam throw exception com.sap.mdm.internal.protocol.manual.ServerException: argument not legality!

who can tell me ,what i shuld do!

my code part:

1:execute matching strategy

ExecuteMatchingStrategyForNewRecordValuesCommand efvc = new ExecuteMatchingStrategyForNewRecordValuesCommand(repository.connPool);

efvc.setSession(repository.getNewSession());

efvc.setStrategyId(mObject.getMStrategyId());;

efvc.setSource(newRds);

efvc.setTarget(mObject.getSearchTarget());

efvc.execute();

sbTaskId.append(efvc.getMatchingTaskId());

log.debug(" MatchingTaskId:"+efvc.getMatchingTaskId());

MatcingObject mObjectMatching = new MatcingObject();

mObjectMatching.setMatchingTaskId(efvc.getMatchingTaskId());

2:get the matching results

RetrieveMatchedRecordsCommand rmrc;

rmrc = new RetrieveMatchedRecordsCommand(repository.connPool);

rmrc.setSession(repository.getNewSession());

rmrc.setResultDefinition(rd);

rmrc.setMatchingTaskId(mo.getMatchingTaskId());

rmrc.setRecordId(new RecordId(RecordId.EMPTY_ID));//EMPTY_ID = -1

rmrc.execute();

Edited by: xuhuanjun on Apr 9, 2009 5:11 AM

Edited by: xuhuanjun on Apr 9, 2009 5:14 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

i have knowed