Verified Commit b79544ed authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Add unitIdentifier in the archive restitution request message

parent 88a2fac3
......@@ -167,6 +167,11 @@ class ArchiveRestitution extends abstractMessage
$message->recipientOrgRegNumber = $replyMessage->recipientOrgRegNumber;
$this->readOrgs($message); // read org names, addresses, communications, contacts
$message->unitIdentifier = $requestMessage->unitIdentifier;
foreach ($message->unitIdentifier as $unitIdentifier) {
$unitIdentifier->messageId = $message->messageId;
}
if ($replyMessage->replyCode == "000" || $replyMessage->replyCode == "001") {
foreach ($archives as $archive) {
$archive->lifeCycleEvent = $this->lifeCycleJournalController->getObjectEvents($archive->archiveId, 'recordsManagement/archive');
......
......@@ -273,6 +273,7 @@ class ArchiveRestitutionRequest extends abstractMessage
$this->changeStatus($messageId, "accepted");
$message = $this->sdoFactory->read('medona/message', array('messageId' => $messageId));
$message->unitIdentifier = $this->sdoFactory->readChildren('medona/unitIdentifier', $message);
$this->lifeCycleJournalController->logEvent(
'medona/acceptance',
......@@ -283,7 +284,7 @@ class ArchiveRestitutionRequest extends abstractMessage
);
$archiveRestitutionRequestReplyController = \laabs::newController('medona/ArchiveRestitutionRequestReply');
$replyMessage = $archiveRestitutionRequestReplyController->send($messageId, "000");
$replyMessage = $archiveRestitutionRequestReplyController->send($message, "000");
return $replyMessage;
}
......
......@@ -70,6 +70,9 @@ class ArchiveRestitutionRequestReply extends abstractMessage
$message->replyCode = $replyCode;
$message->unitIdentifier = $requestMessage->unitIdentifier;
foreach ($message->unitIdentifier as $unitIdentifier) {
$unitIdentifier->messageId = $message->messageId;
}
try {
mkdir($this->messageDirectory.DIRECTORY_SEPARATOR.(string) $message->messageId, 0777, true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment