on 03-28-2012 7:17 AM
Hello,
i wanted to use a standalone job for syndicating MDM records with specific port (MDM 7.1 SP08). I implemented the syndication as follows:
AddSyndicationRecordIdsCommand command = null;
try{
command = new AddSyndicationRecordIdsCommand(getMDMAccess().getUSC());
command.setSession(getMDMAccess().getSession());
command.setRemoteSystemId(getMDMAccess().getSchema().getRemoteSystemId(remoteSystemId));
command.setPortId(getMDMAccess().getSchema().getPortId(portId, remoteSystemId, portType));
command.setFilePrefix(filePrefix);
command.setRecordIds(recordIds);
// execute command
command.execute();
} catch (CommandException e){
throw new MDMOperationException("CommandException while syndicating port", e);
} catch (SessionException e) {
throw new MDMOperationException("SessionException while syndicating port", e);
} catch (ConnectionException e) {
throw new MDMOperationException("ConnectionException while syndicating port", e);
}
I already debugged everything so that I'm sure that all parameters are filled fine. The code snippet is also not throwing any exception. When I am in debugging mode and going slowly through the code everything is fine and the 4 selected record ids will be syndicated with port. On running without debugging (but also in eclipse) or as a stand alone java job, the syndication is executed succesfully, but MDM log is saying that no Record was marked (see message below).
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="MDM_Log.xsl"?>
<MDM_Log version="1.0" type="Export"
>
<Open ts-long="15:48:27 GMT, Tuesday, March 27, 2012" ts="2012/03/27 15:48:27.487 GMT" "host=example" compile-type="WIN64_RELEASE">
<Trace ts="2012/03/27 15:48:27.503 GMT" tid="2704" entry-no="246">Syndicating to port #83 (MDM_PRT_OUT), agency is #2 (RSY)</Trace>
<Trace ts="2012/03/27 15:48:27.534 GMT" tid="2704" entry-no="247">Syndication manager has successfully connected to a port.</Trace>
<Trace ts="2012/03/27 15:48:27.534 GMT" tid="2704" entry-no="248">Syndication manager has executed syndication query. 0 records found</Trace>
<Trace ts="2012/03/27 15:48:27.659 GMT" tid="2704" entry-no="249">Syndication manager has exported the data to a temp location.</Trace>
<Trace ts="2012/03/27 15:48:27.690 GMT" tid="2704" entry-no="250">Export succeeded.</Trace>
</Open>
</MDM_Log>
I also found out that this behaviour happens in debugging mode too, when I am going through faster (e.g. running through after one breakpoint). Did anyone faced this issue too? What can be wrong with this? I am quite sure, that in this case the same 4 records are sent with AddSyndicationRecordIdsCommand as before.
Best regards,
Alexander
Problem is solved.
The syndication needs more time to create the syndication file. I implemented a wait job in dependency to number of records. Minimum wait time is 5 seconds.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.