The given key was not present in the dictionary in process transaction successful

Dispatcher > Different UiPath Studio

I add item to the queue

I create variable in main section (Arguments)

image

image

END PROCESS


Error, Where am I making mistakes?

Edit: I can get the first two items. I just can’t print the output.

1 Like

Do you mean the loop works for 2 iterations but not for all? Do you add the output also for failed items?

To avoid the exception you could add an If statement with condition currentItem.Output.ContainsKey("Output Message Done")

1 Like

@Mesut_Can

Do you have filter of only successful items in the get queue items…because for failed items output values wont be present

Cheers

It’s possible for newer versions

Setting the Output property for failed transactions is only possible when connected to a 2022.10 and newer versions of Orchestrator.

The Set Transaction Status activity now has both Output and Analytics data present in Orchestrator even when the status of the item is Failed.

2 Likes

Thanks for your reply but it showed all the results in the queue. The result is unsuccessful.

1 Like

Thank you for your reply, but I have marked it before. The result is unfortunately unsuccessful.

image

1 Like

It shouldn’t throw the exception if you added the If as I suggested.

I noticed you mention the Orchestrator folder path in Get Queue Items activity. Can you check if it’s what you expect it to be? Btw, if you use an empty value it would use the folder from which you are running, which I believe is in most cases what is desired.

1 Like

@Mesut_Can

are there some test queue items or items which you added previously for which this field is not present?

cheers

1 Like

The points you mentioned are correct.

image

image

1 Like

No test queue :frowning:

I can’t find a solution

@Mesut_Can

Can you check from the locals panel pelase…if you are getting correct queue item…

Open locals pnel and currentitem

Cheers

1 Like

I did everything you said right.

1 Like

Hi @Mesut_Can ,

Have you tried performing it in Debug Mode with a Complete new Queue (Delete and Recreate Queue and Add Items) ? This should give us a direction on the error that’s occurring.

With Debug Mode and new Queue Items, if the Activity gets an Error, we can then simply check the currentItem value in Immediate Panel. We will be able to understand to what Queue Item it belongs to and if the necessary Output data is present in it.

2 Likes

Try adding a null check to the If’s condition:
currentItem.Output IsNot Nothing AndAlso currentItem.Output.ContainsKey("Output Message Done")

2 Likes

I solved the problem very simply. I moved the Build data table activity up and it did not give an error.

image

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