2 Replies Latest reply on Jul 7, 2006 5:08 PM by ncapito

    StartsWith XPath question

    ncapito

      Do you all support the startsWith XPath string function? I am having trouble trying to get it to work. I want to (inside of a bpel process) check a string to see if it starts with a particular substring. For example. "Nicks_1:". I saw that XPath has a startsWIth command so i attempted to use it. The process deploys but when i try to test it the process dies. A little more info this is what i am using:

      condition="bpel:startsWith(bpel:getVariableData(NicksTest,'result'),'Nick)">


      Where NicksTest is a variable with a part result that is a string.

      however i get this error:

      2006-07-07 16:25:50,328 ERROR [org.jbpm.bpel.service.messager.StartListener] could not deliver request
       org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.BpelDefinition.startProcessInstance(BpelDefinition.java:58)
       at org.jbpm.bpel.service.messager.StartListener.onMessage(StartListener.java:120)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707)
       at java.lang.Thread.run(Thread.java:595)
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:42)
       at org.jbpm.bpel.def.Receive.accept(Receive.java:67)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:81)
       at org.jbpm.bpel.def.Sequence.accept(Sequence.java:84)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:28)
       at org.jbpm.bpel.def.BpelDefinition.startProcessInstance(BpelDefinition.java:55)
       ... 3 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Assign.execute(Assign.java:36)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 12 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.StructuredActivity.execute(StructuredActivity.java:47)
       at org.jbpm.bpel.def.StructuredActivity$StructureStart.leave(StructuredActivity.java:246)
       at org.jbpm.graph.def.Node.execute(Node.java:305)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 17 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Assign.execute(Assign.java:36)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 23 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Invoke.execute(Invoke.java:28)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 28 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Switch.execute(Switch.java:63)
       at org.jbpm.bpel.def.StructuredActivity$StructureStart.leave(StructuredActivity.java:246)
       at org.jbpm.graph.def.Node.execute(Node.java:305)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 33 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.StructuredActivity.execute(StructuredActivity.java:47)
       at org.jbpm.bpel.def.StructuredActivity$StructureStart.leave(StructuredActivity.java:246)
       at org.jbpm.graph.def.Node.execute(Node.java:305)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 39 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Assign.execute(Assign.java:36)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 45 more
       Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Invoke.execute(Invoke.java:28)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 50 more
       Caused by: java.lang.RuntimeException: could not select nodes
       at org.jbpm.bpel.data.ocm.xpath.XPathScript.evaluate(XPathScript.java:95)
       at org.jbpm.bpel.def.Switch.execute(Switch.java:43)
       at org.jbpm.bpel.def.StructuredActivity$StructureStart.leave(StructuredActivity.java:246)
       at org.jbpm.graph.def.Node.execute(Node.java:305)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 55 more
       Caused by: org.jaxen.UnresolvableException: Function :startsWith
       at org.jaxen.SimpleFunctionContext.getFunction(SimpleFunctionContext.java:142)
       at org.jaxen.ContextSupport.getFunction(ContextSupport.java:251)
       at org.jaxen.Context.getFunction(Context.java:205)
       at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:177)
       at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:108)
       at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:705)
       at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:227)
       at org.jbpm.bpel.data.ocm.xpath.XPathScript.evaluate(XPathScript.java:81)
       ... 59 more
      
      
      Any help?
      
      
      Let me know if you need anything else.