Question
Cognizant
IN
Last activity: 10 Dec 2024 2:49 EST
Job Scheduler is not working properly even after enabling it.
I have created a job scheduler and activity to purge record older than 30 days from a data table. The activity uses a data page with report definition as its source to get the 30 days older records. Despite configuring the Job Scheduler, it's not executing the activity automatically. However, when I trigger the activity manually, it works fine( records older than 30 days were purged in Data table and sent email notification as expected).
How to get it executed by Job scheduler. Kindly suggest a solution.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 10 Dec 2024 2:49 EST
Tata Consultancy Services
IN
Hi @Sna05222
Kindly check the privileges for the API, and also, in the meantime,
Check the Access Group, Ruleset Version, Application Stack, and Ruleset Stack Version for this Job Scheduler and Activity.
I hope this willl help you
Thanks,
Ashok
Maantic
IN
Hello @Sna05222,
Please verify that the Access Group you have selected is having access to the Ruleset version of the activity or you can use the System Runtime Context and mention your application and version in it.
Thanks!
Cognizant
IN
@GitarthaD33 Yes, the access group have access to the Ruleset version of the activity and also I have mentioned my application and version in the System Runtime Context as well.
Cognizant
IN
@GitarthaD33 When I checked the Admin studio, there are some execution, that got failed due to RuleNotFoundException: Failed to find a 'RULE-OBJ-ACTIVITY' with the name 'Activity name' that applies to 'Class Name'. There were 1 rules with this name in the rulebase, but none matched this request. But both the rules Job Scheduler and Activity has been created in the same ruleset and in the same class... I could not find any mismatch in the ruleset or class. Kindly suggest the solution.
Updated: 9 Dec 2024 1:51 EST
Tata Consultancy Services
IN
Hi @Sna05222,
P;ease Check Siblings and Versions of the respective Rules
Could you please clear Rule Cache and Try ?
Try attempt revalidanting and saving and Please attempt this revalidation method through the reassembly.
API: Open Admin Studio -> Click Resources > APIs > System Management > Caches
Select the following POST API: /nodes/all/caches/vtable/rule_types/{pxobjclass}/instances/{pxinsid}/reassemble
Enter the rule's pxObjClass and pxInsID
For example - pzcaptureworkobjectsforautomaticcleanup pxObjClass: Rule-Declare-Trigger pxInsID: !PZCAPTUREWORKOBJECTSFORAUTOMATICCLEANUP (this is just an example, please use the data for the rule that you have in your environment)
Run the ‘Try it out’ button. A successful call should return 200 response code.
Please let me know even after running this, if you are still experiencing issues with Rule Cache.
Thanks,
Ashok
Cognizant
IN
Hi, I have revalidated and saved my activity rule. And also follow the steps to clear cache.. While executing it with exact class and rule name, I got response code 401.
{ "errors": [ { "ID": "invalid_authorization_header", "message": "Invalid Authentication Data." } ] }
In this case, what can we try clearing this rule cache and make the job schedulor to execute the job? Kindly help!!
Cognizant
IN
@GitarthaD33 When trying to clear the cache of the rule activity, I got this as the response.
Maantic
IN
Hello @Sna05222,
I meant the stack trace for this exception:RuleNotFoundException: Failed to find a 'RULE-OBJ-ACTIVITY' with the name 'Activity name' that applies to 'Class Name'. There were 1 rules with this name in the rulebase, but none matched this request
Accepted Solution
Updated: 10 Dec 2024 2:49 EST
Tata Consultancy Services
IN
Hi @Sna05222
Kindly check the privileges for the API, and also, in the meantime,
Check the Access Group, Ruleset Version, Application Stack, and Ruleset Stack Version for this Job Scheduler and Activity.
I hope this willl help you
Thanks,
Ashok
Cognizant
IN
Thanks for all the discussions and ideas. I have resolved the issue. The access group which I have mentioned in the Job scheduler is with lower application version. Since I have the activity rule created in the highest application version, it got failed. I have updated that and resolved it. Thanks for the support!!
Pegasystems Inc.
CA
I believe the threshold value is low, and your activity may take longer than the set threshold value. Please increase the threshold value.
Cognizant
IN
@RameshSangili No, threshold value is not lower than the activity execution.
When activity is triggered manually, it is working fine.. as it is purging records in the DB table and sending mail notification to the receivers.
How can we rectify the RuleNotFoundException for the activity rule which should be executed by Job Scheduler.