How to get the postpone time for an transaction Item

I need to get postpone time for an transaction Item .If the postpone time is less than current time i need to perform few other steps

You can use transaction.deferDate

Hello @tharaninatarajan1901

  1. Get Current Time:

    • Use the “Get Time” activity to store the current time in a variable (let’s call it current_time).
  2. Get Postpone Time:

    • Use your method to retrieve the postpone time and store it in a variable (let’s call it postpone_time).
  3. Compare Times and Take Actions:

    • Use an “If” activity with the condition postpone_time <= current_time.
      • In the “Then” section, perform the additional steps.
      • In the “Else” section, log or notify that the postpone time is in the future.

Thanks & Cheers!!!

Hi @tharaninatarajan1901

Try this:

Assign activity:
    PostponeTime (DateTime) = YourTransactionItemVariable.PostponeTimeField

Assign activity:
    CurrentTime (DateTime) = DateTime.Now

If activity:
    Condition: PostponeTime < CurrentTime
    Then:
        // Perform the additional steps here
        Log Message: "Postpone time is in the past. Performing additional steps."
    Else:
        Log Message: "Postpone time is in the future. No additional steps needed."

Hope it helps!!

Thanks but I am trying to add conversationID to my queue using dispatcher .Performer would pick that conversationID and start to process it .if there are any application issue would postpone that transaction to sysdate+1hour

Now when dispatcher runs again i get same conversationIDs(which are been postponed due to application issue) added to queue.

now to resolve this in dispatcher i want check to if the conversationID is already present inside the queue ,if yes i need to check postpone Time >current Time if yes then added to queue ,else not to add .

i cannot use unique refference to queue due to various other logics

I am trying to add conversationID to my queue using dispatcher .Performer would pick that conversationID and start to process it .if there are any application issue would postpone that transaction to sysdate+1hour

Now when dispatcher runs again i get same conversationIDs(which are been postponed due to application issue) added to queue.

now to resolve this in dispatcher i want check to if the conversationID is already present inside the queue ,if yes i need to check postpone Time >current Time if yes then added to queue ,else not to add .

i cannot use unique refference to queue due to various other logics

Hi @tharaninatarajan1901

  1. Read Data and Process Each Conversation ID:
  • Read data from your source (Excel, database, etc.) to get the conversation IDs.
  • Use a “Read Range” activity to read the data from your source (Excel).
  • Store the data in a DataTable variable.
  1. Check if Conversation ID Exists in Queue:
  • Use the “Get Transaction Item” activity to check if the conversation ID is already present in the queue.
  • Configure the activity with a suitable filter (e.g., filtering by conversation ID).
  • Store the output in a TransactionItem variable.
  1. Check Postpone Time and Add to Queue:
  • For each row in the DataTable:
    • Get the conversation ID and postpone time from the DataTable.
    • If the TransactionItem is null (conversation ID not found in queue) OR if the postpone time is greater than the current time:
      • Use the “Add Queue Item” activity to add the conversation ID to the queue with the appropriate postpone time.
      • Provide the necessary details such as reference, postpone time, and other relevant information.

This will help you sort that out.

Regards,

I believe here should be “Get Queue Items” instead. And the output should be of type IEnumerable<QueueItem>.