fix(appointment): keep source inspection in work transaction
This commit is contained in:
+4
@@ -40,6 +40,10 @@ public class AppointmentCargoVerificationService {
|
||||
|
||||
@Transactional(readOnly=true)
|
||||
public Context get(String sourceKey,String customerId,String destinationKey) {
|
||||
return inspect(sourceKey,customerId,destinationKey);
|
||||
}
|
||||
/** Caller-owned transaction: a handled read prerequisite must not mark the whole work scan rollback-only. */
|
||||
public Context inspect(String sourceKey,String customerId,String destinationKey) {
|
||||
var source=sources.resolve(sourceKey,customerId,destinationKey);
|
||||
return inspect(source);
|
||||
}
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class AppointmentWorkDeliveryProvider implements AppointmentWorkFactGatew
|
||||
else {
|
||||
for(var source:request.sources()) {
|
||||
try {
|
||||
var context=cargo.get(source.sourceKey(),source.customerId(),source.destinationKey());
|
||||
var context=cargo.inspect(source.sourceKey(),source.customerId(),source.destinationKey());
|
||||
fingerprints.add(context.toString()); blocks.addAll(context.blockReasons());
|
||||
} catch(org.springframework.web.server.ResponseStatusException error) {
|
||||
if(!AppointmentWorkSourceAvailability.unresolved(error)) throw error;
|
||||
|
||||
Reference in New Issue
Block a user