You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Rajesh Mallah <ma...@gmail.com> on 2019/12/28 18:06:55 UTC

Re: Atomic batch of webservices calls

Hi Victor ,


Sorry for the late reply.

Do you really think it is possible to achieve that?

it is not necessary that all the webservices call be done together.
The subsequent webservice calls may depend on result of previous
ones. Eg consider below pseudocode:

At RPC Client Side:

TXN_UUID = BEGIN TXN;

res = createPartyGroup ( groupName => "foo");
partyId = res.partyId ;
res = createPostalAddress ( address1 => "bar street");
cmId = res.contactMechanismId;
res = createPartyContactMechanism(partyId => partyId , contactMechId=>
cmId);
COMMIT TXN (UUID => TXN_UUID) ;

say any intermediate step fails , then the RPC client sends instruction
to rollback TXN_UUID and expected result is to rollback all changes that
were done in ofbiz side since the beginning of TXN TXN_UUID.

If something like this can be done it opens a host of integration
possibilities
with diverse programming languages and environments.

sincerely
Rajesh.


On Sun, Nov 10, 2019 at 8:50 PM Victor Hernández <
victor007.hernandez@gmail.com> wrote:

> Hi Rajesh,
>
> I believe that an option that you might want to consider is to use a proxy
> like approach intended to create a custom service at OFBiz side which would
> call the target services as a part of an atomic transaction, I know that
> could not fit for all use cases anyways could work for you.
>
> Kind Regards,
> Victor
>
> On Sun, Nov 10, 2019 at 4:46 AM Rajesh Mallah <ma...@gmail.com>
> wrote:
>
> > Hi ,
> >
> > Is it possible to execute a set of  data modifying webservices using
> > XML-RPC
> > in a all-or-none manner.
> >
> > How complicated will it be to modify the code / or develop new code
> > to have such a feature.
> >
> > regds
> > mallah.
> >
>