What is the best approach to set the transaction status in the Queue as Success after downloading the attachment from website

What is the best approach to set the transaction status in the Queue as Success after downloading the attachment from website?
The scenario is to login to website and create queue items for each application in the website DataTable. After creating queue items, download the attachment for each queue item(Application) one by one and after downloading attachment for all applications, change the status of the queue item to Success and if not downloaded don’t change the status.

If you know the name of the download file, you may want to check if the file exist on the folder before updating the queue status. :slight_smile:

ok but how to update the queue status ?
i am using set transaction status but i am getting error
“Set Transaction Status: Object reference not set to an instance of an object”

Check the transactionItem You are sending to set transaction status is containing any data.
I think you must have missed passing some arguments in Invoking any method.
Run the Process in Debug mode and check the Locals Panel for transactionItem

can you please check this and confirm that what i am missing

Is the data coming from transactionItem-Datatype-QueueItem If so then check the TransactionItem Before setting status by applying breakpoints

Still not able to fix

Hi @zeshanm9

Can I see the properties of set transaction status activity and also the data type of the variable you have used here under TransactionItem property…

Hi @zeshanm9

So I see that you have used a Add Queue Item. I suppose that’s the queueitem you are trying to change the status of right?

If that’s the case, I don’t see you adding the queue item to the queue in add queue item activity.

Here, there is no item added as to add to the queue.

So in this activity, you got to add the queue item for you to change the status later :slight_smile:
This is where you should add it

Let know whether this works for you…

ok thanks i add this but now where to put this value in “set transaction status” ?
because i am not able to access this value

Before that, could you tell me, from where are you getting the value for this argument

is it coming from the same queue you are trying to update the status of? or from a different queue?

No it is not coming from anywhere. i just create this to access in the process flow and assigning to in_Transaction in Main Process flow

so you can tell me this is correct or not or how to just change status of queue items after downloading the attachment to success


So for you to change the status, first you have to get the item from the queue using Get Transaction item activity. Then only you are able to change the status. I thought you are getting the transaction item from some other workflow and passing it here through the arguments. So, that’s the point where you should fix.

Your set transaction status activity is correct, but the problem you have there is, in_Transactionitem is not coming from a queue for it to set the status. The idea is, get the item from the queue, process it, and then change the status accordingly.

So have your get Transaction item activity where it is suitable, pass the transactionitem to this workflow through the argument you already have, and it will work fine :slight_smile:


@Lahiru.Fernando Thank you i follow what you said and it’s working now :slight_smile:

1 Like

@zeshanm9 Cool. Glad to hear its working. Could you also mark my answer as the solution too :slight_smile:

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