Hello all,
I am trying to have a conditional routing in a workflow, based on a specific attribute of the routed document.
In the expression I use this:
//get the attributes of the document.
wt.iba.value.IBAHolder holder = wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainerWithoutConstraints(doc);
wt.iba.value.DefaultAttributeContainer ac = (wt.iba.value.DefaultAttributeContainer) holder.getAttributeContainer();
if (ac != null) {
wt.iba.value.litevalue.AbstractValueView[] avalues = ac.getAttributeValues();
for (int i=0;i<avalues.length;i++) {
wt.iba.value.litevalue.AbstractValueView val = avalues[i];
if (val.getDefinition().getName().equals("contracttype")) IPselect= val.getLocalizedDisplayString();
break;
}
}
}catch(Exception e) { System.out.println("Caught Exception:" + e.toString()); }
Then in the OR I have put this:
result="IP_Yes";
if (IPselect.equalsIgnoreCase("Consulting")) result="IP_No";
if (IPselect.equalsIgnoreCase("Service Agreement")) result="IP_No";
The problem I have is that some times it gets the value from the document (thus "IPselect" has a value in the workflow) and some others not.
Any ideas?
Thank you in advance
John