Skip to main content
13-Aquamarine
October 7, 2014
Question

Dynamic Email Notification from Windchill Workflow

  • October 7, 2014
  • 9 replies
  • 2692 views
10.1 M040

Hi Everyone,
I have a request from the business to be able to dynamically set the email recipients within the workflow at runtime to duplicate a process that exists today (Outlook distribution lists). Is it possible, at runtime, to configure what recipient email addresses will be used for an email robot?

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CFE218.FE260230]

9 replies

1-Visitor
October 7, 2014

Patrick,


Did you consider using groups or roles?

13-Aquamarine
October 7, 2014
Thanks to all who replied but I found the following PTC TS Document stating that this is not possible OOTB.

1-Visitor
October 9, 2014

Hello Patrick,


We did some custmoziation to pick the recipients dynamically and send the notification from Workflow. You can write the custom code and embed it in the expression robot.


Let me know if you need to code to compose the email.


Thanks,


Mahesh KL

1-Visitor
July 11, 2023

Hello Mahesh,

 

I am working on this topic. If you can share with me the to compose the email, it will be great.

i am interesting to see the code.

Thanks you.

HelesicPetr
22-Sapphire II
July 11, 2023

Hi @JR_10423087 

This is just example and uses a wt.mail.EMailMessage class

EMailMessage localEMailMessage = EMailMessage.newEMailMessage();
localEMailMessage.addRecipient(participant);
localEMailMessage.setOriginator(context.getOwner());
localEMailMessage.setSubject(null, "Email Subject" + context.getName(), new String[]{});
String Message = "html format body of email";
localEMailMessage.addPart(null, message, null, "text/html");

localEMailMessage.send(true);

 hope this can help

 

PetrH

13-Aquamarine
October 9, 2014
Hi Mahesh,
I would like to see screenshots of what the user sees in his workflow task to set the email addresses if that's possible?

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CFE3B9.9221D760]
1-Visitor
October 9, 2014
Hello Patrick,

In our case, it was a Change Release Notification to the users outside
Windchill DS. This notification was to notify the stake holders of Changes
who didn't had access to Windchill.

We created a Preference and added the email addresses as preference value
(Different email recipients for different Product Containers). The email
addresses were read from Workflow and email was sent from Workflow.

The email address can also be read from Workflow activity. You can add a
String Variable and read it in the expression robot.

Thanks,
Mahesh KL

On Thu, Oct 9, 2014 at 6:07 PM, Williams, Patrick <->
wrote:

> Hi Mahesh,
>
> I would like to see screenshots of what the user sees in his workflow task
> to set the email addresses if that’s possible?
>
>
>
> *Patrick Williams* | Engineering Systems | c: 616.947.2110
>
> [image: sc_inc_black_sig_1_alt]
>
>
>
> *From:* Mahesha Lokesh [
11-Garnet
October 9, 2014

, cuf

Sent from my BlackBerry 10 s#martphone.
11-Garnet
October 9, 2014

All,


Please ignore my previous email reply. Mistakenly sent. Sorry for that.


Ayyappan