I would need a way to move a document into a folder based on the folder's entry ID instead of the folder's path but I don't know how to do it, if that is even possible...
My workflow:
- I have multiple Form processes used by students to submit documents, they can submit multiple documents at the same time
- Each document triggers a workflow that tries to move the document into the correct Student folder, based on the Student ID that we got from each document.
- The workflow searches in the repository for the Student folder, if it exists it moves the document into the Student folder (the location of this folder does not matter in this case), if not it creates the student folder into a central location in the repository (Repository\Student Management\FileRoom)
- Depending on the type of document, this Student folder can be automatically moved into a different location for review (Repository\Student Management\FileRoom\Review)
Now the issue:
- When my first document is received, my workflow searched for the Student folder, found it in Repository\Student Management\FileRoom and moved the document into this Student folder based on the location of my folder. Then, because of the document type, my Student folder has been moved into Repository\Student Management\FileRoom\Review.
- Almost at the same time, another document for the same student is submitted, my workflow searched for the Student folder, found it in Repository\Student Management\FileRoom. But by the time it really moved the document into the Student folder, my Student folder has been moved into Repository\Student Management\FileRoom\Review because of the previous document.
- Because the workflow for this second document expects a Student folder in Repository\Student Management\FileRoom but it is no longer there, it creates a new Student folder in Repository\Student Management\FileRoom and now I have 2 Student folders for the same student, in 2 different locations.
The "logical" thing that comes to my mind would be to get the entry ID of my Student folder and then move the document based onto this entry ID. This way, no matter where the Student folder moves, I could still move the document into the correct Student folder, because its entry ID will remain the same.
But I can't find a way to make that happens. The "Move" task can only define the location based on a path and not an entry ID, and I was not able to find another solution. I am open to any suggestion.
Meanwhile I set a "Delay" task in my workflow before I move the Student folder, so it gives more time to move all the incoming documents into the Student folder before the workflow moves it into the Review folder. It works but it is definitely not ideal...