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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Sending message back to user from failed workflow transition

avillanueva
22-Sapphire I

Sending message back to user from failed workflow transition

Workflow transitions are a nice place to drop in code and run checks off a user task. I have a few versions of the "check in your changeable stupid" validations before the workflow changes their state. In one version, it's a simple if/then expression that sets result to true or false:
if (user.hasBrain())
result=true;
else result=false;
The user would get an message like this if false: COMPLETE transition expression for Check In Resulting Items returned false. Kind of cryptic for yee of few neurons. I could explain this with a little training but does anyone else relay clear messages back to the user? I believe I can throw a WTException with a message which will get displayed, I think. Just curious if that causes the task state to have issues.

Antonio Villanueva - Sr. Software Engineer - ISR Systems
UTC AEROSPACE SYSTEMS
100 Wooster Heights Road, Danbury, CT 06804
Tel: +1 203 797 5682
antonio.villanueva@utas.utc.com<">mailto:antonio.villanueva@utas.utc.com> www.utcaerospacesystems.com
CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of UTC Aerospace Systems and its affiliated companies. If you are not the intended recipient please 1) do not disclose, copy, distribute or use this message or its contents, 2) advise the sender by return e-mail, and 3) delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated.

2 REPLIES 2

I have used following in transition without issues.



java.lang.Exception e = new Exception("Please make sure the XYZ is checked in before completing task");


if(wt.vc.wip.WorkInProgressHelper.isCheckedOut((wt.vc.wip.Workable)primaryBusinessObject)){


result=false;


throw new wt.workflow.engine.FailedTransitionException(e);


}

I built off that to produce a similar I-D-10-T error message.

Be well,

Vaughn McDaniel III | Engineering Services Group - PLM/CAD Applications | Kärcher North America - Englewood | x:75245828 m:720.216.3495 o:303.783.5828 | vaughn.mcdaniel@karcherNA.com<">mailto:vaughn.mcdaniel@karcherNA.com> | 1351 W. Stanford Ave. Englewood 80110
[cid:image001.png@01CEA325.E33FA6C0]<">http://www.karcher.com/usa/Home.htm>
PLM?<">http://en.wikipedia.org/wiki/Product_lifecycle_management> Windchill?<">http://www.ptc.com/WCMS/files/130891/en/flash/index.htm?&im_dbkey=130891&im_language=en> PLM for SMB?<">http://www.ptc.com/WCMS/files/129410/en/flash/index.htm?&im_dbkey=129410&icg_dbkey=362>

Top Tags