Skip to main content

External Journal S3 Attachments

Name: ExternalJournalS3Attachments

Agrega o elimina el fichero/enlace de algún documento existente a un Lote creado/enviado.

Parametros

NAMEFORMATODESCRIPTIONEXAMPLE
ExternalSystemEnteroCodigo del sistema externo en donde está el journal.1

S3 Adjuntos

NAMEFORMATODESCRIPTIONEXAMPLE
ExternalJournalS3Attachment - Journal

      <ExternalJournalS3Attachment>
  <Journal>
      <Code>1</Code>
      <PeriodYear>2024</PeriodYear>
      <PeriodMonth>02</PeriodMonth>
      <TypeCode>IN</TypeCode>
  </Journal>
  <JournalGuid>8596cd06-a1d8-405d-88f7-a2efd0a67777</JournalGuid>
</ExternalJournalS3Attachment>
      

Esta seccion define el journal, existen dos opciones: Enviar datos del Journal O Enviar JournalGuid

ExternalJournalS3Attachment - Commands

     <Commands>
  <Command>
      <Action>append</Action>
      <S3Attachments>
          ...
      </S3Attachments>
  </Command>
  <Command>
      <Action>delete</Action>
      <S3Attachments>
          ...
      </S3Attachments>
  </Command>
  <Command>
      <Action>delete-all</Action>
  </Command>
</Commands>
      

Se puede enviar mas de un command, tanto para Journal y JournalItem. Para el comando que contenga la accion delete-all no es necesario enviar el nombre del archivo, solamente la accion, eso indica que borrara todos los attachments del journal o journalItem.

ExternalJournalS3Attachment – Commands - S3Attachments

     <S3Attachments> 

 <Attachment> 

  <PathTarget>s3://bkt-sda-aans-dev/AANS/8112/1830973-JA.png 

  </PathTarget> 

 </Attachment> 

</S3Attachments>
      

Esta seccion define el adjunto para guardar o eliminar. El adjunto no puede estar congelado.

ExternalJournalS3Attachment - Items

    <Item> 

<JournalItem> 

<Code>1</Code> 

<CodeSequence>1</CodeSequence> 

</JournalItem> 

<JournalItemGuid>92823E55-B554-4C94-BEB2-7E171A1B719D 

</JournalItemGuid> 

<Commands> 

</Commands>			</Item> 
      

En la sección Item se puede enviar code y code sequence de los Journal Items O el JournalItemGuid

Request - Command append y Command delete


<AASIS>
<Context>
<AccountingEntity>8111</AccountingEntity>
<Certificate>47860A05-3ED5-4323-A4E9-59B5264941CA</Certificate>
</Context>
<Component>
<Name>ExternalJournalS3Attachments</Name>
</Component>
<Parameters>
<ExternalJournalS3AttachmentParams>
<ExternalSystem>1</ExternalSystem>
</ExternalJournalS3AttachmentParams>
</Parameters>
<Content>
<ExternalJournalS3Attachment>
<Journal>
<Code>1</Code>
<PeriodYear>2024</PeriodYear>
<PeriodMonth>05</PeriodMonth>
<TypeCode>RH</TypeCode>
</Journal>
<Commands>
<Command>
<Action>append</Action>
<S3Attachments>
<Attachment>
<PathTarget>s3://30500974016/AANS/8111/image1.jpg</PathTarget>
</Attachment>
</S3Attachments>
</Command>
</Commands>
<Items>
<Item>
<JournalItem>
<Code>1</Code>
<CodeSequence>1</CodeSequence>
</JournalItem>
<JournalItemGuid>18245CAC-C41B-42D5-8048-BC234BA7C035</JournalItemGuid>
<Commands>
<Command>
<Action>append</Action>
<S3Attachments>
<Attachment>
<PathTarget>s3://30500974016/AANS/8111/image1.jpg</PathTarget>
</Attachment>
<Attachment>
<PathTarget>s3://30500974016/AANS/8111/image2.jpg</PathTarget>
</Attachment>
</S3Attachments>
</Command>
</Commands>
</Item>
<Item>
<JournalItemGuid>005AB7F9-8103-4071-A3E2-F0771D932EEB</JournalItemGuid>
<Commands>
<Command>
<Action>delete</Action>
<S3Attachments>
<Attachment>
<PathTarget>s3://30500974016/AANS/8111/image3.jpg</PathTarget>
</Attachment>
</S3Attachments>
</Command>
</Commands>
</Item>
</Items>
</ExternalJournalS3Attachment>
</Content>
</AASIS>

Request - Command delete all


<AASIS>
<Context>
<AccountingEntity>8111</AccountingEntity>
<Certificate>47860A05-3ED5-4323-A4E9-59B5264941CA</Certificate>
</Context>
<Component>
<Name>ExternalJournalS3Attachments</Name>
</Component>
<Parameters>
<ExternalJournalS3AttachmentParams>
<ExternalSystem>1</ExternalSystem>
</ExternalJournalS3AttachmentParams>
</Parameters>
<Content>
<ExternalJournalS3Attachment>
<Journal>
<Code>1</Code>
<PeriodYear>2024</PeriodYear>
<PeriodMonth>05</PeriodMonth>
<TypeCode>RH</TypeCode>
</Journal>
<Commands>
<Command>
<Action>delete-all</Action>
</Command>
</Commands>
</ExternalJournalS3Attachment>
</Content>
</AASIS>

Response - Command append y Command delete


<Result>
<ExternalJournalS3AttachmentsResult>
<JournalS3Attachment xmlns="http://schemas.datacontract.org/2004/07/Sda.Aasi.Integration.Components.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Code>1</Code>
<Guid>74adbb6c-f726-445e-bcd9-04330419f53f</Guid>
<Period>5/2024</Period>
<S3Attachment>
<S3Attachment>
<Message>Guardado con éxito.</Message>
<PathTarget>s3://30500974016/AANS/8111/image1.jpg</PathTarget>
</S3Attachment>
</S3Attachment>
<TypeCode>RH</TypeCode>
</JournalS3Attachment>
<ArrayOfJournalItemS3Attachment xmlns="http://schemas.datacontract.org/2004/07/Sda.Aasi.Integration.Components.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<JournalItemS3Attachment>
<Code>1</Code>
<CodeSequence>1</CodeSequence>
<Guid>540F3FDE-1177-47A8-84E4-AE1C86B896FE</Guid>
<S3Attachment>
<S3Attachment>
<Message>Guardado con éxito.</Message>
<PathTarget>s3://30500974016/AANS/8111/image1.jpg</PathTarget>
</S3Attachment>
<S3Attachment>
<Message>Guardado con éxito.</Message>
<PathTarget>s3://30500974016/AANS/8111/image2.jpg g</PathTarget>
</S3Attachment>
</S3Attachment>
</JournalItemS3Attachment>
<JournalItemS3Attachment>
<Code>1</Code>
<CodeSequence>2</CodeSequence>
<Guid>005AB7F9-8103-4071-A3E2-F0771D932EEB</Guid>
<S3Attachment>
<S3Attachment>
<Message>Eliminado con éxito.</Message>
<PathTarget>s3://30500974016/AANS/8111/image3.jpg</PathTarget>
</S3Attachment>
</S3Attachment>
</JournalItemS3Attachment>
</ArrayOfJournalItemS3Attachment>
</ExternalJournalS3AttachmentsResult>
<Messages />
</Result>

Result - Command delete-all


<AASIS>
<Result>
<ExternalJournalS3AttachmentsResult>
<JournalS3Attachment
xmlns="http://schemas.datacontract.org/2004/07/Sda.Aasi.Integration.Components.Entities"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Code>1</Code>
<Guid>74adbb6c-f726-445e-bcd9-04330419f53f</Guid>
<Period>5/2024</Period>
<S3Attachment>
<S3Attachment>
<Message>Todos los archivos adjuntos fueron eliminados.</Message>
<PathTarget i:nil="true" />
</S3Attachment>
</S3Attachment>
<TypeCode>RH</TypeCode>
</JournalS3Attachment>
<ArrayOfJournalItemS3Attachment
xmlns="http://schemas.datacontract.org/2004/07/Sda.Aasi.Integration.Components.Entities"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
</ExternalJournalS3AttachmentsResult>
</Result>
<Messages />
</AASIS>

Observaciones

Si se envía algún dato erroneo el componente no devolvera ningún resultado. EL COMPONENTE SOLO ES PARA ARCHIVOS S3 POR ESO LLEVA EL NOMBRE S3.