<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    It is possible to turn off the language constraint for MVEL in
    drools, see KnowledgeBuilderConfiguration, which should cause the
    static field not to be set.<br>
    <br>
    Mark<br>
    On 21/07/2010 15:02, Edson Tirelli wrote:
    <blockquote
      cite="mid:AANLkTimk66Ym_NAlV7YgaFSzGCYtLTssM8VeLA71gTek@mail.gmail.com"
      type="cite">
      <div><br>
      </div>
      &nbsp;&nbsp; &nbsp;Hi Paul,
      <div><br>
      </div>
      <div>&nbsp;&nbsp; &nbsp;Your analysis is correct. The problem is that these
        configurations in MVEL are made using static properties and so
        they affect all uses of MVEL in a single classloading hierarchy.
        Unfortunately, I don't think there is anything you can do right
        now, other than open a JIRA in MVEL to help convince Mike to
        make all configurations non-static&nbsp;in MVEL:</div>
      <div><br>
      </div>
      <div><a moz-do-not-send="true"
          href="http://jira.codehaus.org/browse/MVEL">http://jira.codehaus.org/browse/MVEL</a></div>
      <div><br>
      </div>
      <div>&nbsp;&nbsp; &nbsp;Edson</div>
      <div>&nbsp;&nbsp; &nbsp;<br>
        <div class="gmail_quote">2010/7/21 Paul Edwards <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:Paul.Edwards@hyro.com">Paul.Edwards@hyro.com</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">Hi guys,<br>
            <br>
            I have an issue which involves smooks, drools and mvel.<br>
            <br>
            Quick explanation, the unit test is just a smooks run.
            Nothing complicated. The test passes happily. It contains an
            expression that involves an MVEL "IF" statement.<br>
            <br>
            Now if I add a drools startup (I'm not using drools in the
            test, I'm just initialising it), the unit test now fails on
            the "IF" statement. The exception received is:<br>
            <br>
            org.milyn.cdr.SmooksConfigurationException: Error invoking
            @Initialize method 'initialize' on class
            'org.milyn.javabean.BeanInstancePopulator'.<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.milyn.cdr.annotation.Configurator.invoke(Configurator.java:457)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.milyn.cdr.annotation.Configurator.initialise(Configurator.java:439)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.milyn.cdr.annotation.Configurator.configure(Configurator.java:91)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.milyn.cdr.annotation.Configurator.configure(Configurator.java:66)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.JavaContentHandlerFactory.create(JavaContentHandlerFactory.java:63)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.addCDU(ContentDeliveryConfigBuilder.java:623)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyCDUStrategy(ContentDeliveryConfigBuilder.java:548)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyStrategy(ContentDeliveryConfigBuilder.java:536)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.iterate(ContentDeliveryConfigBuilder.java:711)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.access$300(ContentDeliveryConfigBuilder.java:690)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder.extractContentHandlers(ContentDeliveryConfigBuilder.java:484)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder.load(ContentDeliveryConfigBuilder.java:349)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.delivery.ContentDeliveryConfigBuilder.getConfig(ContentDeliveryConfigBuilder.java:146)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.container.standalone.StandaloneExecutionContext.&lt;init&gt;(StandaloneExecutionContext.java:91)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.container.standalone.StandaloneExecutionContext.&lt;init&gt;(StandaloneExecutionContext.java:65)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.milyn.Smooks.createExecutionContext(Smooks.java:383)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.milyn.Smooks.createExecutionContext(Smooks.java:346)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
com.hyro.telstrapoc.smooks.SmooksTransformTest.runSmooksTransform(SmooksTransformTest.java:215)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
com.hyro.telstrapoc.smooks.SmooksTransformTest.testSmooks(SmooksTransformTest.java:139)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:597)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.junit.runners.ParentRunner.run(ParentRunner.java:220)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)<br>
            Caused by: [Error: was expecting type: java.lang.Object; but
            found type: null]<br>
            [Near : {... }<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;els ....}]<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br>
            [Line: 3, Column: 16]<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.mvel2.util.CompilerTools.expectType(CompilerTools.java:355)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer._getAccessor(ReflectiveAccessorOptimizer.java:1052)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeCollection(ReflectiveAccessorOptimizer.java:1079)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.mvel2.ast.InlineCollectionNode.&lt;init&gt;(InlineCollectionNode.java:50)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:1173)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:118)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:65)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel2.MVEL.compileExpression(MVEL.java:886)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel2.MVEL.compileExpression(MVEL.java:891)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel2.MVEL.compileExpression(MVEL.java:797)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.expression.MVELExpressionEvaluator.setExpression(MVELExpressionEvaluator.java:55)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
org.milyn.javabean.BeanInstancePopulator.initialize(BeanInstancePopulator.java:235)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:597)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;at
            org.milyn.cdr.annotation.Configurator.invoke(Configurator.java:453)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;... 42 more<br>
            <br>
            <br>
            If I remove the 3 lines initialising drools, it all passes
            again. I suspect that the MVEL engine is a singleton, and
            both drools and smooks are using the same instance. I
            believe drools is setting MVEL to disallow "IF" statements
            on the RHS of a rule. (see: <a moz-do-not-send="true"
href="http://drools-java-rules-engine.46999.n3.nabble.com/Trivial-rule-with-condition-in-RHS-won-t-compile-help-please-td67458.html"
              target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Trivial-rule-with-condition-in-RHS-won-t-compile-help-please-td67458.html</a>)
            I don't understand why MVEL thinks that my smooks expression
            is a RHS of a rule....<br>
            <br>
            <br>
            Heres the unit test:<br>
            @Test<br>
            &nbsp; &nbsp;public void testSmooks2() throws Exception {<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;String input =<br>
            &nbsp; &nbsp; &nbsp; &nbsp;"&lt;ns5:user partyAdminRoles=\"\"
            lastName=\"Edwards\" firstName=\"Paul\" primary=\"false\"
            userID=\"pedwards\" otpTokenRemainingUses=\"0\"
            registrationCodeRemainingUses=\"0\" enabled=\"true\"
            customIntAttr1=\"0\"
            xmlns:ns2=\"urn:oasis:names:tc:SPML:2:0:reference\"
            xmlns=\"urn:oasis:names:tc:SPML:2:0\"
            xmlns:ns4=\"urn:oasis:names:tc:SPML:2:0:password\"
            xmlns:ns3=\"urn:oasis:names:tc:SPML:2:0:search\"
            xmlns:ns5=\"<a moz-do-not-send="true"
              href="http://hyro.com/da/objectmodel%5C" target="_blank">http://hyro.com/da/objectmodel\</a>"
            xmlns:ns6=\"<a moz-do-not-send="true"
              href="http://www.sifinfo.org/au/infrastructure/2.x%5C"
              target="_blank">http://www.sifinfo.org/au/infrastructure/2.x\</a>"
            xmlns:ns7=\"urn:oasis:names:tc:SPML:2:0:batch\"&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp;&lt;ns5:emailAddresses emailAddress=\"<a
              moz-do-not-send="true"
              href="mailto:pedwards@frazzle.co.nz">pedwards@frazzle.co.nz</a>\"
            primary=\"true\" type=\"Personal\"
            modificationMode=\"0\"/&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp;&lt;ns5:emailAddresses emailAddress=\"<a
              moz-do-not-send="true" href="mailto:grumpy@frazzle.co.nz">grumpy@frazzle.co.nz</a>\"
            primary=\"false\" type=\"Personal\"
            modificationMode=\"0\"/&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp;&lt;ns5:authzRoleSubscriptions status=\"Active\"
            primary=\"false\" singlePasswordOptOut=\"false\"
            reprovision=\"false\" customBoolAttr5=\"false\"
            customBoolAttr4=\"false\" customBoolAttr3=\"false\"
            customBoolAttr2=\"false\" customBoolAttr1=\"false\"
            customIntAttr5=\"0\" customIntAttr4=\"0\"
            customIntAttr3=\"0\" customIntAttr2=\"0\"
            customIntAttr1=\"0\"&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp; &nbsp; &nbsp;&lt;ns5:role roleName=\"Account\"&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;ns5:entitlement entitlementID=\"Open
            LDAP Account\" type=\"Account\"/&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp; &nbsp; &nbsp;&lt;/ns5:role&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp;&lt;/ns5:authzRoleSubscriptions&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp; &nbsp;&lt;ns5:auxEntities/&gt;\n" +<br>
            &nbsp; &nbsp; &nbsp; &nbsp;"&lt;/ns5:user&gt;\n";<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;UserType inUser = null;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;Unmarshaller unmarshaller = null;<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;try {<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;log.debug("Unmarshalling: " + input);<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;unmarshaller = (Unmarshaller)
            SpmlConstants.unmarshallerPool.borrowObject();<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;inUser = ((JAXBElement&lt;UserType&gt;)
            unmarshaller.unmarshal(new StringReader(input))).getValue();<br>
            &nbsp; &nbsp; &nbsp; &nbsp;} catch (JAXBException e) {<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;log.error("Exception while trying to unmarshall
            input daSpmlString: " + e.getMessage());<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.printStackTrace();<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw e;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;} catch (Exception e) {<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;log.error("Exception while trying to unmarshall
            input daSpmlString: " + e.getMessage());<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.printStackTrace();<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw e;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;} finally {<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp;SpmlConstants.unmarshallerPool.returnObject(unmarshaller);<br>
            &nbsp; &nbsp; &nbsp; &nbsp;}<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;log.debug("Unmarshalled: " + inUser.getUserID());<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;Properties parsed = runSmooksTransform(inUser);<br>
            &nbsp; &nbsp; &nbsp; &nbsp;assertNotNull(parsed);<br>
            <br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;for(Iterator&lt;Object&gt; i =
            parsed.keySet().iterator(); i.hasNext();) {<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Object key = i.next();<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Object value = parsed.get(key);<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println("Key: " + key + " value: " +
            value);<br>
            &nbsp; &nbsp; &nbsp; &nbsp;}<br>
            <br>
            &nbsp; &nbsp;}<br>
            <br>
            Heres the smooks file:<br>
            <br>
            &lt;?xml version="1.0"?&gt;<br>
            &lt;smooks-resource-list xmlns="<a moz-do-not-send="true"
              href="http://www.milyn.org/xsd/smooks-1.1.xsd"
              target="_blank">http://www.milyn.org/xsd/smooks-1.1.xsd</a>"<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:core="<a moz-do-not-send="true"
              href="http://www.milyn.org/xsd/smooks/smooks-core-1.3.xsd"
              target="_blank">http://www.milyn.org/xsd/smooks/smooks-core-1.3.xsd</a>"<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:jb="<a moz-do-not-send="true"
              href="http://www.milyn.org/xsd/smooks/javabean-1.3.xsd"
              target="_blank">http://www.milyn.org/xsd/smooks/javabean-1.3.xsd</a>"&gt;<br>
            <br>
            &nbsp; &nbsp;&lt;!-- NOTE NOTE NOTE --&gt;<br>
            &nbsp; &nbsp;&lt;!-- This is purely to map user or person props to the
            LDAP name. Anything that is handled --&gt;<br>
            &nbsp; &nbsp;&lt;!-- explicitly (like firstname or lastname) does not
            get mapped --&gt;<br>
            <br>
            &nbsp; &nbsp;&lt;jb:bean beanId="UserOrPerson"
            class="java.util.Properties"
createOnElement="com.hyro.spmlservice.generated.objectmodel.PersonType"&gt;<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="employeeNumber"
            decoder="String" data="personID" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="mobile" decoder="String"
            data="mobileTel" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="facsimileTelephoneNumber"
            decoder="String" data="workFax" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="telephoneNumber"
            decoder="String" data="workTel" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="description" decoder="String"
            data="title" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="l" decoder="String"
            data="customAttr27" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="physicalDeliveryOfficeName"
            decoder="String" data="customAttr8" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="postalCode" decoder="String"
            data="customAttr7" /&gt;<br>
            <br>
            &nbsp; &nbsp;&lt;/jb:bean&gt;<br>
            <br>
            &nbsp; &nbsp;&lt;jb:bean beanId="UserOrPerson"
            class="java.util.Properties"
createOnElement="com.hyro.spmlservice.generated.objectmodel.UserType"&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="firstName" decoder="String"
            data="firstName" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="lastName" decoder="String"
            data="lastName" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="user" decoder="String"
            data="userID" /&gt;<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="displayName" decoder="String"
            data="customAttr4" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="postalCode" decoder="String"
            data="customAttr2" /&gt;<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:expression property="mail"
            execOnElement="emailAddresses"&gt;<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(1 == 2) {<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return emailAddresses[0].emailAddress;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else {<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return "NOT FOUND";<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;/jb:expression&gt;<br>
            <br>
            <br>
            &nbsp; &nbsp;&lt;/jb:bean&gt;<br>
            <br>
            &nbsp; &nbsp;&lt;jb:bean beanId="emailAddresses"
            class="java.util.ArrayList"
            createOnElement="emailAddresses"&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:wiring beanIdRef="emailAddressType" /&gt;<br>
            &nbsp; &nbsp;&lt;/jb:bean&gt;<br>
            <br>
            &nbsp; &nbsp;&lt;jb:bean beanId="emailAddressType"
            class="com.hyro.spmlservice.generated.objectmodel.EmailAddressType"
createOnElement="com.hyro.spmlservice.generated.objectmodel.EmailAddressType"&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="modificationMode"
            decoder="Short" data="modificationMode" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="emailAddress" decoder="String"
            data="emailAddress" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="type" decoder="String"
            data="type" /&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;jb:value property="primary" decoder="Boolean"
            data="primary" /&gt;<br>
            &nbsp; &nbsp;&lt;/jb:bean&gt;<br>
            <br>
            <br>
            &lt;/smooks-resource-list&gt;<br>
            <br>
            <br>
            Any Ideas? I've wasted 3 days getting to this point....<br>
            <font color="#888888">--<br>
              Paul Edwards<br>
              <br>
              _______________________________________________<br>
              rules-users mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
              <a moz-do-not-send="true"
                href="https://lists.jboss.org/mailman/listinfo/rules-users"
                target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
            </font></blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        &nbsp; Edson Tirelli<br>
        &nbsp; JBoss Drools Core Development<br>
        &nbsp; JBoss by Red Hat @ <a moz-do-not-send="true"
          href="http://www.jboss.com">www.jboss.com</a><br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>