Ola,
I'm cc'ing this to [email protected]; happy to answer questions but prefer that
they go on the users list where possible.
Thx
Dan


On 12 March 2014 16:43, Tomoloju, Ola <[email protected]> wrote:

>
>
> Please, advice on the best practice rule:
>
>
>
> CREATE - @ActionSemantics(Of.*IDEMPOTENT*)?
>

generally this would be non-idempotent ... calling create and then create
again will give you two objects, not one.

Of course, it is possible an action that acts like an "upsert", (if exists
update else insert), in which case it would be idempotent.  The migration
API that Estatio uses was written this way [1].





>   READ - @ActionSemantics(Of.*SAFE*)?
>

yes.




>  UPDATE - @ActionSemantics(Of.*IDEMPOTENT*) ?
>

depends ... more likely to be non-idempotent.

If its a simple update, then yes, idempotent.

But what about an action that transitions an object through its lifecycle
(New -> Open -> Resolved -> Closed); invoking that action twice would move
the object forward two states, not one.




>   DELETE -  @ActionSemantics(Of.*IDEMPOTENT*)?
>
>
generally yes.



HTH

Dan

[1]
https://github.com/estatio/estatio/blob/master/dom/src/main/java/org/estatio/api/Api.java#L238

Reply via email to