int actionTypeID = rq.getInt(Tag.ActionTypeID, 0);
if (actionTypeID != 1)
throw new DicomServiceException(Status.NoSuchActionType)
.setActionTypeID(actionTypeID);
Attributes rsp = Commands.mkNActionRSP(rq, Status.Success);
String callingAET = as.getCallingAET();
String calledAET = as.getCalledAET();
Connection remoteConnection = getRemoteConnection(callingAET);
if (remoteConnection == null)
throw new DicomServiceException(Status.ProcessingFailure,
"Unknown Calling AET: " + callingAET);
Attributes eventInfo =
calculateStorageCommitmentResult(calledAET, actionInfo);
try {
as.writeDimseRSP(pc, rsp, null);
device.execute(new SendStgCmtResult(as, eventInfo,
stgCmtOnSameAssoc, remoteConnection));