This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Email to senior if guy is not able to complete work in certain period.

Rahul. - Wednesday, February 8, 2012 6:31 AM:

Hello Frnds

I want to send an autogenerated email to senior manager if a guy is not able to complete its assignment work in a certain time (schdeuled date + 3 additional date)

for this i have done a c# coding given below

innovator inn = this.newInnovator();
string ActiName = this.getAttribute("name");
string d1 = this.getAttribute("date_due_sched");
string d2 = this.getAttribute("date_start_sched");
DateTime d3 = DateTime.Now;
DateTime d4 = Convert.ToDateTime(d1);
string subject = ActiName + "had completed its duration of 3 days.";
string body;
int d5 = Convert.ToInt32(d4);
int d6 = Convert.ToInt32(d3);
Item idnt = inn.getItemById("Identity","0D49D1260BE54E568BA9FD415B759ACD");
Item idnt2 = inn.getItemById("Identity","30B991F927274FA3829655F50C99472E");
string n = Convert.ToString(idnt);
string n1 = Convert.ToString(idnt2);

if((d6-d5)>3) 
 { body = ActiName +"had completed its duration of 3 days from" + d2 +"to" + d1 +"and the work is still in pending state.";
   CCO.Email.SendEmailToIdentity( ref n, ref subject, ref body, ref n1);
                                                    
 }
  return this.newInnovator().newResult("OK");

This is my first custom method in aras innovator so it may be possible that there are some foolish errors.

Plz tell me about those errors and steps for fullfill the requirement (Email to manager).

Thanks

Rahul.



Brian - Thursday, February 9, 2012 5:32 AM:

Hi Rahul,

A workflow Activity has an "escalation" time called the "timeout duration". If you set this then run the standard Innovator method Check Escalations the "Manager" of the Activity will be sent a notification that the Activity is overdue. You set a "Notification" to trigger onEscalate.

If you are on subscription then you can use the Scheduler to run this method every day. Otherwise you can just have someone log in and run the method manually each day.

So you really shouldn't need to write your own custom code to do this.

Cheers,

Brian.



Rahul. - Friday, February 10, 2012 5:02 AM:

Hi Brian

Thanks for your reply.

Here I want to apply this email notification to the project assignee ( activity2). In project if a guy is not able to do his/her work then autogenrated mail should be sent to senior manager,

So is this possible by using GUI or we  have to write generic method which send this email.

Plz  tell me, what I have to do to achieve this requirement.

Thanks,

Rahul.