You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Sach Shah <za...@gmail.com> on 2017/07/13 22:31:55 UTC

Creating an accounting transaction from a plugin?

Hi All,

I am just starting out in OfBiz and have been going through the
documentation and mailing list here.

I am at the point where I was able to add fields to the AcctgTrans entity
using a plugin.  Now, I want to do two things:

1. Expose a few different RESTful web services to a client.  I saw the the
Apache Wink technique is deprecated.  Is there a recommended way of doing
this?

2. When a request is received, I need to do things like creating a new
invoice/payment, creating an accounting transaction to simply move money
between accounts, etc.  I know I can take those actions from the OfBiz UI.
However, how do I do so programmatically from a plugin?

Thank you for your help,
Sachin.

Re: Creating an accounting transaction from a plugin?

Posted by Sach Shah <za...@gmail.com>.
Thanks a lot!  I will try it now.

On Fri, Jul 14, 2017 at 9:33 AM Aishwary Shrivastava <
aishwary.shrivastava@hotwaxsystems.com> wrote:

> Invoking services using Java is pretty easy in ofbiz,
> all you need to do is import org.ofbiz.service.DispatchContext in your
> java class,
> it has two methods for invoking services i.e "runSync" and "runAsync".
> You can refer OfBiz's code only to see how things work,
> like in PartyServices.java, InventoryServices.java etc.
>
> HTH
>
> Thanks and Regards,
> Aishwary Shrivastava
> Enterprise Software Engineer
> HotWax Systems <http://www.hotwaxsystems.com/>
>
> On Fri, Jul 14, 2017 at 7:38 PM, Sach Shah <za...@gmail.com> wrote:
>
>> Thank you Aishwary.  I will take a look at RestEasy.  Do you know where I
>> can look in the manual for how to invoke services through Java code?
>>
>> On Thu, Jul 13, 2017 at 11:22 PM Aishwary Shrivastava <
>> aishwary.shrivastava@hotwaxsystems.com> wrote:
>>
>>> Hello, Sachin.
>>>
>>> In this mail thread <http://markmail.org/message/w3vagy5u7xw7wsio>,
>>> Mandeep answered about  how to integrate OFBiz-Services
>>> into some frontend, this might help you with the first thing.
>>>
>>> Just in case you missed it while going through the mailing list here :)
>>>
>>> Thanks and Regards,
>>> Aishwary Shrivastava
>>> Enterprise Software Engineer
>>> HotWax Systems <http://www.hotwaxsystems.com/>
>>>
>>> On Fri, Jul 14, 2017 at 4:01 AM, Sach Shah <za...@gmail.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I am just starting out in OfBiz and have been going through the
>>>> documentation and mailing list here.
>>>>
>>>> I am at the point where I was able to add fields to the AcctgTrans
>>>> entity
>>>> using a plugin.  Now, I want to do two things:
>>>>
>>>> 1. Expose a few different RESTful web services to a client.  I saw the
>>>> the
>>>> Apache Wink technique is deprecated.  Is there a recommended way of
>>>> doing
>>>> this?
>>>>
>>>> 2. When a request is received, I need to do things like creating a new
>>>> invoice/payment, creating an accounting transaction to simply move money
>>>> between accounts, etc.  I know I can take those actions from the OfBiz
>>>> UI.
>>>> However, how do I do so programmatically from a plugin?
>>>>
>>>> Thank you for your help,
>>>> Sachin.
>>>>
>>>
>>>
>

Re: Creating an accounting transaction from a plugin?

Posted by Aishwary Shrivastava <ai...@hotwaxsystems.com>.
Invoking services using Java is pretty easy in ofbiz,
all you need to do is import org.ofbiz.service.DispatchContext in your java
class,
it has two methods for invoking services i.e "runSync" and "runAsync".
You can refer OfBiz's code only to see how things work,
like in PartyServices.java, InventoryServices.java etc.

HTH

Thanks and Regards,
Aishwary Shrivastava
Enterprise Software Engineer
HotWax Systems <http://www.hotwaxsystems.com/>

On Fri, Jul 14, 2017 at 7:38 PM, Sach Shah <za...@gmail.com> wrote:

> Thank you Aishwary.  I will take a look at RestEasy.  Do you know where I
> can look in the manual for how to invoke services through Java code?
>
> On Thu, Jul 13, 2017 at 11:22 PM Aishwary Shrivastava <
> aishwary.shrivastava@hotwaxsystems.com> wrote:
>
>> Hello, Sachin.
>>
>> In this mail thread <http://markmail.org/message/w3vagy5u7xw7wsio>,
>> Mandeep answered about  how to integrate OFBiz-Services
>> into some frontend, this might help you with the first thing.
>>
>> Just in case you missed it while going through the mailing list here :)
>>
>> Thanks and Regards,
>> Aishwary Shrivastava
>> Enterprise Software Engineer
>> HotWax Systems <http://www.hotwaxsystems.com/>
>>
>> On Fri, Jul 14, 2017 at 4:01 AM, Sach Shah <za...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I am just starting out in OfBiz and have been going through the
>>> documentation and mailing list here.
>>>
>>> I am at the point where I was able to add fields to the AcctgTrans entity
>>> using a plugin.  Now, I want to do two things:
>>>
>>> 1. Expose a few different RESTful web services to a client.  I saw the
>>> the
>>> Apache Wink technique is deprecated.  Is there a recommended way of doing
>>> this?
>>>
>>> 2. When a request is received, I need to do things like creating a new
>>> invoice/payment, creating an accounting transaction to simply move money
>>> between accounts, etc.  I know I can take those actions from the OfBiz
>>> UI.
>>> However, how do I do so programmatically from a plugin?
>>>
>>> Thank you for your help,
>>> Sachin.
>>>
>>
>>

Re: Creating an accounting transaction from a plugin?

Posted by Sach Shah <za...@gmail.com>.
Thank you Aishwary.  I will take a look at RestEasy.  Do you know where I
can look in the manual for how to invoke services through Java code?

On Thu, Jul 13, 2017 at 11:22 PM Aishwary Shrivastava <
aishwary.shrivastava@hotwaxsystems.com> wrote:

> Hello, Sachin.
>
> In this mail thread <http://markmail.org/message/w3vagy5u7xw7wsio>,
> Mandeep answered about  how to integrate OFBiz-Services
> into some frontend, this might help you with the first thing.
>
> Just in case you missed it while going through the mailing list here :)
>
> Thanks and Regards,
> Aishwary Shrivastava
> Enterprise Software Engineer
> HotWax Systems <http://www.hotwaxsystems.com/>
>
> On Fri, Jul 14, 2017 at 4:01 AM, Sach Shah <za...@gmail.com> wrote:
>
>> Hi All,
>>
>> I am just starting out in OfBiz and have been going through the
>> documentation and mailing list here.
>>
>> I am at the point where I was able to add fields to the AcctgTrans entity
>> using a plugin.  Now, I want to do two things:
>>
>> 1. Expose a few different RESTful web services to a client.  I saw the the
>> Apache Wink technique is deprecated.  Is there a recommended way of doing
>> this?
>>
>> 2. When a request is received, I need to do things like creating a new
>> invoice/payment, creating an accounting transaction to simply move money
>> between accounts, etc.  I know I can take those actions from the OfBiz UI.
>> However, how do I do so programmatically from a plugin?
>>
>> Thank you for your help,
>> Sachin.
>>
>
>

Re: Creating an accounting transaction from a plugin?

Posted by Aishwary Shrivastava <ai...@hotwaxsystems.com>.
Hello, Sachin.

In this mail thread <http://markmail.org/message/w3vagy5u7xw7wsio>, Mandeep
answered about  how to integrate OFBiz-Services
into some frontend, this might help you with the first thing.

Just in case you missed it while going through the mailing list here :)

Thanks and Regards,
Aishwary Shrivastava
Enterprise Software Engineer
HotWax Systems <http://www.hotwaxsystems.com/>

On Fri, Jul 14, 2017 at 4:01 AM, Sach Shah <za...@gmail.com> wrote:

> Hi All,
>
> I am just starting out in OfBiz and have been going through the
> documentation and mailing list here.
>
> I am at the point where I was able to add fields to the AcctgTrans entity
> using a plugin.  Now, I want to do two things:
>
> 1. Expose a few different RESTful web services to a client.  I saw the the
> Apache Wink technique is deprecated.  Is there a recommended way of doing
> this?
>
> 2. When a request is received, I need to do things like creating a new
> invoice/payment, creating an accounting transaction to simply move money
> between accounts, etc.  I know I can take those actions from the OfBiz UI.
> However, how do I do so programmatically from a plugin?
>
> Thank you for your help,
> Sachin.
>