Posted: 31 Jan 2019 2:53 EST Last activity: 17 Feb 2021 10:12 EST
Manually do Re-Indexing of Work class after case creation from an Activity
Hi Pega Experts,
I want to do re-indexing of the work class after case creation. Right now its taking maximum 20-25 seconds to appear my recently created case in search results. The requirement is to re-index the case class so that my recent case should appear within 10 seconds in the search results.
Solutions I tried
1) Declare Trigger
I tried to call the activity which gets called from Re-Index button on Pega's Search landing page. But it did not work because from the tracer I came to know that Pega stores the indexing part in table after declare trigger.
2) Calling Activity from HTML using JS
I called the same activity mentioned in 1 from HTML Section and added that Section in Review harness. Activity is appearing in tracer if I refresh the harness but still its not helping.
Please give your Ideas to complete the requirement.
***Edited by Moderator: Pallavi to update platform capability tags***
Out of curiosity, what is the business requirement that is leading you to want to be able to search for a work object 10 seconds after it's created? There may be another solution that is more straight forward.
We are performing some automations on Pega. It involves case creation, opening the case through search control and validate the fields present on the screen. These action are in a sequence. As sometimes search results take time to load, the sequence fails. So, we thought of putting wait in the search step and we don't want to put much wait time.
Hence, we need search results to be loaded within 10 seconds.
Rather than searching, can you just open the work object if the ID is known to the automation process? Or if the ID is not known, perhaps the work object can be placed in a worklist/workbasket and the automation can work through what is in that?
We already applied that alternative. But the most easiest and preferred way to open the case is, use the search control. The alternative solution will require more time to build the automation steps. That is why we wanted the solution around search results.
As long as you have a solution that works for you, all is good. It just seemed like performing a search was introducing complexity and delay where it wasn't required. Searching requires that you send a query and wait for results, whereas if if the ID was passed or if the work was placed in a queue, there would be no delay.