How to move multiple documents at once ?

Hello, everyone,

Quite new with Appian i' m struggling to move multiple documents at once.

I have a form where users can enter some details and update various documents. (first step of a longer process)

On submission of the form I have to :

  • Create one directory (which depends of the information entered in the form).
  • Upload all the documents in this particular directory.

I was thinking tu use smartservice on form submission but I can only use one in the saveinto.

I guess that I could use MNI or process looping in order to solve the issue but is there any better way to do this ?

Thanks for your help,

Nicolas

Parents
  • Hi Nicolas - 

    To be honest, I'm not aware of the rationale for how the move document smart service was designed.  However, I believe it's good practice to move 1 doc at a time.  This is because in the event of unexpected behavior, it should be perfectly clear which documents were moved (and which were not).  If the smart service could handle 1-n documents, and there was an error, it would likely be an unpleasant exercise to determine precisely which documents were moved successfully.

    Often times (not always) designs include DB writes associated with document moves. Again, by moving docs 1-at-a-time, you have very precise control over those writes, always keeping them in sync with the documents being moved. 
    Tying this point into the point made above, think about this scenario:
    You had to move 10 documents, and each doc requires a related db entry. 
    The document move is initiated and breaks for reasonX after n documents were moved. 
    The process never flowed into the write to data store task.  Some documents got moved, but none have their related db updates....

    Flipping this the other way, if you mni through a sub-process that flows through the move followed by the write, you'll get your db entries for all the successful moves...

Reply
  • Hi Nicolas - 

    To be honest, I'm not aware of the rationale for how the move document smart service was designed.  However, I believe it's good practice to move 1 doc at a time.  This is because in the event of unexpected behavior, it should be perfectly clear which documents were moved (and which were not).  If the smart service could handle 1-n documents, and there was an error, it would likely be an unpleasant exercise to determine precisely which documents were moved successfully.

    Often times (not always) designs include DB writes associated with document moves. Again, by moving docs 1-at-a-time, you have very precise control over those writes, always keeping them in sync with the documents being moved. 
    Tying this point into the point made above, think about this scenario:
    You had to move 10 documents, and each doc requires a related db entry. 
    The document move is initiated and breaks for reasonX after n documents were moved. 
    The process never flowed into the write to data store task.  Some documents got moved, but none have their related db updates....

    Flipping this the other way, if you mni through a sub-process that flows through the move followed by the write, you'll get your db entries for all the successful moves...

Children

 Discussion posts and replies are publicly visible