What is the difference between datetime.Now.AddMinutes(2) and 11/28/2018 00:02:00 in Postpone Transaction item activity?
When I use 11/28/2018 00:02:00 , the item status is set to in progress and it loops until the item gets processed.
When I use datetime.Now.AddMinutes(2), the item status is set to New and it is getting processed after 2 min.
11/28/2018 00:02:00 this will mean that on 28th id should have processed at midnight passed 2 minutes.
on the other hand datetime.Now.AddMinutes(2) means you want to process it after 2 mins.
Both will make it New as you have postponed it but since the other one may be an old date it is processing it as soon as it gets it.
still I am not clear with the difference. Can you please help me to understand the below process/approch?
11/28/2018 00:02:00 – the same item is iterating until it gets processed with the status in progress.
datetime.Now.AddMinutes(2) --it postpones the item, changes the status to New, picks the next item and process it.
I have 10 items in my queue and my requirement is I need to process the item when it is available.
11/28/2018 00:02:00-- this is working perfectly because it processes all the items.
datetime.Now.AddMinutes(2)–this postpones the item. For example,
it postponed last 3 items and processed first 7 items. when bot checks the queue for the next time none of the item is available at that particular time to process, so it quits and my 3 items are in new status without processed.
I have two processes. The first process adds the items in the queue and triggers the second process via API call. The second process, get the transaction item and process them.
I want everything to be automatic.
what is the pros in 11/28/2018 00:02:00? it fulfills my requirement.
why are you using a back date? it dosent make any sense using a date that is already passed.
Post pone is to set the processing time to a time when you want to process the item in a future date.
is this what you have in your orchestrator?
In orchestrator you can got to the queue and take a print screen of one queue item which you have postponed.
if 12/3/2018 00:02:00 is the value in the queue postpone. Then this is because you have only passe 00:02:00 so it will auto correct it and make it current date with 00:02:00 which is why 12/3/2018 00:02:00
so its set the item to be processed any time after 2 min passed midnight without any deadline.
So when you run your workflow again it will pick the value and process it.
Whats your actual requirement can you tell so that we can work to achieve that?
My requirement is,
First process is to add values to queue.
Second process is, process the items (when it is available in third party application).
As per your suggestion, every time I keep eye on the queue(Trigger second process via API at the end of second process/finally block) to process all the items with New status with datetime.Now.AddMinutes(2),
I did not make much of the second line.
You have added all the values to the queue.
How do you process the items based on availability of 3rd party app? Does your process run when a 3rd party app execute and then you pick the items and process?
This is what i am making of it:
You push the items to queue in try, and process them in finally?
If i have a queue with 100 items and i will postpone some of them by 1 day, what happen on the next day if there will be some new items (without postpone) and postponed items? Which one robot would take first? New item or posponed item (assuming that time of postpone have passed)?
See docs on Processing Order - queue items with no deadline are grouped by priority and then handled FIFO. The items with a Postpone date would have been in the queue for longer than the new items with the same priority, therefore will be processed first, unless higher priority items exist.