Am not able to figure out what would be the expression in the Flow Decision activity to process further if there is no Item left in the Queue



Hi all,

As mentioned in the title am using a Flow Decision activity right after the Get Transaction Item activity to check if a Queue item is available for processing.
“transItem” is the output variable(of Type QueueItem) of Get Transaction Item activity.
Please find the screenshot below

The expression transItem.Itemkey.ToString<>"" works fine when there are items in the Queue , but when we come to the last stage (i.e when all the Items in the Queue are processed and there is no Item left in the Queue) am getting the following Exception

Source: VisualBasicValue

Message: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value(not initialised).

ExceptionType: NullReferenceException

which says that when there is a null value in “transItem” variable we cant use the .ItemKey or .ToString functions.
Other than Using Exception Handling can we write any expression in the Flow Decision to process when there is no Item left in the Queue?

Encountering "Object refernce not set to an instance of an object" error while trying to get data from queue using "Get Transaction Item"
transItem Is Nothing

Should work. Same way for checking other types that can be null.


Its working fine Andrzej
Thank You