Delayed trigger adding employees in queue that do not meet b

Posted by Rollbase User on 07-Aug-2013 12:54

Hi. We have created a trigger to email two individuals when an employee is within 15 days of benefit eligible date. The trigger needs to be set so that if an employee has a blank value for this date it does NOT run, and also that the trigger only runs on active employees. We added the appropriate conditions to the trigger formula; and when we debug it works as expected. For example, John Doe (with a benefit eligible date of NULL) debugs to false, therefore should not trigger an email. 2nd example, Jane Doe also has a null value but is included on the trigger's list of queued emails. We are using a condition of "{!status#value}" == "Active" && "{!benefit_eligibility_}" != " " We are really stumped on this one because the debugging works as expected, not sure why records evaluating to FALSE are activating the trigger. This is a delayed trigger. When I Query the API using SELECT name FROM employee WHERE (status = 'Active') AND (benefit_eligibility_ != "") this displays on the employees that meet both conditi

All Replies

Posted by Admin on 08-Aug-2013 11:17

Hello Paul,



thanks for the clear description. My initial approach is to replicate the situation. From there, I will modify certain parts of the trigger/record and monitor the trigger's behavior. Possibly being able to display data from a record's trigger evaluation in a log or field would be useful in understanding why the formula returned a boolean value of true.



Describing my initial thoughts, I suspect that the "Trigger Delay Time" option may need to refer to "Benefit Eligibility Date" and not "Current Time". I'm also concerned about the description under the option, "If you would like this trigger to be delayed relative to a particular date/time rather than run immediately, specify the delay criteria here. Note: for delayed triggers options "Before" or "After" do not make any difference." What happens if the trigger should run 15 days before the current time? I'll attempt to discover the answers myself and refer to my colleagues if needed.



Please feel free to post about any progress mad

Posted by Admin on 08-Aug-2013 11:31

Thanks for the reply I did try relative to "Benefit Eligibility Date" - just an FYI.

Posted by Admin on 08-Aug-2013 13:38

Paul,



thanks for the info. Is the provided screenshot of the trigger definition exactly what is used, as is the Jane and John Doe record exapmles? If not, I'd appreciate if you could elaborate on the schema which produces the error. I would like to make sure that my replication adheres to the process as much as possible, ensuring the most accurate solution.



Also, is this trigger the only portion that is included in the process of sending out the email? I'm assuming nothing else is incorporated since the "Trigger Delay Time" option exists. The reason for my inquiry Involves incorporating a Workflow along with a trigger; The Workflow could iterate through records and determine whether a trigger needs to be executed to send the emails. This just just a quick thought, I'm barely considering the implications that affect performance and organization.



Cheers,

Corey Prak

Posted by Admin on 08-Aug-2013 13:54

The Delayed trigger is set as follows: Timing = After Create/After Update, on field change of Benefit Eligibility. Run Relative to Benefit Eligibility - before 15 days.



Any employee who meets both conditions:



1 - Status = Active

2 - Benefit Eligibility Date does not equal empty.



What happens is any newly created employee or any employee that is updated gets added to the queue. Even if you click "edit" and click "save" - no changes made the employee gets added whether or not both conditions are met.



I hope I have explained enough...I am also looking at maybe doing a batch job running a report 15 days prior to the employees that are eligible.

Posted by Admin on 12-Aug-2013 14:33

Hello Paul,



could you please indicate whether there is any content in the "Event Log" of the "Trigger Queue", and if so, provide the content in a reply?



Thanks,

Corey Prak

Posted by Admin on 12-Aug-2013 15:17

The content that is in the Queue is the ID, Record Name (Employee) and Will Run At...plus #Recursions.



Employees are in the queue that do not meet both conditions as I stated.



Thanks, Paul

Posted by Admin on 15-Aug-2013 09:33

Hello Paul,



I've created a 'scratch' application to mimic the example you provided and was successful in replicating the issue. Moreover, I've reduced the Trigger Condition to simply 'return false' and still observed emails being sent to my inbox.



I will refer to the product management team and other colleagues and verify the issue. While this may seem to be a defect, I would like to make sure that it isn't an intentional Rollbase behavior or a simple Trigger setting that should be changed.



Thanks,

Corey Prak

Posted by Admin on 15-Aug-2013 10:12

Thanks for the update!



Paul

Posted by Admin on 16-Aug-2013 14:51

Hello Paul,



I have collaborated with my colleagues and have determined that this is indeed a defect of Rollbasebase. Hence, a Defect Report has been created, CR# PSC00112006, for our product management team to observe the issue.



Upon reviewing the report, a decision will be made which may or may not result in an eventual fix. In any case, I will be sure to keep you updated with any developments once they become available.



I apologize for the convenience and hope this helps!



Thanks,

Corey Prak

This thread is closed