Atomic batch of webservices calls

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Atomic batch of webservices calls

Rajesh Mallah
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.
Reply | Threaded
Open this post in threaded view
|

Re: Atomic batch of webservices calls

Victor Hernadez
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 <[hidden email]>
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.
>
Reply | Threaded
Open this post in threaded view
|

Re: Atomic batch of webservices calls

Jacques Le Roux
Administrator
In reply to this post by Rajesh Mallah
Hi Rajesh,

I'm not quite sure of you need. You mean that you want to dynamically modify OFBiz exported services in XML-RPC format using OFBiz data?

By "modify" I mean modify services behaviours.

I guess you know that you can't use a modified service without restarting OFBiz.

Please clarify, thanks

Jacques

Le 10/11/2019 à 11:45, Rajesh Mallah a écrit :

> 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.
>
Reply | Threaded
Open this post in threaded view
|

Re: Atomic batch of webservices calls

Rajesh Mallah
In reply to this post by Victor Hernadez
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 <
[hidden email]> 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 <[hidden email]>
> 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.
> >
>