cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Email notifications on the fly

RajeshBalasunda
2-Explorer

Email notifications on the fly


Good Day!!!

Is there a way to handle email notifications on the fly. In a workflow process, we want to select few users (from different roles or from the entire windchill community). These are the only userswho will then get the email notification.We are on 9.0 M080

Any suggestion is greatly appreciated.


Regards,

Rajesh Balasundaram

4 REPLIES 4

I've always just written a java class which generates and sends the email, then you can allow a user to add a list of recipients through a workflow task, and you simply pass them in to the mailer object.

I've attached the mailer class we use. Have a look at main() for an example how to use it.

You can compile and deploy this to Windchill then call it directly from your workflow.

-Thomas R. Busch
Sr. Software Developer
Stryker Instruments
(269) 323-7700 x4014
tom.busch@stryker.com<">mailto:tom.busch@stryker.com>

We use the same technique however watch out for stalling the workflow queue. You should use the Windchill mail queue as we found that if the mail server is down, network issues etc the workflow queue can hang. Just a warning, I can dig up the email API if you need them

Simon

We use Send-Mail webject to send email



public static void sendEmail(String body, String subject, String from,

String to, String cc) {

IeService ie = new IeService();

Webject web = new Webject();

web.setName("Send-Mail");

web.setType("MSG");

web.setService(ie);

web.addParam("SUBJECT", subject);

web.addParam("MAIL_SERVER", mailServer);

web.addParam("FROM", from);

web.addParam("TO", to);

web.addParam("CC", cc);

web.addParam("CONTENT_TYPE", "text/html");

web.addParam("CONTENT", body);



try {

web.invoke();

} catch (IEException iee) {

iee.printStackTrace();

} catch (IOException ioe) {

ioe.printStackTrace();

}

}



Thanks,

Lakshman Easwaran
Stryker Orthopaedics
325 Corporate Drive
Mahwah, NJ 07430

Rajesh,

The answer is yes.

The way we do it is:
Create a workflow variable of type wt.org.WTUser.
In a workflow expression to set the value of the of WTUser variable.
In the email robot under participant tab use the "Variable" option to
select the workflow variable created in step 1

Note the only classes that can be used to create Variable to be selected
in step 3 are:
wt.org.WTUser
and
wt.org.WTGroup

Hope this helps.

David Graham
CAx/PDM Administrator


Emhart Glass Manufacturing Inc.
123 Great Pond Drive | PO Box 220 | Windsor, CT 06095-0220 | USA
Telephone +1 (860) 298 7377 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 |
Announcements


Top Tags