Promotion Request by object type
I have a Promotion request that uses a conditional Router to route depending on object type.
I have used the one from the KB that works well,
shown below.
try
{
wt.fc.QueryResult qr = wt.maturity.MaturityHelper.service.getPromotionTargets((wt.maturity.PromotionNotice)primaryBusinessObject);
while(qr.hasMoreElements())
{
wt.fc.Persistable pers = (wt.fc.Persistable) qr.nextElement();
if (pers.getClass().getName().equalsIgnoreCase("wt.doc.WTDocument"))
{
System.out.println(" ******** It is a WTDocument ******** ");
result = "route1";
}
else if (pers.getClass().getName().equalsIgnoreCase("wt.part.WTPart"))
{
System.out.println(" ******** It is a WTPart ******** ");
result = "route2";
}
else
{
System.out.println(" ******** It is neither WTDocument nor WTPart ******** ");
System.out.println(" ******** Routing to default Document path ******** ");
result = "route1";
}
}
}
catch (Exception e) {
}
The problem that i have is that i want to route for a specific document subtype.
Lets say its com.ptc.General
replacing wt.doc.WTDocument with com.ptc.General or wt.doc.WTDocument|com.ptc.General doesent seem to work.
Are there any java gurus out there that can help?

