You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Karthick Sankarachary (JIRA)" <ji...@apache.org> on 2008/09/12 22:59:44 UTC

[jira] Created: (ODE-371) Auto Complete Copy Destination (L-Value)

Auto Complete Copy Destination (L-Value)
----------------------------------------

                 Key: ODE-371
                 URL: https://issues.apache.org/jira/browse/ODE-371
             Project: ODE
          Issue Type: New Feature
    Affects Versions: 1.2
         Environment: platform-independent
            Reporter: Karthick Sankarachary
             Fix For: 1.3


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthick Sankarachary reopened ODE-371:
---------------------------------------

      Assignee: Karthick Sankarachary

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthick Sankarachary updated ODE-371:
--------------------------------------

    Attachment: auto-complete-copy-for-branch.txt

The revised patch (a) propogates the "insertMissingToData" property through OLValueExpression instead of the EvaluationContext and (b) defines a new feature-specific test case.

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>             Fix For: 1.3
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthick Sankarachary resolved ODE-371.
---------------------------------------

    Resolution: Fixed

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthick Sankarachary updated ODE-371:
--------------------------------------

    Attachment:     (was: auto-complete-copy-for-branch.txt)

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>             Fix For: 1.3
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthick Sankarachary closed ODE-371.
-------------------------------------

    Resolution: Fixed

The patch has been applied on the trunk at revision 709057.

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>             Fix For: 1.3
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Matthieu Riou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631490#action_12631490 ] 

Matthieu Riou commented on ODE-371:
-----------------------------------

A couple of observations about the patch:

 * The information about whether we're in an insertMissingToData should be added to the OExpression of the lvalue instead of adding this callback on EvaluationContext for runtime access. It's only used in a particular case of evaluation so you end up with several dummy implementations of isInsertMissingData for no real good reasons. It's not really the role of this interface.

* Could you create a separate test case instead of reusing TestSubTreeAssign.bpel yet again? I don't mind you cloning it and removing the non relevant parts, it's just that more focused test cases are easier for diagnostic and to maintain, especially when they test extensions.

Thanks!

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>             Fix For: 1.3
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643657#action_12643657 ] 

Karthick Sankarachary commented on ODE-371:
-------------------------------------------

The patch has been applied on the 1.X branch at revision 709010.

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>             Fix For: 1.3
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthick Sankarachary updated ODE-371:
--------------------------------------

    Attachment: auto-complete-copy-for-branch.txt

> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>             Fix For: 1.3
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (ODE-371) Auto Complete Copy Destination (L-Value)

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthick Sankarachary closed ODE-371.
-------------------------------------


> Auto Complete Copy Destination (L-Value)
> ----------------------------------------
>
>                 Key: ODE-371
>                 URL: https://issues.apache.org/jira/browse/ODE-371
>             Project: ODE
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: platform-independent
>            Reporter: Karthick Sankarachary
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3.1
>
>         Attachments: auto-complete-copy-for-branch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.