ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Robinson <jus...@venturenet.co.za>
Subject Using <call-bsh> in minilang
Date Tue, 08 Mar 2011 11:57:44 GMT
I've been trying to wing it with minilang, it seems pretty straight
forward...but I ended up with a situation where I could either go with
minlang recursion (no clue how to handle the ins and outs) or a bsh
script, since the function I need is already defined in a java class
I'm trying to go with the latter.

The method I wish to use requires a delegator as an argument, how
would I provide this from within a minilang script?
Also is it possible to set a field field="field" from-field="declared
inside" <call-bsh></call-bsh> tag.(see example)

fragment:

<!--The objective here is to look up the CustRequestRole entity of roleTypeId:
					CONTACT, to get the contact partyId so it's email address can be used if
					there is none on the account -->
				<if-empty field="parameters.sendTo">
					<call-bsh>
						String contactPartyId =
						com.opensourcestrategies.crmsfa.cases.UtilCase.getCasePrimaryContactPartyId(delegator,
						custRequestId));
	                </call-bsh>
					<set field="getEmail.partyId" from-field="contactPartyId" />
					<call-service service-name="getPartyEmail"
						in-map-name="getEmail">
						<result-to-field result-name="emailAddress" field="parameters.sendTo" />
					</call-service>
				</if-empty>


-- 
Regards,
Justin
Venture-Net Research & Development

Mime
View raw message