Problem in minilang code

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

Problem in minilang code

him_aeng
About this code.

<simple-method method-name="createPracticePerson"">
  <set field="createPartyCtx.partyTypeId" value="PERSON"/>
  <call-service service-name="createPracticeParty" in-map-name="createPartyCtx">
    <result-to-field result-name="partyId"/>
    <result-to-result result-name="partyId"/>
  </call-service>
  <log level="info" message="====Party created with partyId for person======${partyId}"/>
  <make-value entity-name="Person" value-name="newEntity"/>
  <set field="newEntity.partyId" from-field="partyId"/>
  <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
  <create-value value-name="newEntity"/>
</simple-method>

I don't know how & when that minilang construct "createPartyCtx". How minilang know that createPartyCtx has "partyTypeId" because I don't see any code that instance the createParCtx such as <make-value>

Thank you
Tanakorn Numrubporn
Reply | Threaded
Open this post in threaded view
|

Re: Problem in minilang code

Ashish Vijaywargiya
>>I don't know how & when that minilang construct "createPartyCtx".
Following line is responsible to create the createPartyCtx map and put the
value of partyTypeId="PERSON" in that map.

 <set field="createPartyCtx.partyTypeId" value="PERSON"/>


>>How minilang know that createPartyCtx has "partyTypeId" because I don't
see any
>>code that instance the createParCtx such as <make-value>

Open the Mini-Lang code for "createPracticeParty" service and there you will
see the code related to <make-value>.
For reference you can see the sample code attached with the Practice
application tutorial.

--
Ashish Vijaywargiya
Indore (M.P), India
http://en.wikipedia.org/wiki/Indore




On Mon, Aug 25, 2008 at 12:01 PM, him_aeng <[hidden email]> wrote:

>
> About this code.
>
> <simple-method method-name="createPracticePerson"">
>  <set field="createPartyCtx.partyTypeId" value="PERSON"/>
>  <call-service service-name="createPracticeParty"
> in-map-name="createPartyCtx">
>    <result-to-field result-name="partyId"/>
>    <result-to-result result-name="partyId"/>
>  </call-service>
>  <log level="info" message="====Party created with partyId for
> person======${partyId}"/>
>  <make-value entity-name="Person" value-name="newEntity"/>
>  <set field="newEntity.partyId" from-field="partyId"/>
>  <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
>  <create-value value-name="newEntity"/>
> </simple-method>
>
> I don't know how & when that minilang construct "createPartyCtx". How
> minilang know that createPartyCtx has "partyTypeId" because I don't see any
> code that instance the createParCtx such as <make-value>
>
> Thank you
> Tanakorn Numrubporn
> --
> View this message in context:
> http://www.nabble.com/Problem-in-minilang-code-tp19138576p19138576.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>