ADD item to the queue with failed status

Hi,

I need to upload a StoreID,card number and status into queue . If card number is empty then status will be "Card not present " if card number is present then status will be Card is present .

whenever the status is "Card not present "i need to add that item to queue with failed status.
Please help to resolve this

1 Like

Hello @tharani.natarajan

For Each Row in DataTable
If Card Number is empty
Set Status to “Card not present”
Else
Set Status to “Card is present”

Add item (StoreID, Card Number, Status) to Queue

End For

Thanks & Cheers!!!

I need to change the Orchestrator queue status to failed instead of new

1 Like

@tharani.natarajan

  1. Use an “HTTP Request” activity.
  2. Configure it to send a PUT request to the Orchestrator API with the item’s URL.
  3. Set the headers (Authorization and Content-Type).
  4. In the request content, specify {"Status": "Failed"}.
  5. Execute the activity to change the item’s status.

Hi

You can add queue item with ADD QUEUE ITEM activity with queue information and that will add as new queue item
Then use get transaction item and get the queue item which will change the status as in progress

Then use set transaction status activity to change the queue item status from in progress to failed

Hope this helps

Cheers @tharani.natarajan

Hi @tharani.natarajan

  1. Initialize dtData as a DataTable with columns: StoreID, card number, status
  2. Add data to dtData (StoreID, card number)
  3. For Each row In dtData
    If String.IsNullOrEmpty(row(“card number”).ToString) Then
    row(“status”) = “Card not present”
    Else
    row(“status”) = “Card is present”
  4. FilteredData = Filter DataTable (dtData) where status = “Card not present”
  5. For Each filteredRow In FilteredData
    Add Queue Item:
    - Content: filteredRow(“StoreID”).ToString, filteredRow(“card number”).ToString, filteredRow(“status”).ToString
    - Queue Name: YourQueueName
    - Status: Failed

There is no provision to set the status in Add to queue.

You will need to first add the item to queue. When processing it, check for your condition and if required, set the status to failed.

U r right add queue item will add item with new status
Try with these steps

@tharani.natarajan

@tharani.natarajan

You can follow the stesp using add transactionitem

  1. For loop for each row in datatable
  2. If activity card is empty
  3. On then side use add transaction item with required data and card not present and next use set transaction status and set to failed
  4. On else side card is present and use qdd transaction item accordingly…and next use set transaction status with success

Or on else if you just need to add then use add queue item only

Hope this helps

Cheers

Hope it’s clarified

Let us know for any further clarification

@tharani.natarajan

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.