Unable to fetch Queue Item data using In_TransactionItem

Hi,

I am using REframework and GetTransactionData is set with appropriate Queue name as well. But still I am unable to fetch the queue Items.

What might be the problem?

Error Occurs in - in_TransactionItem.SpecificContent(“ArgInvoiceNumber”).ToString
Where - ArgInvoiceNumber is one of the output in Queue.

Thank You!

Hi @ReshmaBhaskar

can you please tell me how you are adding values to queue?
While adding values to Queue in Add Queue Item activity did you specified ArgInvoiceNumber as argument ?

Regards,
Vijay.

Hi @Vijay_Kumar_C

I created the Item Information but not as an argument. Is that the issue?

Can you confirm in Orchestrator that the fields are set in the queue item first to ensure there is something there as row.Item(“Invoice_Number”).ToString may be empty?

It might be good practice to check when you get anything from orchestrator if the String is empty or not first by using

String.IsNullOrWhiteSpace( in_TransactionItem.SpecificContent(“ArgInvoiceNumber”).ToString)

2 Likes

Hi @TimK

The Queue in Orchestrator is getting populated with required values.

Adding queue items is absolutely fine. But there is some loop hole in my script while Retrieving them back.

1 Like

Hi @ReshmaBhaskar

Looks like adding the value to the queue and retrieving code is fine. But I wonder whether you are passing the value to the process.xaml :slight_smile:

Check in your main.xaml where you invoke the process.xaml, in that invoke workflow activity, make sure the transactionItem is passed to process.xaml…

Let me know what you find…

and one more thing to check… I suppose you have the get Transaction Item activity in the GetTransactionData.xaml.

Make sure you are assigning the output of the get transaction item activity to out_Transactionitem argument.
Additionally, in the invoke workflow activity of the GetTransactionData.xaml, make sure the out_transactionItem argument is assigned to TransactionItem

Let me know whether it helps

3 Likes

Some quick ways to check where it falls over is add some logs throughout with what you are looking for and see where it falls over, it may be that arguments have not been passed correctly from workflow to workflow.

2 Likes

Hi @Lahiru.Fernando

Thanks for the response!

I have checked the transactionItem & it is passed to process.xaml as well. Attaching the screenshot for reference.

1 Like

Hi @ReshmaBhaskar,

Try going through the GetTransactionData.xaml and see if the logic to access an item from the queue (which is subsequently assigned to out_TransactionItem) holds proper.

It could be possible that your process is not retrieving the items from the queue properly. Because if it is ‘Nothing’ it would ‘End Process’, and since it is continuing to Process.xaml, it might be holding some data in the TransactionItem.

Try checking if the contents of ‘TransactionItem’, if your code to access an item from the queue is fine.

Let me know what you find…

Regards,
Abdullah

1 Like

Are you sure that there are no transactions in your queue where the ArgInvoiceNumber is not set? I would recommend using Log Message or Write Line to output the Transaction’s unique reference to the console and then manually check that the ArgInvoiceNumber is set after the error is thrown.

The way you are referencing the SpecificContent and adding it in ItemInformation when adding to the queue appears to be correct. The only two things that I can think of that could be wrong is the ItemInformation not being added for a specific item as described above, or the Transaction Item argument not being passed correctly through the framework.

1 Like

Hey @ReshmaBhaskar

The way you are adding to queue and retrieving methods are correct. Can you please hare the xaml file ?

Regards,
Vijay.

1 Like

Hey @ReshmaBhaskar

Can you please share GetTransactionData page. You should add Get Transaction Item activity to get the queue items.

attached a sample workflow.

Regards,
Vijay.

Hi @Vijay_Kumar_C

Thanks for your response. I am trying to debug the same.

I will get back with an update soon!

Thanks All!

The issue is resolved!

1 Like

Hi @ReshmaBhaskar

Glad that it helped to solve your issue.

Please mark this thread as solved by Checking the solution check box with the post which solved your issue.

Regards,
Vijay.

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