email address for escalation

  • 24 October 2005
  • 1 reply
  • 7 views

Badge +2
i'm creating an activity that have more than 1 destinations (I added the destinations through SQL Query). i want to create an escalation that notifies every signatory through emails if they did not act on their workitems within 2 working days. given that there are 3 signatories and only one Act(approves) on his workitem. how would i assign an email address for every signatory so that i can send an email notification to the two(2) remaining signatory?

i'll really appreciate any inputs...
thanks in advance.

1 reply

Badge +8
With an escalation, only notifying those destination users that still need to open or finish their worklist items when the task has multiple slots is fairly straightforward just do a test in the escalation action to only send the notification to users where the status is active, like so:


foreach(ActivityInstanceDestination oActDest in oActInst.Destinations)

{

if (oActDest.Status.ToString() == "Active")

{

if((oActDest.User.Email==null)||(oActDest.User.Email.ToString().Trim().Length == 0))

{

throw new System.Exception("No Email Address was supplied for User:" + oActDest.User.FQN + ", please rectify and try again.");

}

strEmail = strEmail + oActDest.User.Email + ";";

}

}



This code assumes that the destination users are valid AD users (e.g. domainusername) - K2.net will query Active Directory to obtain the user's email addresses. If you don't have Active Directory, you can still append email addresses from whichever data store you're using to the strEmail variable.

This will also send the escalation to a destination user if they opened the item previously but then forgotten to submit (i.e. finish) it. When the user finishes their task, the status will change to Completed .

Reply