When using Set Transaction Item activity we can add data to output and analytics collections, entering key value pair in build editor.
I would love to have the options below
Expression Editor to add values to output using TransactionItem.Output itself without add key value indivudially
If TransactionItem.Output property already has values, the Set Transaction Status activity automatically set the output values without we need to add values in output field.
This way we can initialize the outputs fields after Get Transaction Item and populate it along entire processs. So when we are set the status, we dont need to add any key value pair (preserve Reframework Layout). We only need to initialize and add keys in Get Transaction Items, like
Yuuuuup, it was really dumb that the Output argument was set as a property (meaning you need to hard code the values) rather than an InArgument (meaning you can pass a dictionary to it).
This has been a glaring hole for a long long time and bizarre that it still exists when its been fixed in the create transaction activity which allows you to input the specificcontent either as a property or an inargument.
This would be such a simple fix, add a new InArgument called OutPut collection and let the user choose between hard coding or passing a dictionary.
For years I’ve avoided this by using the Orchestrator HTTP request activity and updating the Queue Item that way.
yesss, simple fix but it would help a lot.
Could you share your user case where you update the transaction item through api?
I take a look at Orchestrator API and I was able to update Transaction Item through it. But I’m wondering if is there a way to update specific content without need to postpone the transaction item.
I can add Steps as Keys “Step_1”, “Step_2”, “Step_3”, “Step_4” for processes that we need to save/create n record (like SAP transactions).
The Steps only execute if the Step_n key is empty or false. And after the Step finished, we going to Transaction Item and updated it.
So if we need to retry this transaction Item, only the steps that the robot doesn’t finished will be execute.
Or when the last step is send mail to business area and it fails because mail credential, for example. We can fix the credential issue and reprocess the item again, but this time it only send the mail without executes whole process.
Output Field is cleared when Transaction Item is reprocess (retried), so we can’t use it
Thats quite a different question that what this topic is related to, I personally approach situations such as the one you describe differently, but I do believe I saw a feedback topic sometime recently where they set it so you can indeed update the specific content on a running queueitem.
I know you can if you use the API to retry a queue item and its in a new status, not sure about in progress.
Not exactly what you asked for, but one way would be to use the transaction’s
Progress field instead of / in addition to the specific content. You can for example save a serialized dictionary to the Progress field and use it for your logic purpose.
Thanks for reply @efelantti
I’m already using this approach and works really well
Sounds like quite the hacky workaround if I may say so guys. There surely must be a better way?
Yeah, I think so.
It would very helpful if UiPath provide a better way to manage the progress within a Transaction Item (steps) that we can reprocess the Item for only specifc steps.
Update Transaction Item to add new keys or update the existent ones sounds like just what you said (hacky workaround). Using progress field either.
Anyone has a good approach for this?
If I look at the Queue Item API requests it indicates that you cannot update an In Progress Queue Item, which I think is quite logical, only being allowed to change New, Failed and Abandoned Queue Items.
In your scenario, if I understand correctly, would also not benefit from using the Progress field since I expect that to also be cleared when a queue item is retried.
Instead perhaps you could do something where the item specific content is updated once the queue item status is set to failed so that when the queue item is retried it is retried with the additional information?
Have you considered also separating your logic into separate queues to avoid queue item needing to be updated?
It worked like that some in some earlier versions, however it was updated some time ago so that the Progress is kept upon status changes.
Fair enough, it still just doesn’t sit right with me.
I’d personally lean more towards the way I mentioned where you add the progress to the specific content once the queue item is set to failed, adding a comment to the Queue Item too for good measure.