edu.sampleu.travel.workflow
Class AccountAttribute
java.lang.Object
org.kuali.rice.kew.rule.AbstractWorkflowAttribute
org.kuali.rice.kew.rule.AbstractRoleAttribute
edu.sampleu.travel.workflow.AccountAttribute
- All Implemented Interfaces:
- Serializable, org.kuali.rice.kew.rule.RoleAttribute, org.kuali.rice.kew.rule.WorkflowAttribute
public class AccountAttribute
- extends org.kuali.rice.kew.rule.AbstractRoleAttribute
Resolves FO's using the accounts associated with the document XPath xpath =
KualiWorkflowUtils.getXPath(documentContent.getDocument()); List qualifiers = new ArrayList(); NodeList
accountNums = (NodeList)xstreamSafeEval(xpath, "//edu.sampleu.travel.workflow.bo.TravelAccount/number",
documentContent.getDocument(), XPathConstants.NODESET); for (int i = 0; i < accountNums.getLength(); i++) { Node accountNum =
accountNums.item(i); String accuntNumVal = accountNum.getNodeValue(); }
- See Also:
- Serialized Form
Fields inherited from class org.kuali.rice.kew.rule.AbstractWorkflowAttribute |
required |
Methods inherited from class org.kuali.rice.kew.rule.AbstractRoleAttribute |
isMatch |
Methods inherited from class org.kuali.rice.kew.rule.AbstractWorkflowAttribute |
getDocContent, getIdFieldName, getLockFieldName, getRoutingDataRows, getRuleExtensionValues, getRuleRows, isRequired, setRequired, validateRoutingData, validateRuleData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccountAttribute
public AccountAttribute()
getQualifiedRoleNames
public List<String> getQualifiedRoleNames(String roleName,
org.kuali.rice.kew.routeheader.DocumentContent documentContent)
getRoleNames
public List<org.kuali.rice.kew.rule.Role> getRoleNames()
resolveQualifiedRole
public org.kuali.rice.kew.rule.ResolvedQualifiedRole resolveQualifiedRole(org.kuali.rice.kew.engine.RouteContext routeContext,
String roleName,
String qualifiedRole)
xstreamSafeEval
public static final Object xstreamSafeEval(XPath xpath,
String xpathExpression,
Object item,
QName returnType)
- This method will do a simple XPath.evaluate, while wrapping your xpathExpression with the xstreamSafe function. It assumes a
String result, and will return such. If an XPathExpressionException is thrown, this will be re-thrown within a
RuntimeException.
- Parameters:
xpath
- A correctly initialized XPath instance.xpathExpression
- Your XPath Expression that needs to be wrapped in an xstreamSafe wrapper and run.item
- The document contents you will be searching within.
- Returns:
- The string value of the xpath.evaluate().
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.