Update Transaction Item while In Progress

Hi Everyone,

I think it would be a useful feature for UiPath to have the ability for the robotic solutions to update transaction items while they’re in progress.

Specifically, I thought of updating the SpecificContent section, as during processing, we would be able to store the data back into the queue. So if the data-gathering process fails, it could pick up the process from where it failed and go from there. There’d be no need for double processing. Updating the Progress is just a semi-solution for that.

I tried to build an HTTP request for Orchestrator to do the same (PUT /odata/QueueItems({key})), but the response was: Only New, Failed and Abandoned queue items are editable.

Thank you for the consideration in advance.

1 Like

Hi @Balint_Laszlo_Papp

Could you maybe share with us sample use cases that would become possible for you with such feature?

Hi @Balint_Laszlo_Papp,

We use the concept you are looking for in our REFramework performer. We achieve this by creating a state machine in the Process.xaml file and have used in production robots with great results.

This is possible with “Set Transaction Progress” activity, it will create a new key and value for each item in your queue when the item is processed by the performer.

@loginerror - Use case requested here is :
If a robot has finished 2 out of 3 steps in the Process but failed at the 3rd step, then we can update that particular item as for example, “Finished upto step 2”. Later when the item is retried, it will skip Step 1 and Step 2 as they were already performed in the previous run.

How to achieve this?

Overview

At transition from Stage 1 to Stage 2:
Here we do not provide any condition as it does take some time for the queue item to update the transaction progress. Simply, put robot on execution will poll orchestrator quite rapidly and if the transaction progress has not updated. You do not need to worry if you keep it empty.

At transition from Initialize to Stage 1 we know that the transaction progress will be a null string "" so we use that to check where *(which Stage/State) the intialize stage should transit to

At Transition from Initialize to either Stage 2 … Stage n

Finally the last stage transition to end the state machine

Here is a sample Process.xaml which you can use in the REFramewokr:
Process.xaml (22.3 KB)

You can deck it out as you like depending on your process.
Hope this helps you and others looking for a solution!

2 Likes

Hi @loginerror,

The use case @jeevith mentioned is similar what I would come up with. Although we have the option to update the Progress, we are not able to write back to the transaction item’s specific content the data what has been collected during previous processing.

I’ll give you an example: you’d like to collect data on specific loans’ counterparties (all debtors and all guarantors). You don’t know how many of them are in a specific deal, but you want to report them together, even though the underlying system is quite unstable. To save time upon system exception retries (it’s a lengthy process), you’d want to store the collected data to avoid dataloss and double-processing. This way, the process would recover to the stage where it has been disrupted and continue from there.

I’ve used queue items as temporary data stores many times with another tool, where this functionality is available, and I think it’d be really useful if UiPath would have it as well.

Hi @Balint_Laszlo_Papp,

I understand what you mean now. Thank you for clarifying the requirement.

In Blue Prism there is a possibility to attach new data to the item data after processing a certain stage.

I agree and will also vote for such a feature in UiPath

Current workaround:

Currently we save the data after performing a stage to a csv file and call it RuntimeData, but a way to directly update / create specific content key pairs would be a great feature.

@loginerror
May be there is already a way to do this but it’s not clear.

In the GUI (Orchestrator) an queue item data can be exported as json string and a new key value pair can be added in the exported json file. Further this file can be uploaded back to the queue item in question and the queue time will now have the new specific content key value pairs. So there must be a way to achieve the same programmatically during runtime.

How? Is the question and if not, please vote for this feature.

Fair point. I will invite @badita and @Remus_Rusanu who should know more about the logic behind the current design choices.

But right away, one thing about the

I think the way to approach it currently is to use the Data Service as an intermediary / complementary to the queues. This way you could have a unique point of reference combined with extra storage which you could then easily utilize to kick-start your process based on the completeness of each record.

indeed, it would be awesome to be able to communicate with the Orchestrator as you advance in the process.
You create an empty queue item before starting to process, and then update it as the process gathers information.

If the process fails, upon retry, you can continue exactly from the process failed. This way you do not lose time reprocessing what was initially processed.

Awesome idea, guys!

The below ability to set custom transaction progress could help in determining the transactions last status. Then using the Orchestrator native get-transaction to get the transaction progress would get you what you need. Have a similar need here and working on using these two solutions together.

Set Custom Transaction Process

Turns out you do not need to use the API interface for the progress status. This is native in get-transaction under the .progress element.

1 Like

Coming from BluePrism dev, it literally blows my mind that this is not already part of UIPath.

The ability to define a queue data schema and poll intermediary systems during processing to collect data to ready to ‘action’ at the end of the process was standard. The benefits of this was simply speed as items could be processed in batches. Assigning tags (item status) to queue items allowed me to process all items with a current status against one system, re-tag them and then process them against follow-on systems as required.

The workarounds for this seem clumsy

3 Likes

I wholeheartedly agree. Are there any plans to enable that feature?

This is available today.

The below ability to set custom transaction progress could help in determining the transactions last status. Then using the Orchestrator native get-transaction to get the transaction progress would get you what you need. Have a similar need here and working on using these two solutions together.

Set Custom Transaction Process

Turns out you do not need to use the API interface for the progress status. This is native in get-transaction under the .progress element.

The below ability to set custom transaction progress could help in determining the transactions last status. Then using the Orchestrator native get-transaction to get the transaction progress would get you what you need. Have a similar need here and working on using these two solutions together.

Set Custom Transaction Process

Turns out you do not need to use the API interface for the progress status. This is native in get-transaction under the .progress element.

Unfortunately, this is absolutely not what we need. We cannot update the data in the Transaction Item’s Specific Content with this.

Can’t you create a secondary queue or even add transactions to accomplish your need? Not sure you would want to change the specific content of a transaction as that would defeat the ability to retry etc.

If I have six phases where I’d want to save data, I’d need six queues. That’d be unsustainable. I’m sure I want to change the specific content of a transaction item. For retry, I can update the progress (as you pointed out as well) and check it when I get an item from the queue, then direct it to the right process stage based on that.

Let me tell you an example. Now I have batches of transactions that cannot be separated from each other to process. Could mean 2-7 items in a batch. Would be nice to at least track what my solution has done out of that. It even needs to pick up and store data based on these items, then report it back.

If I’d be able to write back to the specific content, I could store a json-converted data table to store line-by-line what the solution has processed so far. Was it midway through the second item? Almost completed the fifth one? What was that value at item 1 that I need for item 3? Now I have to start over from item 1? I cannot as item 1 is closed. Holy guacamole…

Simply out of curiosity: is it really so hard to develop an activity that could override a transaction item’s specific content by the robot that’s locked it, while the item is In Progress?

This is by design, or at least that’s my impression of it. This really is due to the auto retry and queue configuration to ensure retry structure of UiPath queues. In your scenario, my first impression is, if you don’t want different queues use one queue and add transactions once transaction 1 is completed it would add transaction 2 for instance etc. That way your process will be broken into 6 independent transactions and give you all the details you require. Also alow you to retry each component independently.

Hi @Robert_Schneider,

That would have unintended delays in processing queue items. If one has many stages, using a single queue and populating different items to queue (after completion of each stage) will delay processing as the queue items are handled first in first out (FIFO). Say the process did some processing in stage 1 and opened the browser and completed stage 1, it has to wait to process stage 2 until all items in the queue finish their first try of stage 1.

I am sure someone in UiPath has a good reason as to why this was designed so. The set process transaction status can be set but the value set cannot be retrieved in the same runtime as the item is already under processing (if using Reframework). There is no way to poll the current status of the in-process item for its transaction status after setting a transaction status!
The workaround I processed above with a State machine in the Process.xaml was just to add stages to the process using Set Transaction Progress activity, while @Balint_Laszlo_Papp is looking for adding keys and values to an queue item under processing.

As of now, there is no official way to update the queue item specific content under runtime and we can hope this thread gets attention and the request is evaluated further.

Understood. Just trying to help out and provide further possibilities. Another option would be to use storage buckets and update your data there, in a sense creating your own process tracking outside of the queue. This way you don’t encounter collision of interaction with an external tracking source. Secondly, I haven’t attempted to exceed the character limit of the transaction process state, however, I could imagine someone using that field and delimiters to accomplish this need.

Also, to your initial point. There are tools to accomplish this as well, postpone transaction or other long running workflow options to have transactions cascade in the order you choose (only execute after a transaction or task is completed) even the use of priority in your queue. Although not ideal, it is possible. I have yet to run into a scenario I could not solve and have yet to have the need to update a transaction in queue in the 200+ automations I have overseen. However, that doesn’t mean I won’t need it someday.

Also, If you’re setting your progress state in the queue, why would you need to retrieve it back in the same runtime, wouldn’t you already have that information in your workflow?

Finally, I’m assuming the reason these edits are not allowed in the transaction details is the transaction is designed as a contained execution and should contain all information to execute. Should the transaction ever require auditing you would not want the values to change or be able to change as it could create a scenario in which you lose visibility of what your automation completed or failed to complete. This scenario is really a solution challenge with the software.

Hi @Robert_Schneider,

That is what I like about this community and the platform. We can discuss such requests openly and UiPath can evaluate the request objectively. In addition to the new customer portal. Thank you for the idea sparing here.

We currently use a shared network drive to save a temporary CSV to which the output from different stages are populated (key,value), such that we can poll these as and when required in the rest of the process. This would also work when the item is being retried (by overwriting the previous values). Storage buckets are definetely an option for those who have upgraded to newer versions of UiPath Orchestrator. There may be however network delays as the reading of storage bucket file happens on the server/cloud and the client can only send the request to read / write with a payload.

Postponing transaction after processing a single stage or even making a new queue item with priority as high wont solve the performance issue. Going back to the example, as and when you finish Stage 1, assume it results in a key value pair, which needs to be used immidetely in the same browser window in Stage 2.

  • If we postpone or make a new queue item with high priority, we still have to navigate to the same application/webapp i.e., we have to login, navigate to the pre-conditions required by Stage 2.
  • This will mean that processing each item in the queue from Stage 1 to Stage X will take much longer as these steps (login, navigate to the pre-conditions) will need to repeated for every defined process stage.
  • This is because we can poll the current transacation progress of the item to ensure we are on the right progress stage, before performing any new manipulations / sequences. This ensures that there is a stage check before proceeding to the next stage not having to wait for the item to be retried and retrieve the progress. This is the current behaviour, we can update the progress string, but cannot use it immediately after the update.
  • In addition, the key value pair resulting from the previous stages, may be read directly from the transaction item instead of reading it from memory / CSV / Storage bucket and etc.

BluePrism executes this well, by giving the user the ability to update the transaction item. Every time you update the item, you have logs / timestamps / item data (specific content) to know where in the process did the update of item take place. So I dont think such a feature will make auditing challenging. On the contrary, we have access to the key value pairs and progress status and can check if the process did updated them after each defined stage (process specific).


My opinion

This feature to me is something which will support automations which have multiple stages each with interlinked variables and outputs. It will ensure a user does not have to maintain overview over multiple queues, when to update priority, when to postpone items, storage buckets, temporary statetfull files (csv), or state-machines.

A user can just poll the transaction item for both the current progress (predined stage) and also write back outputs from each stage to the same transaction item leading to a cleaner and simpler solution.

1 Like