01-24-2014 02:07 PM
I'm facing a weird issue when trying to send mass notifications through a loop in a workflow. A client required to send to each responsible of a project a mal with a summary of the projects without any update on the last 10 days or more, so I create a couple temporary tables, one to do the calculations and html detail of each row and one for the summary according the reponsible.
The package is called from the workflow and works fine, the problem stars when looping from each record, the steps recover the data from the temporary table and save it to the request with a ksc_store (the body is splitted in many parts to have more than 4000 characters) and the user ids to send are save in other fields.
When its time to send the notification I used the settings "Use a user defined token" and specified the token [REQD.TO_EMAIL] which has the value of the user, but every loop the mail is not send but if I specify a user name and declare a user of the system the mail is sent.
The field had a text field validation but then I changed to a Autocomplete validation but that didn't work either.
Another thing I could realized, it seems if the mail is too big is also not send. Do anyone knows if exists a limitation with this?, the mail could contain more than 40 000 characters.
Any help will be appreciated,
Solved! Go to Solution.
01-27-2014 04:20 AM
You have a token [REQD.TO_EMAIL] thus it is a field in a request type.
- Determine where the field storage is. ParameterX and Visible_Parameterx
- After the email attempt go look at the data. (save the request#)
- Open the workbench and open SQL Runner
Select * from KCRT_request_details where request_id = request#
- Now verify your data looks as expected it should either be
User_id#@#User_id... or email_addr#@#emailAddr...
- also check notification config-UserDefinedToken recipient type UserID or UserDefinedToken recipient type email address
01-27-2014 06:54 AM
[REQD.TO_EMAIL] is not a valid token name. You must specify whether you want the hidden or visible value for the field. The correct value would be either [REQD.P.TO_EMAIL] or [REQD.VP.TO_EMAIL].
01-27-2014 10:17 AM
Where are you looking that I'm using [REQD.TO_EMAIL] instead of using [REQD.P.TO_EMAIL], in the screenshot I send I'm using (and I just checked again) and I'm using [REQD.P.TO_EMAIL] when configurating the notifications or is in another place.
01-27-2014 10:51 AM
Our comments were based on your description of your problem: "When its time to send the notification I used the settings "Use a user defined token" and specified the token [REQD.TO_EMAIL]".
In looking at your screenshot, I think your problem is that you have checked the box for "Don't send if obsolete". I am not sure what the complete label is in your instance but it starts as "No enviar s...". This option suppresses the notification if it is no longer relevant because the workflow has moved on.
01-27-2014 01:36 PM
You were right, after disable the No send if obsolete, notifications were send it again Now I'm facing a second problem, this is a loop, if I set in automatic the steps inside the loop, not all notifications are sent (probably the PPM is busy calculating or sending emails, but if I do it manually each loop all notifications are sent.
What do you think could be happening?
01-28-2014 09:09 AM
My guess at this point is that PPM is looking at only the last instance of execution for the workflow step. Try adding a sleep command to the execution step so it waits at least as long as the cycle time on the notification service.
01-28-2014 11:46 AM
Is there any ksc command to wait?. Since I'm not the DBA I cant use the DBMS_LOCK package. What I did was an execute to do a while for 15K times before continue :S not a clean solutions but it works