Skip to main content
Hello ,

Problem: Once process gets started, ExecutiveId is loaded in the process datafields. I've created a Destination Queue for all Executives. In a particular activity I want to get the Email address of the Executive whose Id matches with the ExecutiveId in the process DataFields.
Solution: How to get it? 😞

Thanks in advance.....

rdwpl
Nobody to answer .... 😞
Hi,

How is the ExecutiveId populated i.e. where do you get this Id from? My guess is that it is populated from a listbox id - chosen by the originator or some other user. If this is the case, I would rather store the executive name and use the normal .NET DirectoryServices class to retrieve the email address.

Regards,
Ockert
Thanks alot... for your valuable suggestion. 🙂

I'm getting ExecutiveID while uploading xml file thourgh <ExecutiveID> node. Once file gets uploaded the process gets started and ExecutiveId gets stored in the process data fields.This is the overall picture.
Now I've two scenarios:
Scenario 1: In Reminder Activity, I've to sent mail to the mail address of this particular Executive(whose Id is present in the Process Data Fields)
Scenario 2: In another Activity(Approval Activity) I have to sent worklist to this Executive(not to any other Executive). Also if time is up I've to escalate the whole Activity to his manager.

Now
1. How to retrieve the Email address of that particular Executive from the AD/Destination queue.
2. How to sent workist to the particular Executive and to his manager(If escalated)

Hope I had explained the problem clearly.

Thanks in advance..... 🙂
RDWPL-CHN
Ok, but how is this ID linked to the Executive name?
If you can map the ID to a specific Executive name, you can use the .NET DirectoryServices class to retrieve the relevant information from AD.

Please have a look at the following posting for some help:
http://forum.k2workflow.com/viewtopic.php?p=5947#5947

Regards,
Ockert
Lets take this ID as AD's username.

If this is the case --> how we can sent worklist and mail to this particular executive. How we will escalate to his manager.

We've to set destination Rule if we've to sent worklist ...am i correct. But in my case destination rule will be dynamic ie based upon the executive Id.

Thanks for the link, I think it'll be helpful to resolve my problem to an extent.

Thanks
OK, if you've got the user's fully qualified domain name i.e. 'DomainUserName', you send a worklist item and mail to this user by editing the code behind the Destination Rule of the Activity and adding the username in the statement:
K2.Destinations.Add(DestinationType.User, "DomainUserName").
If you've ticked the 'SMTP Notification' on the Client Event Wizard, a mail will automatically be generated and sent to the applicable user with the correct event serial number contained within the mail message. In order to physically create a worklist item, you obviously need to add a Default client event to your Activity.

To send an Escalation email to the user's manager, you will need to also get the Manager email (together with the code you've executed above to link the ExecutiveID to a username) from AD and store that in a process level datafield i.e. 'Manager@company.com'. You can then use this email address in the code behind an Email Escalation.

HTH,
Ockert
A big thanks to you.......
Now itself I'll try this...

Great ...
Excellent
Thanks alot

RDWPL

Reply