and more in a single search tool across platforms. Read the announcement here. |
03/12/2024 01:49 AM
Hi Team,
We are triggering certification on change in few attributes as part of the Mover/Transfer process.
Below is the Screenshot of User Update Rule:
Mover Rule is triggering for a user but when I run the Launch Certification from Rule Job, the JOB is completing with the Status as Failure.
Upon checking logs, we found below:
So, Now It can be because of our condition:
STR_TO_DATE(a.customproperty21, '%Y-%m-%d') <= DATE_FORMAT(curdate(), '%Y-%m-%d') AND DATEDIFF(curdate(), STR_TO_DATE(a.customproperty21, '%Y-%m-%d')) <= 15
How do we write the above condition which is also supported in HQL so that our JOB for Launching campaign is successful.
The JOB was successful before writing this two condition in the User Update RULE.
03/12/2024 02:04 AM
Hi @h_sapkota ,
I don't see any problem with the above condition. Can you share the detailed log along with the configurations done for "Launch Campaign" under the user update rule? Also, share the full query configured in the rule.
03/12/2024 03:38 AM
Hi @h_sapkota , I dont think it is the query as the rule has triggered. That was the job of query.
If the Launch cert job is failing it must be in campaign configs , something might be wrong there.
Thanks,
Amit
If this answers your query, Please ACCEPT SOLUTION and give KUDOS.
03/12/2024 03:58 AM
The Launch Cert Job was working up until yesterday before the change is done in the added condition.
No Change was done in the Campaign Configuration side.
Below is the query in User Update Rule:
((##a.customproperty16 isupdated##) OR (##a.jobCode isupdated##) OR (##a.customproperty10 isupdated##) OR (##a.customproperty5 isupdated##)) AND a.customproperty2 in ('5','6','7','8','9','10') AND a.employeeType in ('Employee', 'Agency Employee') AND STR_TO_DATE(a.customproperty21, '%Y-%m-%d') <= DATE_FORMAT(curdate(), '%Y-%m-%d') AND DATEDIFF(curdate(), STR_TO_DATE(a.customproperty21, '%Y-%m-%d')) <= 15
Attaching the SS of the campaign config:
Below are the logs details:
03/12/2024 04:25 AM
Hi @h_sapkota the exact same configurations are working in my instance along with the advanced query. Ideally it should work for you as well. I don't see any configuration problem here.
Quick question, you mentioned if you remove the condition STR_TO_DATE(a.customproperty21, '%Y-%m-%d') <= DATE_FORMAT(curdate(), '%Y-%m-%d') AND DATEDIFF(curdate(), STR_TO_DATE(a.customproperty21, '%Y-%m-%d')) <= 15, the certification is getting launched. Is that correct? Can you please validate this behavior once again?
03/12/2024 04:49 AM
Hi @naveenss ,
The issues was with the cache of previous Rule runs. Since I was running multiple times same rule for a user, Old Errored HQL query was in the cache of rule which prevented from launching the Campaign.
When I change the query back to Old and trigger certification properly. And Again on changing the query back to the DATE condition's one, it is working as expected now.
03/12/2024 04:53 AM
Great. Please close the thread!
03/13/2024 12:38 AM
Hi @naveenss ,
The issue that we are facing is In QA environment where we have same configuration as Dev, It is still giving us the failure as mentioned above.
03/17/2024 08:08 PM
its data issue in QA