You are viewing limited content. For full access, please sign in.

Question

Question

How to avoid saving files multiple times when you have a loop in the business process.

asked on September 1, 2022 Show version history

Hi Everyone, 

In our process, we have a loop ie Supervisor assigns task back to the initiator (with or without attachments) for further queries. At this stage the form and attachments are saved in the repository.

The initiator does not have access to the repository and hence the attachment along with details are available on the task form for the initiator to review. When initiator reviews the task and submits, the initial attachments submitted by the supervisor is getting saved twice in the repository. How do I prevent this?

After this first iteration, if the supervisor has additional queries and assigns task again to initiator , here the supervisor has to manaully remove the 1st attachment  in the file upload field and upload a new attachment. This is the same case for Initiator as well, when they are replying for the second time, they have to remove the previous attachment and upload the new one because we dont want the files getting saved another time.

By using collections I can keep track of the conversations in order, see attachment 1, however how do I avoid saving files multiple times. Kindly advise.

I have attached the process diagram. 

Attachment1.JPG
Attachment2.gif
Attachment1.JPG (135.99 KB)
Attachment2.gif (77.18 KB)
0 0

Replies

replied on September 1, 2022

Is there a reason you need to save the files before the process completes?

Looping back to the same task makes it very challenging because even if you could determine which files had already been saved, there's no way to tell Save to Repository to selectively save attachments.

The only way to do that would be to have a separate collection for each set of new uploads or to remove the previously-saved uploads from the collection.

 

0 0
replied on September 2, 2022

Yes, we use this loop as a form of email communciation btw the initiator and supervisor and hence we need to save each task and attachments uploaded. however, this process design is saving duplicates and taking up space. The main purpose of this is -we need to reduce the use of emails and utilise laserfiche so that all the communication regaridng a particular request is in that folder. Is there a better way we can create the process design which could help us achieve this. 

Kindly advise

Thank you.

0 0
replied on September 2, 2022

I'm still not clear on the reason why you need to save the documents to the repository before the process completes.

Is the supervisor looking in the repository to see the documents, or is everyone looking at the attachments on the form?

Basically, what is the reason they need to be saved into the repository at that point if the back-and-forth communication seems to be handled via the Forms user tasks?

Unless there's some reason to save them earlier, it would make a lot more sense to save the form/attachments after it has been "approved" and can't go back into the loop.

 

It's hard to provide an alternative without knowing more about the process, but if you loop back to the same activities like that, then there's no way to prevent duplicates without getting a more complex Workflow involved.

0 0
replied on September 2, 2022

We need to save the form & attachments (if any) because we need to keep track of what information was asked to the initiator and if any attachment was sent to them.

Similarly, when the initiator replies with comments and attachments, we need to keep a record of them.

Yes, this folder is viewed by other supervisors and designers, In this process after the supervisor completes the task, the next stage of the task is sent to the designer, here the designer will view all communications and then proceed to finish the project. 

Here the designer also has option to communicate with initiator if there are still missing information or they need to show the initiator some layouts for approval, this loop also creates more duplicates.

Is there a better process design to overcome saving the duplicates and achieving this back and forth communication and attachments getting saved just once.

Thank you

0 0
replied on September 2, 2022 Show version history

The process is going to save all form attachments, including duplicates, every time so I'm not sure there's a clean way to accomplish that goal.

You might be able to do it by bringing Workflow into the mix, but that's going to get very complex because you're keeping everything in one collection.

Best I can think of off the top of my head is the following:

  1. Save the form, but not the attachments in Save to Repository
  2. Make sure the folder has a uniquely identifiable folder name, or metadata with the forms bp instance id (i.e., some way you can identify the path within a workflow)
  3. Add a read only field (set to always hidden and save the value) to the collection (call it File Saved or something like that)
  4. Trigger a workflow that runs after the user task
  5. In the workflow properties check "Started by LF Forms"
  6. Add a Retrieve Business Process Variables activity
  7. Retrieve the Collection
  8. Add an Assign Token Values activity and create a new token with the multivalue box checked
  9. Add a For Each Row activity referencing the collection
  10. In the For Each Row loop, add a condition for if the current row's "File Saved" variable is blank
    1. Inside the condition add a for each File loop
    2. In the for each file loop add a create entry activity to create a document
    3. Add an attach electronic document activity referencing the File from the current iteration of the for each file loop
  11. Outside the condition, but still in the For Each Row loop, add another Assign Token Values activity set to Modify your multivalue token by Appending "Yes" or some other value to the token
  12. Outside the loop at the very end of the workflow, add a Set Business Process Variables activity that sets the "File Saved" column/variable of the collection equal to your multivalue token (i.e., indicating that every file in the collection has been saved)

 

0 0
replied on September 2, 2022

I have started to create this workflow, but I see that retrieve and set business process variable is not available in cloud. Is there a workaround for these activities.

0 0
replied on September 2, 2022

Does cloud version have " for each file " activity? or should I rename for each entry to each file? Kindly advise

0 0
replied on September 2, 2022

Hi Pallavi,

I'm not familiar with the specifics of Cloud since I've only worked with self-hosted systems. I've added the Cloud topic tag to your post, so hopefully someone can help point you in the right direction for the equivalent functionality.

0 0
replied on September 2, 2022

Thank you Jason, I hope I find the answers.

0 0
replied on September 2, 2022

The attachments will remain with the form as it 'travels' through the process so there's no reason to save them to the repository until things are final. Everyone will be able to reference and view the attachments as the form goes through the business process.

0 0
replied on September 2, 2022

 

  1. Well, the issue with our process is that a single task refers to a single project and this task is assigned to one individual. so only this individual has this task and can view the action history. when others want to view this project, they view the repository for form details and attachments. 
  2. In our team, everyone does not have access to process automation to find the task if it’s assigned to the initiator. The designer/supervisor who assigned the task might know but if someone else needs to view they won’t be able to because they do not have that task in their task list nor have access process automation to find the task.
0 0
replied on September 5, 2022 Show version history

Hi Pallavi,

     You can consider start tracking versions for documents so the files with same names will not be saved as individual files. 

     

  For Process Automation in cloud, there is no retrieve and set business process variable activities in Workflow, instead, you can use the input and output parameters to control which variable values to retrieve and set, please refer to https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#../Subsystems/ProcessAutomation/Content/Forms-Current/Service-Tasks.htm#WorkflowServiceTasks for more information. But currently, it is not support to pass the files for file upload variable using input parameters to Workflow yet. 

  We do have plan to enhance the save to repository behaviors for both self-hosted and cloud to avoid saving same files for multiple times and we will take your case into consideration when design. 

0 0
replied on January 4, 2023

Hi Xiuhong

I still havent come across a solution for the above query, however instead of using collections on the forms I have used table but am still stuck because the files are getting saved twice.

I have posted a new question "Laserfiche Cloud - New Designer Form - how to remove/hide a field from a table when you add a new row?

Kindly check and advise if there is solution for this.

Thank you

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.