Do not use dialect "mvel". <br>-W<br><br><br><div class="gmail_quote">2011/8/19 Dean Whisnant <span dir="ltr"><<a href="mailto:dean@basys.com">dean@basys.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Hello,<u></u><u></u></span></p><p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Can anyone see an issue with the following RHS? The String.format is failing. I’ve copied it straight into java to verify my intentions and it works there.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color: rgb(31, 73, 125);">What I’m trying to accomplish is to concatenate the string UH005 with a sequence number that is a fixed 10 digits, zero filled. So if CurrentClaimSeq_48 is the number 123, then I expect that TRN02_Check… would be populated with UH0050000000123.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Again, this is working fine in straight java, but not in a rule. What am I missing? Is there a better way to try to accomplish this in a rule?<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="color: red;">rule</span> <span style="color: green;">"L1000_TRN02_UHC_BPA"</span><span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p>
<p class="MsoNormal"> <span style="color: red;">dialect</span> <span style="color: green;">"mvel"</span><span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p><p class="MsoNormal"> <span style="color: red;">when</span><span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p>
<p class="MsoNormal"> CLM_835_SUPP( seq : currentClaimSeq_48 != ( <span style="color: red;">null</span> ) )<span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p><p class="MsoNormal"> CLM_DET_LOAD( )<span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p>
<p class="MsoNormal"> trn : x221Trans<span style="color: red;">action</span>Header_TRN_ReassociationTraceNumber( )<span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p><p class="MsoNormal"> <span style="color: red;">then</span><span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p>
<p class="MsoNormal"> trn.setTRN02_CheckOrEftTraceNumber( <span style="color: green;">"UH005"</span> + String.format (<span style="color: green;">"%010d"</span>, seq) );<span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color: red;">end</span><u></u><u></u></p><p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Here are the data types of the two fields involved.<u></u><u></u></span></p><p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(127, 0, 85);">private</span></b><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> Integer </span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(0, 0, 192);">CurrentClaimSeq_48</span><span style="font-size: 10pt; font-family: "Courier New"; color: black;">;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(127, 0, 85);">public</span></b><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> String </span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(0, 0, 192);">TRN02_CheckOrEftTraceNumber</span><span style="font-size: 10pt; font-family: "Courier New"; color: black;">;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">Thank you!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"><u></u> <u></u></span></p><font color="#888888"><p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">Dean</span><span style="color: rgb(31, 73, 125);"><u></u><u></u></span></p>
</font></div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>