ensure resource idenity is stored with a CREATE command source when command is processed by platform. Allows ability to see all state changing commands accepted to date by platform for a given resource.
This commit is contained in:
+4
@@ -86,6 +86,10 @@ public class CommandSource extends AbstractPersistable<Long> {
|
||||
this.checkedOnDate = checkedOnDate.toDate();
|
||||
}
|
||||
|
||||
public void updateResourceId(final Long resourceId) {
|
||||
this.resourceId = resourceId;
|
||||
}
|
||||
|
||||
public Long resourceId() {
|
||||
return this.resourceId;
|
||||
}
|
||||
|
||||
+3
@@ -53,6 +53,7 @@ public class PortfolioCommandSourceWriteServiceImpl implements PortfolioCommandS
|
||||
try {
|
||||
resourceId = this.clientWritePlatformService.createClient(command);
|
||||
entity.markAsChecked(maker, asToday);
|
||||
entity.updateResourceId(resourceId);
|
||||
} catch (RollbackTransactionAsCommandIsNotApprovedByCheckerException e) {
|
||||
// swallow this rollback transaction by design
|
||||
}
|
||||
@@ -103,6 +104,8 @@ public class PortfolioCommandSourceWriteServiceImpl implements PortfolioCommandS
|
||||
}
|
||||
}
|
||||
|
||||
entity.updateResourceId(resourceId);
|
||||
|
||||
commandSourceRepository.save(entity);
|
||||
|
||||
return EntityIdentifier.makerChecker(resourceId, entity.getId());
|
||||
|
||||
Reference in New Issue
Block a user