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?? |
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 < [hidden email]> 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. > |
In reply to this post by prasanthi_ofbiz
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?? > > |
Administrator
|
In reply to this post by prasanthi_ofbiz
https://cwiki.apache.org/confluence/display/OFBTECH/Service+Engine+Guide#ServiceEngineGuide-ServiceGroups
Jacques From: "prasanthi_ofbiz" <[hidden email]> > 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. > |
In reply to this post by prasanthi_ofbiz
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 < [hidden email]> 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. > |
In reply to this post by Atul Vani
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. FinAcctg.doc |
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 > > > |
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 |
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" <[hidden email]> To: [hidden email] 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. |
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 |
In reply to this post by Atul Vani
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 |
Thanks
-------------------------------------------------- From: "prasanthi_ofbiz" <[hidden email]> Sent: Friday, May 14, 2010 1:06 PM To: <[hidden email]> 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. > |
In reply to this post by prasanthi_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 > |
Hi vani,
There is no error,but its navigating to that screen without the forms. Regards , Prasanthi |
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 > > |
In reply to this post by luoxv
Thanks
-------------------------------------------------- From: <[hidden email]> Sent: Friday, May 14, 2010 1:12 PM To: <[hidden email]> Subject: Re: calling multiple services in ofbiz > Thanks > > -------------------------------------------------- > From: "prasanthi_ofbiz" <[hidden email]> > Sent: Friday, May 14, 2010 1:06 PM > To: <[hidden email]> > 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. >> |
In reply to this post by Atul Vani
Thanks
-------------------------------------------------- From: "Atul Vani" <[hidden email]> Sent: Friday, May 14, 2010 1:35 PM To: <[hidden email]> 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 >> > |
In reply to this post by Atul Vani
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 |
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 > |
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 screenmenuDescription.png navigationScreen.png |
Free forum by Nabble | Edit this page |