Hi there,
I have a situation where in Service Step 1 I retrieve 2 documents from a DMS and load them to Documents, in Human Task 1 I see the documents, download ONE of them, edit it and upload the document using the same file widget. I downloaded from. The name of the file has not changed.
How do I tell if I’ve uploaded the document, rather than, as with the other file, just left it alone?
The documentID is not a good contender for this as it changes step to step. Is there some other way to tell if a document has been uploaded or not?
In the above example, I want to store the new document back to the database as a new version in the Operations/Actions steps, but I don’t want to upload the one that has not changed. I need a flag to tell me I’ve uploaded a new file.
Many thanks and best regards
Seán
Closing the loop:
Submitted by florian.baillagou
It’s an heavy solution but you can use a CRC (link here). It gives you a value which is based on your fileContent.
Compute the CRC for the file on ENTER. Store the value returned by the computation in a workflow variable. On the FINISH, compute the CRC for the file, if it’s not the same, upload your document as new version, else do nothing.
Hope this solution is OK for you.
I think getVersion() method on your document is what you might want to use.
It’s an heavy solution but you can use a CRC (link here). It gives you a value which is based on your fileContent.
Compute the CRC for the file on ENTER. Store the value returned by the computation in a workflow variable. On the FINISH, compute the CRC for the file, if it’s not the same, upload your document as new version, else do nothing.
Hope this solution is OK for you.
Yeah, I thought that would be the answer, very heavy handed and not at all ideal.
The variables I have to add, the code I have to add/maintain, the execution of multiple CRC checks…
Is there anyway - in a next release or sometime soon that you could add a flag to say “Document Loaded From Form”, this way both a new or a reloaded same document are at least “marked” as being loaded.
thanks and regards
Seán
Thanks for setting this as an answer.
The flag you’re asking is a little bit confusing.