Uploaded image for project: 'ODE'
  1. ODE
  2. ODE-371

Auto Complete Copy Destination (L-Value)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.3.2
    • None
    • None
    • platform-independent

    Description

      A lot of times, users expect the <copy> operation in a WS-BPEL assign activity to behave such that the path specified by the destination ("to-spec") is automatically created, if it doesn't already exist. By default, if the to-spec used within a <copy> operation does not select exactly one XML information item during execution, then the standard fault bpel:selectionFailure is thrown (as mandated by the spec).

      To override this default behavior, we introduce a insertMissingToData attribute in the <copy> operation, which if it is set to "yes", will instruct the runtime to complete the (XPath) L-value specified by the to-spec, if no items were selected. For the sake of simplicity, we will complete the to-spec if and only if:
      a) It's a path expression whose steps are separated by "/", and
      b) Its steps have an axis, which is either "child" or "attribute", and
      c) Its steps have no following predicates, and
      d) Its steps test the name of a node, without the use of wildcards.

      Formally, the grammar of the to-spec, for which auto-complete is enabled, may be defined in terms of these productions:
      PathExpr ::= ("/" RelativePathExpr?) | RelativePathExpr
      RelativePathExpr ::= ForwardStep (("/" ) ForwardStep)*
      ForwardStep ::= (ForwardAxis QName) | AbbrevForwardStep
      AbbrevForwardStep ::= "@"? QName
      ForwardAxis ::= ("child" "::") | ("attribute" "::")

      The example below illustrates the use of the insertMissingToData attribute. Let's say that the variable "response" is uninitialized. In that case, the first <copy> operation will fail, whereas the second one will succeed.

      <copy>
      <from>$request.requestMessageData/typeIndicators/types:indicatorTwo</from>
      <to>$response/typeIndicators/types:indicatorTwo</to>
      </copy>

      <copy insertMissingToData="yes">
      <from>$request.requestMessageData/typeIndicators/types:indicatorTwo</from>
      <to>$response/typeIndicators/child::types:indicatorTwo</to>
      </copy>

      Best Regards,
      Karthick Sankarachary

      Attachments

        1. auto-complete-copy-for-branch.txt
          33 kB
          Karthick Sankarachary

        Activity

          People

            karthick Karthick Sankarachary
            karthick Karthick Sankarachary
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified