OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1114) If-Then-Else in $batch requests


    [ https://issues.oasis-open.org/browse/ODATA-1114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=67554#comment-67554 ] 

Michael Pizzo commented on ODATA-1114:
--------------------------------------

We should consider this in the broader context of supporting if-then-else (or something similar to a SQL case statement) within a query as well.

In the above scenario, it appears that statement 2a would be dependent upon response code (or success/failure) of statement 1, not on the return value from the statement 1 (unless statement 1 was an action that returned true/false). 

> If-Then-Else in $batch requests
> -------------------------------
>
>                 Key: ODATA-1114
>                 URL: https://issues.oasis-open.org/browse/ODATA-1114
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: JSON Format
>    Affects Versions: V4.01_CSD02
>            Reporter: Ralf Handl
>             Fix For: V4.01_CS01
>
>
> Add an If-Then-Else construct to batch requests that allows executing a sequence of requests depending on a condition, typically the HTTP status code of a preceding request
> Example 1:
> 1. Book specific seat for a sports event
> 2. if booking failed
>    2.a. book best-match seat for a sports event
>    endif
> Example 2:
> 1. Modify shopping cart
> 2. Convert shopping cart to purchase order (bound action)
> 3. if success
>    3.a. GET newly created purchase order
>    else
>    3.b. GET modified shopping cart
>    endif



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]