You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Rahul Utkoor <cs...@iith.ac.in.INVALID> on 2019/01/22 12:02:45 UTC

Writing a Simple-service for simple-methods

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.*

Re: Writing a Simple-service for simple-methods

Posted by Swapnil Mane <sw...@hotwaxsystems.com>.
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 <sl...@gmail.com>
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
> <cs14btech11037@iith.ac.in.invalid 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.*
> >
>

Re: Writing a Simple-service for simple-methods

Posted by Taher Alkhateeb <sl...@gmail.com>.
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
<cs14btech11037@iith.ac.in.invalid 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.*
>

Re: Writing a Simple-service for simple-methods

Posted by Pierre Smits <pi...@apache.org>.
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
<cs...@iith.ac.in.invalid> 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.*
>

Re: Writing a Simple-service for simple-methods

Posted by Jacques Le Roux <ja...@les7arts.com>.
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.