Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: Email notification when needed

$
0
0

Hello Greg,

 

We actually have this setup in our CN workflow.  There are certain groups that only need to see certain CNs so we control it via attributes in the CN.  However, our users can update these while in the task and they will be pushed back to the CN when the task is done.  Here is the code that we use to gather the variables (we also put some of them in the body of the email), and the code to route it.  Here is a snapshot from our process.

 

6-17-2015 1-36-13 PM.jpg

 

Here is the code for the Variable gather for email under the Expression tab:

com.ptc.core.lwc.server.LWCNormalizedObject obj = new com.ptc.core.lwc.server.LWCNormalizedObject (primaryBusinessObject,null,null,null);

obj.load("ULREQ","NMDD","TOOLINGREQ","AUXCODE","CNCODE","LITREQ","EFFECTIVEDATE1","MKTLITREQ");
Object cnULREQ=obj.get("ULREQ");
Object cnNMDD=obj.get("NMDD");
Object cnTOOL=obj.get("TOOLINGREQ");
Object cnAUX=obj.get("AUXCODE");
Object cnCNCODE=obj.get("CNCODE");
Object cnLITREQ=obj.get("LITREQ");
Object cnEFFDATE=obj.get("EFFECTIVEDATE1");
Object cnMKTLITREQ=obj.get("MKTLITREQ");

if (cnULREQ instanceof String){
CN_ULREQ = (String) cnULREQ;
}

if (cnMKTLITREQ instanceof String){
CN_MKTLITREQ = (String) cnMKTLITREQ;
}

if (cnNMDD instanceof String){
CN_NMDD = (String) cnNMDD;
}

if (cnTOOL instanceof String){
CN_TOOLINGREQ = (String) cnTOOL;
}

if (cnAUX instanceof String){
CN_AUXCODE = (String) cnAUX;
}

if (cnCNCODE instanceof String){
CN_CNCODE = (String) cnCNCODE;
}

if (cnLITREQ instanceof String){
CN_LITREQ = (String) cnLITREQ;
}

if (cnEFFDATE instanceof String){
CN_EFFECTIVEDATE = (String) cnEFFDATE;
}

 

Here is one of the OR routings:

 

if ("YES".equals(CN_ULREQ)){

result = "YES";

} else if ("yes".equals(CN_ULREQ)){

result = "YES";

} else {

result = "NO";

}

 

 

I forgot to add how to get the check box:

You need to add a Variable under Properties of the workflow that is Visible.

6-17-2015 1-52-07 PM.jpg

 

6-17-2015 1-52-47 PM.jpg


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>