The goal is the two identical documents enter workflow at the same time, same info. The only difference is the DocID. This will leverage the DocID to create a number that is different enough that I can use it to manipulate a time variable. Then apply that variable to the timer activity.
Example: For DOCID "10516" it will return "516*3" so "1548"
That document will then add 1548 seconds to the current time and wait. This allows workflow enough of a time difference to not treat them the same.
In my invoice workflows I have some logic that looks for duplicate invoices and marks them as such to take them out of workflow. This works really well except for one scenario.
I have a vendor that frequently sends me a packet with 100 or more invoices. About half of those invoices are duplicates of themself within the same packet. (we've asked them to stop but they are technically challenged and can't) The logic checks all invoice information, then checks to see if all of that info already exists but with a different DOC_ID. If it does, then its a duplicate. When these invoices hit workflow the duplicates show the exact same store timestamp down to the milliseconds. They go through workflow at the same rate and are both flagged as duplicates. The only difference is the Doc_ID and they are consecutive. If I could split the timing up for even a few seconds it could fix the check.
I had an idea to create a time delay that leveraged a variable. The variable could be right() populated with a Doc_ID that is multiplied by a number. So far all of my attempts to do anything with the Doc_ID have failed. I have tried the various data types and cannot get the arithmetic expression to validate. All I want is 'right(DW_DWDOCID,3)2' and for it to be numeric so I can use it with the time delay.
Does anyone have a suggestion? Am I completely doing this wrong? Thank you!