Hi All,
I need to fetch the postponed time from the below ss:
Please help me on this
I need to get 2/16/2025, 3:14:39 PM and so on
You can use Get Queue items or Orchestrator API for this.
With API use this end point
/odata/QueueItems
The “Get Queue Items” activity has a limitation of fetching up to 100 transaction items, and you can apply filters within this activity.
If you expect the number of transaction items to exceed 100, it is recommended to use the API to retrieve them. This allows you to apply filters, including those based on the postpone date.
get queue item will get all items
and from those you can get the postponed time for each item as needed
cheers
Hello,
You can achieve this by using the Orchestrator HTTP Request activity. I have attached a workflow that implements the solution. Below is an overview of the steps and how the workflow is structured to accomplish the task:
FetchPostponeTime.zip (99.0 KB)
odata/QueueDefinitions).QueueDefinitionResponse.QueueDefinitionResponse) into a jsonObject variable (type JObject).QueueNameDictionary is initialized as an empty dictionary.jsonObject("value"), which is a list of queue definitions.queueName and queueId are extracted from the current JSON token (currentJToken) by looking for the “Name” and “Id” properties.queueName is used as the key, and queueId as the value to populate the QueueNameDictionary. Should look like this:For Each jsonObject("value")
Assign - queueName = currentJToken.Children(Of JProperty)().FirstOrDefault(Function(prop) prop.Name = "Name").Value.ToString()
Assign - queueId = currentJToken.Children(Of JProperty)().FirstOrDefault(Function(prop) prop.Name = "Id").Value.ToString()
Assign - dict_QueueNames(queueName) = queueId
odata/QueueItems) to fetch queue items, with the response stored in OrchestratorHttpRequestResponse.OrchestratorHttpRequestResponse is then deserialized into a jsonObject variable.PostPoneTransactionsListTuple is initialized as an empty list to store postponed transaction data.QueueDefinitionId in each item should match the value from QueueNameDictionary for a given in_QueueName.DeferDate should not be empty.Reference and DeferDate properties of each matching item, which is added to the PostPoneTransactionsListTuple. This is done with the following:Declare the PostPoneTransactionsListTuple variable:
Assign - PostPoneTransactionsListTuple = New List(Of Tuple(Of String, String))()
Fill PostPoneTransactionsListTuple with the filtered information:
Assign - PostPoneTransactionsListTuple = jsonObject("value").Where(Function(item) item.Children(Of JProperty)().Any(Function(prop) prop.Name = "QueueDefinitionId" AndAlso prop.Value.ToString() = dict_QueueNames(in_QueueName)) AndAlso item.Children(Of JProperty)().Any(Function(prop) prop.Name = "DeferDate" AndAlso Not String.IsNullOrEmpty(prop.Value.ToString()))).Select(Function(item) Tuple.Create(item.Children(Of JProperty)().FirstOrDefault(Function(prop) prop.Name = "Reference").Value.ToString(), item.Children(Of JProperty)().FirstOrDefault(Function(prop) prop.Name = "DeferDate").Value.ToString())).ToList()
How to Obtain the Property Names from a jsonObject:
jsonObject("value"). This is done using a For Each loop, where each element in the array is a JToken.currentJToken (an individual item in the JSON array), a second For Each loop is used to iterate over its properties (JProperty). The Children(Of JProperty)() method is used to fetch all properties of the JToken. It should look something like this:For Each jobject("value")
For Each currentJToken.Children(Of JProperty)().ToList
Log = currentJProperty
LogMessage activity is used to log each property (currentJProperty). This will display the property names and values in the logs.currentJProperty (which represents a key-value pair in the JSON object). This allows you to see all the available properties of the jsonObject in the workflow.