I have a simple example (load-function XPathFunction)
(deftemplate party1ID
(slot partyId (type STRING))
)
(deftemplate party2ID
(slot partyId (type STRING))
)
(defrule MAIN::FactGatherFPML4-5
( EBFpML )
?message<-( EBFpML { version == "4-5" } )
=>
(assert (party1ID ( partyId (get-by-xpath ?message
"/tns:FpML/tns:par...@id='party1']/tns:partyId") )))
(assert (party2ID ( partyId (get-by-xpath ?message
"/tns:FpML/tns:par...@id='party2']/tns:partyId") )))
)
StD out
as you can see the result of the rule give me two facts with
java.lang.String as the partyid
==> f-2 (MAIN::party1ID (partyId <Java-Object:java.lang.String>))
==> f-3 (MAIN::party2ID (partyId <Java-Object:java.lang.String>))
(defrule send-to-jpm
(party1ID { partyId == "CHASUS33" } )
=>
(add (new RuleOutcome "JPM"))
(printout t "Rule out come found going "(?partyId toString ) crlf)
)
Im expecting this rule to fire but its not and I think is it's a type
issue.
If I just run this within the Jess terminal
(deftemplate party1ID (slot partyId (type STRING)))
(defrule send-to-jpm (party1ID { partyId == "CHASUS33" } ) =>(printout t
"Rule out come found going to "partyId crlf))
(assert (party1ID ( partyId "CHASUS33" )))
Jess> (assert (party1ID ( partyId "CHASUS33" )))
==> f-0 (MAIN::party1ID (partyId "CHASUS33"))
==> Activation: MAIN::send-to-jpm : f-0
<Fact-0>
I get the correct result.
Can any help.
Cheers
Amitesh
Amitesh Kumar |CIB Integration | Business Infrastructure Technology |
Standard Bank CIB International | Ground Floor, 20 Gresham Street,
London, EC2V 7JE
T: +44 [0]203 145 5575 | E: [email protected]
*****************************************************************************
More information on Standard Bank is available at www.standardbank.com
Everything in this email and any attachments relating to the official business
of Standard Bank Group Limited and any or all subsidiaries, ("the Company"), is
proprietary to the Company. It is confidential, legally privileged and
protected
by relevant laws. The Company does not own and endorse any other content.
Views and opinions are those of the sender unless clearly stated as being
that of the Company.
The person or persons addressed in this email are the sole authorised
recipient. Please notify the sender immediately if it has unintentionally,
or inadvertently reached you and do not read, disclose or use the content
in any way and delete this e-mail from your system.
The Company cannot ensure that the integrity of this email has been
maintained nor that it is free of errors, virus, interception or interference.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message which arise as a result of e-mail transmission.
If verification is required please request a hard-copy version. This message
is provided for informational purposes and should not be construed as a
solicitation or offer to buy or sell any securities or related financial
instruments.
*****************************************************************************
This message has been scanned for viruses by BlackSpider MailControl -
www.blackspider.com
<<winmail.dat>>
