Queue Processor locking issue

Hi All,

I have a queue processor rule called in an activity using the Queue-for-Processing method. I am getting records using Obj-Browse and on each pxResults I am calling this queue processing step. To avoid an Obj-Open call on each record (as we have thousands of records to process every day) I am just trying to use the same pxResults page with a key property for queue processing. But Pega is throwing an error that the page has empty pzInskey property like below,

Enqueue to queue processor NotifyEligibilityAlert failed : The clipboard page passed to enqueue should have non empty pzInsKey when locking is enabled.

I am using the “Key defined on Property” option for locking the pxResults page with a unique property. As this is an external table which has no pzInsKey why Pega is asking for pzInsKey property? When I use Obj-Open with “Primary Page” option in the Queue-For-Processing method it’s working fine because we are getting pzInsKey property on the page. Could some one please help me? We are using Pega version 8.2.2.

Thanks in advance.

@DurgaPrasadBali

Try fetching the results using D page(as per needed refresh strategy) with report definition as a source .

In report definition there is an option to fetch the key as well.

You can iterate the D page and call Queue-for-Processing method accordingly .Snapshot which gets saved will hold the pzInskey as well.

Let me know if any details are needed.

@DurgaPrasadBali

Can you try by unchecking Allow Locking on the class and queue using Key defined on property option and specify a custom property. If that doesn’t work try queuing entire snapshot of the page so that it wont re-open the instance again with option as None.

@ArshadPashaMohammedThank you for your quick reply. I will try this.

@KotaC382 Thank you for your quick reply. Yes, I tried with checking and unchecking Allow Locking option on class but it didn’t work. I didn’t try with None option but are we sure nodes won’t pick unlocked records and duplicate the processing? Needto check this one but in that case what is the advantage of locking while we queue?

@DurgaPrasadBali Generally we use locking if we want to re-open the record from the DB table instead of processing with the current snapshot page that is available to the Queue Processor while queuing. Which means it will re-open the instance from the DB table based on the primary key or pzInsKey and will execute on the latest information that is retrieved from the DB. Locking might work differently in Queue Processors compared to agents.

Following might be useful:

@KotaC382 Thank you very much for your prompt reply. I got it now and looks like this works for me. I will try this and see how it works for my scenario.

@DurgaPrasadBali Can you share the configuration steps to resolve the issue?

@VenkateshR6824 On the page you want to queue call the method Queue-For-Processing and use the below configuration,

Typeof queue : Standard or Dedicated

Queue Processor : give your queue processor name

Lock using : None

under Advanced select the check box Write now if you want the item to be processed immediately.

I didn’t enable the Queue current snapshot of page option but you can try it.

Hope this helps you. Thank you.