cancel
Showing results for 
Search instead for 
Did you mean: 

SFSF Employment Details Alert is only triggered after a change in the portlet

adriangalisteo
Participant
0 Kudos

Hi team.

i am trying to create an alert in a custom field in Employment Details that triggers an alert once it has detected that 47 and 107 months have passed since the date written in this field. "subrogation date".

The problem is that when i trigger the job "alerts and notifications" it just detects the field date once, that is to say that it will only trigger when the month 47 arrives but won´t trigger again when 107 months have passed since the subrogation date. So i can trigger the alert 1 time and then it doesn´t make any effect if i trigger the alert and notification jobs again, it won´t do anything.

The only way i am noticing that it triggers the alert again is when i perform a change in the same portlet and then i trigger the job. It looks like alerts only "restart" when a change is made in the portlet. (doesn´t have to be in the very field "fecha de subrogación")

I tried ot found more info and KBAs about it but don´t clarify exactly this situation, maybe is related with the fact that is not an effective dated portlet or something like that, but the portlet is in the list of portlets suitable for setting up alerts so theoretically should work by standard.

Does anybody know why this is happening or has any literature or a blog that can clarify it?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

nlgro023
Active Contributor

I wonder if it really is a limitation in the portlet, or rather the business rule itself.
I assume you've added a business rule that checks with just 1 IF statement and if then seen as TRUE it will trigger both notifications in X months (if so, was the special parameter added to ensure you can use 2 notifications at once)?

If not, what did you set up instead?

You could alternatively also go for an integration center job combined with an onsave rule, that checks when the date (in comparison with the date of today) meets X 2 for both scenarios to meet your requirement (i.e. integration center job that looks at today - 47 months and 1 that looks at today - 107 months) where the onsave rule then checks if the admin user that triggers the onsave does the change.

adriangalisteo
Participant
0 Kudos

this is the business rule , i could not set all the alert effective dates under the same "THEN" because it only triggered the last date "107" even though the 47 was also in that set so i had to divide it in 2 differents if/then.

The integratin center/offcucle batch solution it could work but my purpose here is to know about the information about this behaviour in employment details portlet

thanks

adriangalisteo
Participant
0 Kudos
I read in the sap guides and lblogs that the alerts only detect changes, that is to say that it only will trigger when it recognizes a change in the "last modified date" that´s why it needs an integration center or a manual change to make the portlet "believe" that a change has been made. Sometimes this software feels counterintuitive

Answers (1)

Answers (1)

nlgro023
Active Contributor

Well this explains it, if you want both clauses to trigger you need to have 2 separate business rules as, when the change is performed, it will only trigger the first IF (or the second as you have that today vs. date criteria in your IF). This means the 2nd or 1st IF won't be considered in every situation (where I'm not considering the scenario neither are applicable.

With the 2 separate business rules you'd have the highest probability of it triggering based on just 1 change/save. The only thing complicating this in your statement for me is this (and the 107 version):


Here you're basically saying that the action must have been taken 47 months roughly after the date, although I cannot imagine people do update it that specifically (as it would then still require the person to make the update again 107 months later as well). Normally those type of clauses are just used to make sure the date is not in the past (rather than really at the moment someone makes the change). Especially for the 107 clause I'd have expected a "is greater then" in the IF clause, as the exact moment of the change is way in the future.

Former Member
0 Kudos

Hi jasper.de.groot,

your message:

Well this explains it, if you want both clauses to trigger you need to have 2 separate business rules as, when the change is performed, it will only trigger the first IF (or the second as you have that today vs. date criteria in your IF). This means the 2nd or 1st IF won't be considered in every situation (where I'm not considering the scenario neither are applicable.

I won´t say that is the explanation of why the portlet is needing to be saved before the alert job detects the fecha de subrogación date.

After checking it, Setting all the THEN statements in the same rule with the 47 and 107 months triggers the alerts also, the job runs and detects those who have the field "fecha de subrogacion" not equall to NULL so if it detects that today is exactly 47 months after the date it will trigger, but if not, it skips the block and goes to the block of the 107 anyway until finds that today = fecha de subrogación + 107 months. So in that case is triggering anyway. It just searches in every employee that has that date filled in and if it does not find the correct date it doesn´t send the alert, but the point is that if the first if doesn´t work, the second will. This regarding the rule workings.

it is my fault as i didn´t provide enough context to understand the requirements. I will shed some light before we continue:

The company needs a job to detect the "fecha de subrogacion" date, nobody will never ever change that porlet since the hiring or just once in a lifetime because that date is immovable, it will always be the same date for an employee once it has been populated.

to sum up this point, the "fecha de subrogacion" date will remain always the same and nobody is going to update the portlet to change it.

Therefore the problem that we encounter is that it will only trigger the rule when it finds that the 47 months have passed, but in order to get triggered again when the 107 months arrive, either the portlet or the rule ( i don´t really know what is really happening here) needs to detect that there has been a change in the portlet, that is the real problem that i am facing. Consequently is when my doubts came about the real inner workings of the rules in this Employment Details Portlet and why it needs to detect a change.

Of course I can solve it as you say with integration center and stuff but i came just to know why this behaviour is occuring.

Maybe i missunderstood the functioning of the alerts, but i thought the job runs every day or the timeframe is setted up, and detects the date field in every employee, if it complies with the condition, then the alert is created, but in this case, at least with the portlet employment details, it is not working like that.

Thanks for your time.

Regards

Former Member
0 Kudos

I think this is what i was looking for

2532558 - How To Configure MDF Alerts and Notifications for MDF Objects (sap.com)

The EC Alerts and Notifications job will consider all the records which was updated since the last EC Alerts and Notifications job ran.

This job is not restricted to check only latest records. It will check all records that were "Last Modified" between the job last run time and the day it next runs.

So this really explains the behaviour and it looks to be the same in every portlet.

Regards