You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by prasanthi_ofbiz <pr...@tcs.com> on 2010/05/12 16:20:26 UTC

calling multiple services in ofbiz

Hi
         Is it possible to call multiple services at a time?? Like while
adding a transaction of Financial Account, I want to call  two services On
click  of "Add" button of Edit Financial Account Transaction. The two
services are  EditFinAccountTrans, for Addition of financial transaction and
createAcctgTrans, for Creattion of an Accounting Transaction.

Does it possible??

-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2196098.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by S K Pradeep kumar <s....@gmail.com>.
Hi Prasanthi,

You can create a groups for example: createCreditCardAndAddress

With regards,
S K Pradeep kumar,



On Wed, May 12, 2010 at 7:50 PM, prasanthi_ofbiz <
prasanthi.sreeramjammisetty@tcs.com> wrote:

>
> Hi
>         Is it possible to call multiple services at a time?? Like while
> adding a transaction of Financial Account, I want to call  two services On
> click  of "Add" button of Edit Financial Account Transaction. The two
> services are  EditFinAccountTrans, for Addition of financial transaction
> and
> createAcctgTrans, for Creattion of an Accounting Transaction.
>
> Does it possible??
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2196098.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: calling multiple services in ofbiz

Posted by Kranti Agrawal <kr...@gmail.com>.
Did you mean a conditional call of the accounting transactions - like if
there is a account transaction already present, then call the Edit service,
else call the create service?

If Yes, try 'alt-target' option in the form from where these services will
be invoked

Regards,
Kranti Agrawal
Student, IIIT Bangalore
krantiagrawal.blogspot.com


On Wed, May 12, 2010 at 7:50 PM, prasanthi_ofbiz <
prasanthi.sreeramjammisetty@tcs.com> wrote:

>
> Hi
>         Is it possible to call multiple services at a time?? Like while
> adding a transaction of Financial Account, I want to call  two services On
> click  of "Add" button of Edit Financial Account Transaction. The two
> services are  EditFinAccountTrans, for Addition of financial transaction
> and
> createAcctgTrans, for Creattion of an Accounting Transaction.
>
> Does it possible??
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2196098.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
hi Prasanthi,

I suggest you trace the control's flow and look for examples OOTB, it's 
really hard to find a problem this way.

-- 
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


prasanthi_ofbiz wrote:
> Hi vani,
> There is no error,but its navigating to that screen without the forms. 
> Regards ,
> Prasanthi
>
>   

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi vani,
There is no error,but its navigating to that screen without the forms. 
Regards ,
Prasanthi

-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2216303.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by lu...@hotmail.com.
Thanks

--------------------------------------------------
From: "Atul Vani" <at...@hotwaxmedia.com>
Sent: Friday, May 14, 2010 1:35 PM
To: <us...@ofbiz.apache.org>
Subject: Re: calling multiple services in ofbiz

> Hi Prasanthi,
> 
> If its an error in the service then you can verify it in server logs.
> 
> -- 
> Thanks & Regards
> Atul Vani
> Jr. Software Developer
> HotWax Media Pvt. Ltd.
> http://www.hotwaxmedia.com/
> 
> 
> prasanthi_ofbiz wrote:
>> Hi Vani,
>> Inside the EditAcctgTrans there was some conditions for displaying the forms
>> like
>> 1.<not><if-empty field="acctgTransId"/></not>
>> 2.  <if-compare field="acctgTrans.isPosted" operator="equals"  value="Y"/>
>>
>>        I have one double like while calling 2nd service from the 1st service
>> i have written code like
>>          <make-value entity-name="AcctgTrans" value-field="newEntity1"/>
>>         <sequenced-id sequence-name="AcctgTrans"
>> field="newEntity1.acctgTransId"/>        
>>             <set from-field="newEntity1.acctgTransId"
>> field="createAcctgTransParams.acctgTransId"/>
>>             <now-timestamp field="createAcctgTransParams.transactionDate"/>
>>             <set value="N" field="createAcctgTransParams.isPosted"/>
>>             <set value="D" field="createAcctgTransParams.debitCreditFlag"/>
>>             <set value="RECEIPT"
>> field="createAcctgTransParams.acctgTransTypeId"/>
>>             <set value="ACTUAL"
>> field="createAcctgTransParams.glFiscalTypeId"/>   
>>         <call-service service-name="createAcctgTrans" 
>> in-map-name="createAcctgTransParams" include-user-login="true"/>
>>
>> I think its not able to carry out the acctgTransId and isPosted to the
>> screen thatsy empty screen is coming
>>   
> 

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi Vani,
I included the menu also still same problem. Its not navigating to Posting
Transaction Screen

Thanks & Regards,
Prasanthi
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2219668.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi vani
I tried one more thing like in the EditFinAccountTrans screen I have
included one link and given target as EditAcctgTrans then its navigating to
the posting screen but why its not working fine in my case?
Help me in this issue...

Regards,
Prasanthi


-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2220744.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
prasanthi_ofbiz wrote:
> Hi Vani,
>    I tried to include the form there it self earlier only but its giving
> rendering problem like,
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
> [component://common/widget/CommonScreens.xml#FindScreenDecorator]:
> java.lang.RuntimeException: Error rendering included form named
> [AccountingAppBar] at location [component://accounting/widget/Menus.xml]:
> java.lang.NullPointerException (Error rendering included form named
> [AccountingAppBar] at location [component://accounting/widget/Menus.xml]:
> java.lang.NullPointerException)
>
> Please let me know what is the problem
>   
hi Prasanthi,

there are three different tags

<include-menu/> <include-form/> and <include-screen/>
for including menu, form and screen

"Error rendering included form named [AccountingAppBar] at location 
[component://accounting/widget/Menus.xml]"

[AccountingAppBar] is a menu i guess and you are supposed to use 
<include-menu/> with it,

i hope that helps.

-- 
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi Vani,
   I tried to include the form there it self earlier only but its giving
rendering problem like,
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
[component://common/widget/CommonScreens.xml#FindScreenDecorator]:
java.lang.RuntimeException: Error rendering included form named
[AccountingAppBar] at location [component://accounting/widget/Menus.xml]:
java.lang.NullPointerException (Error rendering included form named
[AccountingAppBar] at location [component://accounting/widget/Menus.xml]:
java.lang.NullPointerException)

Please let me know what is the problem
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2219397.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi Vani,
If I see the view Source then the  After the AccountingAppBar is ended its
starting section and ending the section with out including any forms
The Source is like,


<!-- End Menu Widget
component://accounting/widget/Menus.xml#AccountingAppBar -->
<!-- End Section Widget  -->
<!-- End Section Widget  -->
Actually this section should include the below two forms

<!-- Begin Menu Widget
component://accounting/widget/Menus.xml#PartyTopTabBar -->
<div class="button-bar tab-bar no-clear">
<ul>
<li>
 <ul>
  <li> /accounting/control/AdminMain?organizationPartyId=10000 Setup </li>

  <li class="selected ">
/accounting/control/PartyAccountsSummary?organizationPartyId=10000
Accounting </li>
 </ul>
</li>
</ul>
 <br class="clear"/>
</div>
<!-- End Menu Widget component://accounting/widget/Menus.xml#PartyTopTabBar
-->
<!-- Begin Menu Widget
component://accounting/widget/Menus.xml#OrganizationAccountingTabBar -->
<div class="button-bar tab-bar no-clear">
<ul>
<li>
 <ul>

  <li> /accounting/control/PartyAccountsSummary?organizationPartyId=10000
Summary </li>
  <li>
/accounting/control/findGlAccountReconciliation?organizationPartyId=10000
Account Reconciliation </li>
  <li>
/accounting/control/findGlAccountReconciliations?organizationPartyId=10000
Account Reconcilled </li>
  <li class="selected ">
/accounting/control/FindAcctgTrans?organizationPartyId=10000 Accounting
Transactions </li>
  <li> /accounting/control/FindAcctgTransEntries?organizationPartyId=10000
Accounting Transactions Entries </li>
  <li> /accounting/control/TrialBalance?organizationPartyId=10000 Reports
</li>

 </ul>
</li>
</ul>
 <br class="clear"/>
</div>
<!-- End Menu Widget
component://accounting/widget/Menus.xml#OrganizationAccountingTabBar -->
<div>
 For&#58; Bhubaneswar Municipal Corporation





</div>
<!-- Begin Section Widget  -->


Regards,
Prasanthi

-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2219405.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
hi Prasanthi,

you can include a menu in a screen using <include-menu ... /> tag
if you have multiple screens that needs same menu then you can also 
create a decorator and use it in all those screens

looking at your screenshots i think you might have missed to include the 
menu
or for some reason it's not getting included, may be the conditions 
aren't fulfilled to include it.

i hope this helps...

-- 

Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


prasanthi_ofbiz wrote:
> Hi vani,
> I tried to render the page from the Financial Account Transaction screen to
> other screens in the third level menu like Menus.xml#AccountingAppBar, but
> its not able to navigate.
>
>  I think the problem is like its not able to include the submenu which will
> contain the Accounting transaction screen.
> Financial Account is in the CommonScreens.xml where as Accounting
> transaction screen is in Menu.xml
>
> Attached the screens shots of all menu description screen, and the
> navigation screen from Financial Account Transaction to Accounting
> transaction Posting screen
>
> (10:39:57 AM) Shanthi(5375): Hi vani,
> I tried to render the page from the Financial Account Transaction screen to
> other screens in the third level menu like Menus.xml#AccountingAppBar, but
> its not able to navigate.
>
>  I think the problem is like its not able to include the submenu which will
> contain the Accounting transaction screen.
> Financial Account is in the CommonScreens.xml where as Accounting
> transaction screen is in Menu.xml
>
> Attached the screens shots of all menu description screen, and the
> navigation screen from Financial Account Transaction to Accounting
> transaction Posting screen
> http://n4.nabble.com/file/n2219096/menuDescription.png menuDescription.png 
>
>
> http://n4.nabble.com/file/n2219096/navigationScreen.png navigationScreen.png 

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi vani,
I tried to render the page from the Financial Account Transaction screen to
other screens in the third level menu like Menus.xml#AccountingAppBar, but
its not able to navigate.

 I think the problem is like its not able to include the submenu which will
contain the Accounting transaction screen.
Financial Account is in the CommonScreens.xml where as Accounting
transaction screen is in Menu.xml

Attached the screens shots of all menu description screen, and the
navigation screen from Financial Account Transaction to Accounting
transaction Posting screen

(10:39:57 AM) Shanthi(5375): Hi vani,
I tried to render the page from the Financial Account Transaction screen to
other screens in the third level menu like Menus.xml#AccountingAppBar, but
its not able to navigate.

 I think the problem is like its not able to include the submenu which will
contain the Accounting transaction screen.
Financial Account is in the CommonScreens.xml where as Accounting
transaction screen is in Menu.xml

Attached the screens shots of all menu description screen, and the
navigation screen from Financial Account Transaction to Accounting
transaction Posting screen
http://n4.nabble.com/file/n2219096/menuDescription.png menuDescription.png 


http://n4.nabble.com/file/n2219096/navigationScreen.png navigationScreen.png 
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2219096.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
hi Prasanthi,

i didn't get whats the problem,
but if you want to use out parameters of the service being called then 
you will have to do it like this

<call-service ... >
   <result-to-field ... />
   <result-to-result ... />
</call-service>

-- 
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


prasanthi_ofbiz wrote:
> hi vani,
>
> If I call createAcctgTrans service from the normal flow its generating one
> acctgTransId  and this id is  to carrying forward where as if I call it from
> createFinAccountTrans service its not carrying the generated id so its
> giving a info message in the logger like
>
> 2010-05-14 15:19:41,972 (http-0.0.0.0-7443-2) [  
> PrimaryKeyFinder.java:141:INFO ] Returning null because found incomplete
> primary key in find:
> [GenericEntity:AcctgTransEntry][acctgTransEntrySeqId,null()][acctgTransId,null()]
>
> If createAcctgTrans service called from the normal flow its giving info
> message in the log like
> PrimaryKeyFinder.java:141:INFO ] Returning null because found incomplete
> primary key in find:
> [GenericEntity:AcctgTransEntry][acctgTransEntrySeqId,null()][acctgTransId,10630(java.lang.String)]
>
> Is this a problem????
> Please tell me how to pass it at that level
>   


Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
hi vani,

If I call createAcctgTrans service from the normal flow its generating one
acctgTransId  and this id is  to carrying forward where as if I call it from
createFinAccountTrans service its not carrying the generated id so its
giving a info message in the logger like

2010-05-14 15:19:41,972 (http-0.0.0.0-7443-2) [  
PrimaryKeyFinder.java:141:INFO ] Returning null because found incomplete
primary key in find:
[GenericEntity:AcctgTransEntry][acctgTransEntrySeqId,null()][acctgTransId,null()]

If createAcctgTrans service called from the normal flow its giving info
message in the log like
PrimaryKeyFinder.java:141:INFO ] Returning null because found incomplete
primary key in find:
[GenericEntity:AcctgTransEntry][acctgTransEntrySeqId,null()][acctgTransId,10630(java.lang.String)]

Is this a problem????
Please tell me how to pass it at that level
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2216445.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
Hi Prasanthi,

If its an error in the service then you can verify it in server logs.

-- 
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


prasanthi_ofbiz wrote:
> Hi Vani,
> Inside the EditAcctgTrans there was some conditions for displaying the forms
> like
> 1.<not><if-empty field="acctgTransId"/></not>
> 2.  <if-compare field="acctgTrans.isPosted" operator="equals"  value="Y"/>
>
>        I have one double like while calling 2nd service from the 1st service
> i have written code like
>          <make-value entity-name="AcctgTrans" value-field="newEntity1"/>
>         <sequenced-id sequence-name="AcctgTrans"
> field="newEntity1.acctgTransId"/>        
>             <set from-field="newEntity1.acctgTransId"
> field="createAcctgTransParams.acctgTransId"/>
>             <now-timestamp field="createAcctgTransParams.transactionDate"/>
>             <set value="N" field="createAcctgTransParams.isPosted"/>
>             <set value="D" field="createAcctgTransParams.debitCreditFlag"/>
>             <set value="RECEIPT"
> field="createAcctgTransParams.acctgTransTypeId"/>
>             <set value="ACTUAL"
> field="createAcctgTransParams.glFiscalTypeId"/>   
>         <call-service service-name="createAcctgTrans" 
> in-map-name="createAcctgTransParams" include-user-login="true"/>
>
> I think its not able to carry out the acctgTransId and isPosted to the
> screen thatsy empty screen is coming
>   

Re: calling multiple services in ofbiz

Posted by lu...@hotmail.com.
Thanks

--------------------------------------------------
From: <lu...@hotmail.com>
Sent: Friday, May 14, 2010 1:12 PM
To: <us...@ofbiz.apache.org>
Subject: Re: calling multiple services in ofbiz

> Thanks
> 
> --------------------------------------------------
> From: "prasanthi_ofbiz" <pr...@tcs.com>
> Sent: Friday, May 14, 2010 1:06 PM
> To: <us...@ofbiz.apache.org>
> Subject: Re: calling multiple services in ofbiz
> 
>> 
>> Hi Vani,
>> Inside the EditAcctgTrans there was some conditions for displaying the forms
>> like
>> 1.<not><if-empty field="acctgTransId"/></not>
>> 2.  <if-compare field="acctgTrans.isPosted" operator="equals"  value="Y"/>
>> 
>>       I have one double like while calling 2nd service from the 1st service
>> i have written code like
>>         <make-value entity-name="AcctgTrans" value-field="newEntity1"/>
>>        <sequenced-id sequence-name="AcctgTrans"
>> field="newEntity1.acctgTransId"/>        
>>            <set from-field="newEntity1.acctgTransId"
>> field="createAcctgTransParams.acctgTransId"/>
>>            <now-timestamp field="createAcctgTransParams.transactionDate"/>
>>            <set value="N" field="createAcctgTransParams.isPosted"/>
>>            <set value="D" field="createAcctgTransParams.debitCreditFlag"/>
>>            <set value="RECEIPT"
>> field="createAcctgTransParams.acctgTransTypeId"/>
>>            <set value="ACTUAL"
>> field="createAcctgTransParams.glFiscalTypeId"/>   
>>        <call-service service-name="createAcctgTrans" 
>> in-map-name="createAcctgTransParams" include-user-login="true"/>
>> 
>> I think its not able to carry out the acctgTransId and isPosted to the
>> screen thatsy empty screen is coming
>> -- 
>> View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2216113.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>> 

Re: calling multiple services in ofbiz

Posted by lu...@hotmail.com.
Thanks

--------------------------------------------------
From: "prasanthi_ofbiz" <pr...@tcs.com>
Sent: Friday, May 14, 2010 1:06 PM
To: <us...@ofbiz.apache.org>
Subject: Re: calling multiple services in ofbiz

> 
> Hi Vani,
> Inside the EditAcctgTrans there was some conditions for displaying the forms
> like
> 1.<not><if-empty field="acctgTransId"/></not>
> 2.  <if-compare field="acctgTrans.isPosted" operator="equals"  value="Y"/>
> 
>       I have one double like while calling 2nd service from the 1st service
> i have written code like
>         <make-value entity-name="AcctgTrans" value-field="newEntity1"/>
>        <sequenced-id sequence-name="AcctgTrans"
> field="newEntity1.acctgTransId"/>        
>            <set from-field="newEntity1.acctgTransId"
> field="createAcctgTransParams.acctgTransId"/>
>            <now-timestamp field="createAcctgTransParams.transactionDate"/>
>            <set value="N" field="createAcctgTransParams.isPosted"/>
>            <set value="D" field="createAcctgTransParams.debitCreditFlag"/>
>            <set value="RECEIPT"
> field="createAcctgTransParams.acctgTransTypeId"/>
>            <set value="ACTUAL"
> field="createAcctgTransParams.glFiscalTypeId"/>   
>        <call-service service-name="createAcctgTrans" 
> in-map-name="createAcctgTransParams" include-user-login="true"/>
> 
> I think its not able to carry out the acctgTransId and isPosted to the
> screen thatsy empty screen is coming
> -- 
> View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2216113.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
> 

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi Vani,
Inside the EditAcctgTrans there was some conditions for displaying the forms
like
1.<not><if-empty field="acctgTransId"/></not>
2.  <if-compare field="acctgTrans.isPosted" operator="equals"  value="Y"/>

       I have one double like while calling 2nd service from the 1st service
i have written code like
         <make-value entity-name="AcctgTrans" value-field="newEntity1"/>
        <sequenced-id sequence-name="AcctgTrans"
field="newEntity1.acctgTransId"/>        
            <set from-field="newEntity1.acctgTransId"
field="createAcctgTransParams.acctgTransId"/>
            <now-timestamp field="createAcctgTransParams.transactionDate"/>
            <set value="N" field="createAcctgTransParams.isPosted"/>
            <set value="D" field="createAcctgTransParams.debitCreditFlag"/>
            <set value="RECEIPT"
field="createAcctgTransParams.acctgTransTypeId"/>
            <set value="ACTUAL"
field="createAcctgTransParams.glFiscalTypeId"/>   
        <call-service service-name="createAcctgTrans" 
in-map-name="createAcctgTransParams" include-user-login="true"/>

I think its not able to carry out the acctgTransId and isPosted to the
screen thatsy empty screen is coming
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2216113.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi Vani,
          In case of create Accounting transaction also we are navigating to
the EditAcctgTrans screen only. Below mentioned the  request-map detils
<request-map uri="createAcctgTrans">
        <security https="true" auth="true"/>
        <event type="service" invoke="createAcctgTrans"/>
        <response name="success" type="view" value="EditAcctgTrans"/>
        <response name="error" type="view" value="NewAcctgTrans"/>
</request-map>
and the view-map is    
 <view-map name="EditAcctgTrans" type="screen"
page="component://accounting/widget/GlScreens.xml#EditAcctgTrans"/>

So as I mentioned  same in the  createFinAccountTrans request-map, it should
show the EditAcctgTrans Screen. 
Regards,
Prasanthi
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2216104.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
hi Prasanthi,

please do check the
<view-map name="EditAcctgTrans" ... />
present down in the controller.xml

will need more info if that's not the problem.

Thanks & Regards
Atul Vani

----- Original Message -----
From: "prasanthi_ofbiz" <pr...@tcs.com>
To: user@ofbiz.apache.org
Sent: Thursday, May 13, 2010 8:23:21 PM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: Re: calling multiple services in ofbiz


Hi Vani,
          Yeah I implemented the same its creating accounting translation
but its now redirecting to the EditTrasaction Screen.
In the controller i have given the  response map to Edit Accoutning
Transaction screen.
Original Code:
<request-map uri="createFinAccountTrans">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="createFinAccountTrans"/>        
        <response name="success" type="view" value="EditFinAccountTrans"/>
        <response name="error" type="view" value="EditFinAccountTrans"/>         
</request-map>

My Code:
<request-map uri="createFinAccountTrans">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="createFinAccountTrans"/>       
        <response name="success" type="view" value="EditAcctgTrans"/>
        <response name="error" type="view" value="EditAcctgTrans"/>
</request-map>

Instead of representing EditFinAccountTrans screen I have given the
EditAcctgTrans Screen
Please help me 

Thanks & Regards,
Prasanthi
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2197643.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi Vani,
          Yeah I implemented the same its creating accounting translation
but its now redirecting to the EditTrasaction Screen.
In the controller i have given the  response map to Edit Accoutning
Transaction screen.
Original Code:
<request-map uri="createFinAccountTrans">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="createFinAccountTrans"/>        
        <response name="success" type="view" value="EditFinAccountTrans"/>
        <response name="error" type="view" value="EditFinAccountTrans"/>         
</request-map>

My Code:
<request-map uri="createFinAccountTrans">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="createFinAccountTrans"/>       
        <response name="success" type="view" value="EditAcctgTrans"/>
        <response name="error" type="view" value="EditAcctgTrans"/>
</request-map>

Instead of representing EditFinAccountTrans screen I have given the
EditAcctgTrans Screen
Please help me 

Thanks & Regards,
Prasanthi
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2197643.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
hi Prasanthi,

use any of the below methods or a combination of them:-

<set-service-fields to-map="myServiceCtx" service-name="myService" 
map="parameters"/>
<call-service service-name="myService" in-map-name="myServiceCtx">

or

<set field="myServiceCtx.field1" from-field="..."/>
<set field="myServiceCtx.field2" value="..."/>
<call-service service-name="myService" in-map-name="myServiceCtx"/>

-- 
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


prasanthi_ofbiz wrote:
> Hi Vani,
>
> I called another service inside a service call, but how can i pass
> parameters to the second service. Like without passing parameters its giving
> below error
>
>
> The Following Errors Occurred:
>
> ERROR: Could not complete the Create a Financial Account Transaction
> [file:/home/openuser/newAccountingworkspace/ofbiz/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml#createFinAccountTrans]
> process [problem invoking the [createAcctgTransEntry] service with the map
> named [] containing
> [[userLogin=[GenericEntity:UserLogin][createdStamp,2009-11-03
> 19:18:54.302(java.sql.Timestamp)][createdTxStamp,2009-11-03
> 19:18:54.298(java.sql.Timestamp)][currentPassword,{SHA}1a62f67c13e6febb2eb9475d480b2b87f4593a5b(java.lang.String)][disabledDateTime,null()][enabled,Y(java.lang.String)][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,null()][lastUpdatedStamp,2010-05-13
> 14:18:56.722(java.sql.Timestamp)][lastUpdatedTxStamp,2010-05-13
> 14:18:56.721(java.sql.Timestamp)][partyId,10020(java.lang.String)][passwordHint,p_mallik(java.lang.String)][requirePasswordChange,N(java.lang.String)][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,p_mallik(java.lang.String)],
> locale=en_US]]: Required parameter is missing: [IN]
> [createAcctgTransEntry.acctgTransId]Required parameter is missing: [IN]
> [createAcctgTransEntry.debitCreditFlag]Required parameter is missing: [IN]
> [createAcctgTransEntry.organizationPartyId]]
>
>
> Attached the document which is detailed requirement. 
> http://n4.nabble.com/file/n2197459/FinAcctg.doc FinAcctg.doc 
>
>
>   

Re: calling multiple services in ofbiz

Posted by prasanthi_ofbiz <pr...@tcs.com>.
Hi Vani,

I called another service inside a service call, but how can i pass
parameters to the second service. Like without passing parameters its giving
below error


The Following Errors Occurred:

ERROR: Could not complete the Create a Financial Account Transaction
[file:/home/openuser/newAccountingworkspace/ofbiz/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml#createFinAccountTrans]
process [problem invoking the [createAcctgTransEntry] service with the map
named [] containing
[[userLogin=[GenericEntity:UserLogin][createdStamp,2009-11-03
19:18:54.302(java.sql.Timestamp)][createdTxStamp,2009-11-03
19:18:54.298(java.sql.Timestamp)][currentPassword,{SHA}1a62f67c13e6febb2eb9475d480b2b87f4593a5b(java.lang.String)][disabledDateTime,null()][enabled,Y(java.lang.String)][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,null()][lastUpdatedStamp,2010-05-13
14:18:56.722(java.sql.Timestamp)][lastUpdatedTxStamp,2010-05-13
14:18:56.721(java.sql.Timestamp)][partyId,10020(java.lang.String)][passwordHint,p_mallik(java.lang.String)][requirePasswordChange,N(java.lang.String)][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,p_mallik(java.lang.String)],
locale=en_US]]: Required parameter is missing: [IN]
[createAcctgTransEntry.acctgTransId]Required parameter is missing: [IN]
[createAcctgTransEntry.debitCreditFlag]Required parameter is missing: [IN]
[createAcctgTransEntry.organizationPartyId]]


Attached the document which is detailed requirement. 
http://n4.nabble.com/file/n2197459/FinAcctg.doc FinAcctg.doc 


-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2197459.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: calling multiple services in ofbiz

Posted by Atul Vani <at...@hotwaxmedia.com>.
hi Prasanthi,

one way is to call one service from another service using <call-service> tag
or you can can services in the screen one after another,
or may be in the controller itself using <response name="success" 
type="request".../>

-- 
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


prasanthi_ofbiz wrote:
> Hi
>          Is it possible to call multiple services at a time?? Like while
> adding a transaction of Financial Account, I want to call  two services On
> click  of "Add" button of Edit Financial Account Transaction. The two
> services are  EditFinAccountTrans, for Addition of financial transaction and
> createAcctgTrans, for Creattion of an Accounting Transaction.
>
> Does it possible??
>
>   

Re: calling multiple services in ofbiz

Posted by Jacques Le Roux <ja...@les7arts.com>.
https://cwiki.apache.org/confluence/display/OFBTECH/Service+Engine+Guide#ServiceEngineGuide-ServiceGroups

Jacques

From: "prasanthi_ofbiz" <pr...@tcs.com>
> Hi
>         Is it possible to call multiple services at a time?? Like while
> adding a transaction of Financial Account, I want to call  two services On
> click  of "Add" button of Edit Financial Account Transaction. The two
> services are  EditFinAccountTrans, for Addition of financial transaction and
> createAcctgTrans, for Creattion of an Accounting Transaction.
> 
> Does it possible??
> 
> -- 
> View this message in context: http://ofbiz.135035.n4.nabble.com/calling-multiple-services-in-ofbiz-tp2196098p2196098.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>