I'm trying to have an error message displayed when some business rules are violated upon timecard submission.
I am getting the message in the subject ("Message not found. Application: HXC, Message Name XX_END_DATE"), rather than my message
Setup done so far:
1) define Fast Formula XX_END_DATE (OTL Time Entry Rules) as per code below:
default for assignment_id is 0
default for date_earned is '4712/12/31 00:00:00' (date)
default for rule_status is 'S'
default for message1 is 'XX_END_DATE'
inputs are assignment_id (number)
rule_status = 'E'
<<other debug messages>>
RETURN rule_status, message1
2) Created a Time Entry Rule “XX End Date” usage Submission / Resubmission
3) Created Time Entry Rule Group "Standard XX Rule Group" with the rule above, outcome Error
4) Associated it to my test employee
5) Created the message XX_END_DATE under Application "Time and Labor Engine"
The rule is actually firing, meaning that I am able to reach the review page if I switch the code to return 'S', while it prevents me to do so when it returns 'E'.
Also debug messages indicates that message1 is indeed XX_END_DATE.
The point is that the "preventing" message I get is the following:
Message not found. Application: HXC, Message Name: XX_END_DATE. Tokens:
I run the query below and I am getting the XX_END_DATE row in SQL.
where application_id in (
where application_short_name = 'HXC')
and message_name like 'XX_END_DATE'
and language_code = 'US'
so the message seems indeed to be there, but for some reason Apps cannot read it.
Can you use one of the seeded message instead of the Custom one and see what happens.
If you get the same error with the seeded message, then the issue is not with your message, but the way you're calling it.
Changed the FF to return a new message (XX_END_DATE_MSG) and created a new message.
It's working now.
It seems indeed the kind of behaviour you get when you do not bounce the apache, although in this case I did it several times.
It could be related to two different factors:
1) I deleted and re-created the message whith hte same code under different applications (The first time I was tried with the wrong one).
2) the fact that the message has the meaningful message containing the application code.
As I am rushing I am not going to dig it down, I'm happy knowing that I know how to move forward with the validation development.