- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2017 11:06 PM
Hi all,
we have a workflow on "task_sla" table for sending out the notifications on different percentage (for 25% ,50% ,75% etc). But there are notifications which are sent for 110%,200% etc which is not what client want to receive. as per my understanding there is something that's updating the "task_sla" table, which is why the workflow is triggering again .
I found one Business rule "start workflow" which has current.update(); in it. I think its causing the notifications to be sent on percentage more than 100 % .but that BR is OOB . How to handle this situation??
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 12:49 AM
Hi sravya ,
There is a out of box notification "SLA breached" which will fire when SLA is more than 100% please inactive the notification the notification is on Task SLA table
Thanks & Regards
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 12:49 AM
Hi,
this is BR on task_sla table:
assignWorkflow();
function assignWorkflow() {
if (!current.sla.workflow.nil())
startWorkflow(current.sla.workflow.toString());
}
function startWorkflow(id) {
// is this a retroactive start?
var msecs = new GlideDateTime().getNumericValue() - current.start_time.getGlideObject().getNumericValue();
// treat this as a retroactive workflow start if the SLA started more than 5 seconds ago
var w = new Workflow();
if (msecs <= 5000)
w.startFlow(id, current, current.operation());
else
w.startFlowRetroactive(id, msecs, current, current.operation());
// update the record in case the workflow changed some values
current.update();
}
here you can see current.update() is there . i think this is what causing the workflow to get triggered for multiple times
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 12:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 12:55 AM
Hi Anvesh,
I don't think this notification is causing the notifications being sent after 100 % because I checked and i found that the notification subject is not same as this notification (SLA breached).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 01:21 AM
Are you getting 25,50,75% mails too or are they being skipped?
Can you give us a screenshot of your workflow with the SLA Percentage timer activity?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 01:25 AM