Hi, @haowen.xie When you get “Object reference not set to an instance of an object” after passing a QueueItem between workflows, it usually means the QueueItem reference was lost. Make sure to pass the QueueItem variable as an In/Out argument in your workflow, not just In. This keeps the object reference alive and should prevent that error.
Add breakpoint before invoking sub workflow and check the value being passed to the workflow going to set status. Also check the same before set transaction status activity is any value reached till that’s step or not.
Actually I tested many times and used breakpoint to check the value status.
If debug takes less time, there is no such error, if debug takes more time, there is the error.
I wondered is this a solution bug?
Hi, arjun
thank you for your reply.
Yes I checked the In/Output variables.
I get the QueueItem in main workflow and pass queueitem type variable to subflow.
I only reference to the queueitem unique values in subflow.
I also put breakpoint to check the value before change queueitem status, the value is not null.
after I tested a lot, I found in debug mode, if I checked slowly between get transaction activity and change transaction status activity, the error came out.
If I did debug fast, everything succeed.