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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Conditional Router Syntax?

ptc-1047216
1-Newbie

Conditional Router Syntax?

Hi All, I’ve created a custom Boolean attribute for a sub type of wt.doc.Document (the custom attribute is named 10_ForReview). I now want test the state of that attribute in a Workflow Conditional Router. However, I have no idea as to the syntax I need to use. Can anyone shed some light on how I might achieve this? Many thanks,
2 REPLIES 2

Try this: if (primaryBusinessObject instanceof wt.doc.WTDocument) { wt.doc.WTDocument doc=(wt.doc.WTDocument)primaryBusinessObject; wt.iba.definition.litedefinition.StringDefView def; def= (wt.iba.definition.litedefinition.StringDefView)wt.iba.definition.service.IBADefinitionHelper.service.getAttributeDefDefaultViewByPath("ATTRIBUTE_NAME"); doc = (wt.doc.WTDocument)wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer(doc, null, null, null); wt.iba.value.DefaultAttributeContainer dac = (wt.iba.value.DefaultAttributeContainer)doc.getAttributeContainer(); wt.iba.value.litevalue.AbstractValueView[] avv = dac.getAttributeValues(def); if(avv != null && avv.length == 1) { wt.iba.value.litevalue.StringValueDefaultView svdv = (wt.iba.value.litevalue.StringValueDefaultView)avv[0]; String atr=svdv.getValue(); if (atr != null && atr.trim().equals("check_value")) result="Forward"; } }

Many thanks, Dmitry, as soon as I get a chance, I'll test it out. bob.
Top Tags