Writing a Simple-service for simple-methods

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

Writing a Simple-service for simple-methods

Rahul Utkoor
Hello,
I just started working on ofbiz. As a part of my work I was supposed to
write a service for "*create customer*" functionality in Party application.
I wonder why there are no services written for some of the simple-method
events.
And also why there is no java service written for "*create customer*" while
there is java service for "*create Person*"?
And what are the complexities involved in defining a service for "*create
customer*" simple-method?
Please help me by pointing in the right direction.
--

*Thanks & Regards,*
*Rahul.*
Reply | Threaded
Open this post in threaded view
|

Re: Writing a Simple-service for simple-methods

Jacques Le Roux
Administrator
Hi Rahul,

Your message has been moderated.

Please subscribe to the *user* ML for such questions and then use your email client
See also why here http://ofbiz.apache.org/mailing-lists.html

You will get a better support , it's more fair to share with everybody  and people can answer you directly on the ML rather than directly to you
The wider the audience the better the answers you might get

Also it's more work for moderators who have to accept your messages as long as you have not subscribed.
I'll personally no longer accept them (other moderators still could)

Thanks

Jacques

Le 22/01/2019 à 13:02, Rahul Utkoor a écrit :

> Hello,
> I just started working on ofbiz. As a part of my work I was supposed to
> write a service for "*create customer*" functionality in Party application.
> I wonder why there are no services written for some of the simple-method
> events.
> And also why there is no java service written for "*create customer*" while
> there is java service for "*create Person*"?
> And what are the complexities involved in defining a service for "*create
> customer*" simple-method?
> Please help me by pointing in the right direction.

Reply | Threaded
Open this post in threaded view
|

Re: Writing a Simple-service for simple-methods

Pierre Smits-3
In reply to this post by Rahul Utkoor
Hi Rahul,

A customer is a party with the role 'CUSTOMER'. Persisting the captured
customer details can be done through the service
'createPartyGroupRoleAndContactMechs' in the party component. This is a
so-called simple service.

Best regards,

Pierre Smits

*Apache Trafodion <https://trafodion.apache.org>, Vice President*
*Apache Directory <https://directory.apache.org>, PMC Member*
Apache Incubator <https://incubator.apache.org>, committer
*Apache OFBiz <https://ofbiz.apache.org>, contributor (without privileges)
since 2008*
Apache Steve <https://steve.apache.org>, committer


On Sat, Jan 26, 2019 at 8:49 AM Rahul Utkoor
<[hidden email]> wrote:

> Hello,
> I just started working on ofbiz. As a part of my work I was supposed to
> write a service for "*create customer*" functionality in Party application.
> I wonder why there are no services written for some of the simple-method
> events.
> And also why there is no java service written for "*create customer*" while
> there is java service for "*create Person*"?
> And what are the complexities involved in defining a service for "*create
> customer*" simple-method?
> Please help me by pointing in the right direction.
> --
>
> *Thanks & Regards,*
> *Rahul.*
>
Reply | Threaded
Open this post in threaded view
|

Re: Writing a Simple-service for simple-methods

taher
In reply to this post by Rahul Utkoor
Hi Rahul,

Generally it is recommend to avoid simple services as they are deprecated
and being phased out. You might want to use Java, groovy or entity-auto
services instead.

On Sat, Jan 26, 2019, 10:49 AM Rahul Utkoor
<[hidden email] wrote:

> Hello,
> I just started working on ofbiz. As a part of my work I was supposed to
> write a service for "*create customer*" functionality in Party application.
> I wonder why there are no services written for some of the simple-method
> events.
> And also why there is no java service written for "*create customer*" while
> there is java service for "*create Person*"?
> And what are the complexities involved in defining a service for "*create
> customer*" simple-method?
> Please help me by pointing in the right direction.
> --
>
> *Thanks & Regards,*
> *Rahul.*
>
Reply | Threaded
Open this post in threaded view
|

Re: Writing a Simple-service for simple-methods

Swapnil Mane
Hello Rahul,

As Taher explained, use of mini lang (simple service) is deprecated in
OFBiz [1].

To answer your question,
==============
And also why there is no java service written for "*create customer*" while
there is java service for "*create Person*"?
And what are the complexities involved in defining a service for "*create
customer*" simple-method?
==============

There was no need to have 'create customer' service because "A customer is
a Person (or Party Group) in a Customer Role".
So, to create a customer, you can use two services  - createPerson (or
createPartyGroup) and createPartyRole (add the party to CUSTOMER role).
In a similar fashion, you can create Supplier, Dealer etc. You don't need a
separate service of them.
There were no complexities in defining "create customer" service, but we
don't need it since we have various generic services which support the
requirement.

[1]
https://lists.apache.org/thread.html/253b41060a295b8ab68bc78763cc129fc74b712cf776f8716022097f@%3Cdev.ofbiz.apache.org%3E

- Best Regards,
Swapnil M Mane
hotwax.co

On Sat, Jan 26, 2019 at 2:42 PM Taher Alkhateeb <[hidden email]>
wrote:

> Hi Rahul,
>
> Generally it is recommend to avoid simple services as they are deprecated
> and being phased out. You might want to use Java, groovy or entity-auto
> services instead.
>
> On Sat, Jan 26, 2019, 10:49 AM Rahul Utkoor
> <[hidden email] wrote:
>
> > Hello,
> > I just started working on ofbiz. As a part of my work I was supposed to
> > write a service for "*create customer*" functionality in Party
> application.
> > I wonder why there are no services written for some of the simple-method
> > events.
> > And also why there is no java service written for "*create customer*"
> while
> > there is java service for "*create Person*"?
> > And what are the complexities involved in defining a service for "*create
> > customer*" simple-method?
> > Please help me by pointing in the right direction.
> > --
> >
> > *Thanks & Regards,*
> > *Rahul.*
> >
>