4 Replies Latest reply on Oct 11, 2007 4:12 AM by agusgr

    BPEl Problem: Assign with Literal values

      Hello,
      I'm working with the jbpm-bpel-1.1.Beta3 and with the BPEL plugin for eclipse.
      I have develop several BPEL services but I have a problem with a portion of code.
      When I try to deploy a proccess with this:

      <bpws:assign name="Assign" validate="no">
       <bpws:copy>
       <bpws:from>
       <bpws:literal>
       <bpws:literal>'URL not found'</bpws:literal>
       </bpws:literal>
       </bpws:from>
       <bpws:to>$output.response/tns:Country</bpws:to>
       </bpws:copy>
       </bpws:assign>
      

      I have this:

      2007-10-09 10:34:05,078 ERROR [org.jbpm.bpel.xml.ProblemHandler] BPELConditionService.bpel could not parse script [/bpws:process/bpws:sequence/bpws:assign/bpws:copy/bpws:to]
      org.jbpm.bpel.BpelException: could not create evaluator: expression=org.jbpm.bpel.sublang.def.Expression@11c2812[text=,id=0]
      at org.jbpm.bpel.sublang.xpath.XPathEvaluatorFactory.createEvaluator(XPathEvaluatorFactory.java:63)
      at org.jbpm.bpel.sublang.def.Expression.parse(Expression.java:55)
      at org.jbpm.bpel.xml.BpelReader.readExpression(BpelReader.java:471)
      at org.jbpm.bpel.xml.BpelReader.readExpression(BpelReader.java:445)
      at org.jbpm.bpel.xml.AssignReader.readToExpression(AssignReader.java:218)
      at org.jbpm.bpel.xml.AssignReader.readTo(AssignReader.java:130)
      at org.jbpm.bpel.xml.AssignReader.readSpecificProperties(AssignReader.java:82)
      at org.jbpm.bpel.xml.ActivityReader.read(ActivityReader.java:54)
      at org.jbpm.bpel.xml.BpelReader.readActivity(BpelReader.java:1178)
      at org.jbpm.bpel.xml.SequenceReader.readSpecificProperties(SequenceReader.java:41)
      at org.jbpm.bpel.xml.ActivityReader.read(ActivityReader.java:54)
      at org.jbpm.bpel.xml.BpelReader.readActivity(BpelReader.java:1178)
      at org.jbpm.bpel.xml.BpelReader.readScope(BpelReader.java:540)
      at org.jbpm.bpel.xml.BpelReader.read(BpelReader.java:251)
      at org.jbpm.bpel.xml.BpelReader.read(BpelReader.java:200)
      at org.jbpm.bpel.par.BpelArchiveParser.readFromArchive(BpelArchiveParser.java:48)
      at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:81)
      at org.jbpm.bpel.web.ProcessDeployServlet.doGet(ProcessDeployServlet.java:50)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jaxen.XPathSyntaxException: Unexpected ''
      at org.jaxen.BaseXPath.<init>(BaseXPath.java:118)
      at org.jaxen.BaseXPath.<init>(BaseXPath.java:139)
      at org.jbpm.bpel.sublang.xpath.XPathEvaluator.<init>(XPathEvaluator.java:51)
      at org.jbpm.bpel.sublang.xpath.XPathExpressionEvaluator.<init>(XPathExpressionEvaluator.java:62)
      at org.jbpm.bpel.sublang.xpath.XPathEvaluatorFactory.createExpressionEvaluator(XPathEvaluatorFactory.java:97)
      at org.jbpm.bpel.sublang.xpath.XPathEvaluatorFactory.createEvaluator(XPathEvaluatorFactory.java:59)
      ... 38 more
      Caused by: class org.jaxen.saxpath.XPathSyntaxException: : 0: Unexpected ''
      at org.jaxen.saxpath.base.XPathReader.createSyntaxException(XPathReader.java:1084)
      at org.jaxen.saxpath.base.XPathReader.pathExpr(XPathReader.java:190)
      at org.jaxen.saxpath.base.XPathReader.unionExpr(XPathReader.java:1006)
      at org.jaxen.saxpath.base.XPathReader.unaryExpr(XPathReader.java:994)
      at org.jaxen.saxpath.base.XPathReader.multiplicativeExpr(XPathReader.java:943)
      at org.jaxen.saxpath.base.XPathReader.additiveExpr(XPathReader.java:913)
      at org.jaxen.saxpath.base.XPathReader.relationalExpr(XPathReader.java:860)
      at org.jaxen.saxpath.base.XPathReader.equalityExpr(XPathReader.java:829)
      at org.jaxen.saxpath.base.XPathReader.andExpr(XPathReader.java:809)
      at org.jaxen.saxpath.base.XPathReader.orExpr(XPathReader.java:787)
      at org.jaxen.saxpath.base.XPathReader.expr(XPathReader.java:780)
      at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:100)
      at org.jaxen.BaseXPath.<init>(BaseXPath.java:113)
      ... 43 more

      If I remove the literal statement, it works well.
      The question is:
      Does the jbpm-bpel-1.1.Beta3 extension supports the literal assignments?
      Is there any error in my code?
      Thank you and sorry about the long post

      Agus

        • 1. Re: BPEl Problem: Assign with Literal values
          kukeltje

          you have a nested literal. Is that intentional (I'm no bpel expert)

          • 2. Re: BPEl Problem: Assign with Literal values

            Is not intentional, is due to the eclipse designer.
            I have tried with only a literal an I have the same error.
            Thanks for your answer kukeltje

            • 3. Re: BPEl Problem: Assign with Literal values
              aguizar

              Agus,

              The literal variant is definitely supported. Strangely, the error you posted is not reported on the from element but on the to element:

              /bpws:process/bpws:sequence/bpws:assign/bpws:copy/bpws:to

              Plus, the expression text is empty:
              expression=org.jbpm.bpel.sublang.def.Expression@11c2812[text=,id=0]

              Which leads me to think that the document you posted is not exactly what you deployed.

              Anyway, for string literals, the expression variant of from can produce the same result as the literal variant as illustrated below.
              <bpws:assign>
               <bpws:copy>
               <bpws:from>'URL not found'</bpws:from>
               <bpws:to>$output.response/tns:Country</bpws:to>
               </bpws:copy>
              </bpws:assign>

              In the Eclipse designer, you just have to select the expression variant and type the string literal in the expression box.

              • 4. Re: BPEl Problem: Assign with Literal values

                Thank you Alex, it works well right now. The problem was that I'm using the "Fixed Value" variant instead the "Expresion Variant" in the Eclipse Designer.

                Agus