Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I am trying to create a workflow for "Variance" Object . Based on an IBA value enetered by the user, while creating the Variance I am expecting the Work Flow goes on two different routes.
Say for example there is an IBA called "Mfg Site" . IF the value is "Mexico" it needs to take "route1" in the work flow and if this value is "USA" it needs to go through "route2"
I would really appreicate if anyone can give me the routing expression to use for this .
Thanks
Alex.S.F
//add this to conditional robot
com.infoengine.SAK.Task task = new com.infoengine.SAK.Task("getAttVal.xml");
String obid = wt.adapter.BasicWebjectDelegate.getUfid(primaryBusinessObject);
obid = obid.substring(0,obid.lastIndexOf(':'));
task.setUsername("wcadmin");
task.addParam("obid", obid);
task.invoke();
com.infoengine.object.factory.Group part = task.getGroup("VarAttsGroupOut");
String attVal = (String)part.getAttributeValue(0, "<logical identifier=" of=" attribute=">");
if(attVal.equals("<val 1=">"))
result="route1";
else if(attVal.equals("<val 2=">"))
result="route2";
//recommended: add default route if above conditions fail
create IE task under <windchill>\tasks with name getAttVal.xml containing following webject
<%@page language="java"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])" delim="!" valueseparator="!" default="<%=com.infoengine.au.NamingService.getVMName()%">"/>
<ie:param name="ATTRIBUTE" data="<logical" identifier=" of=" attribute=">"/>
<ie:param name="GROUP_OUT" data="VarAttsGroupOut"/">
<ie:param name="TYPE" data="<Var" type=" logical=" identifier=">"/>
<ie:param name="WHERE" data="obid=$(@FORM[]obid[0])"/">
</ie:webject>
Note: There is a way to get IBA values without using IE task.
I hope this helps.
Thanks a lotAntonio and Yogesh ,
I will try this option
Yogesh ,
Do you have any suggetions without using the Info Engine task ?
Replies from Antonio and Jeff would be ways to go to get IBA values without using the Info Engine task.