<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Please don’t reply to existing posts, to start new discussions, it screws up the threads. Please read:<div><a href="http://www.jboss.org/drools/lists">http://www.jboss.org/drools/lists</a><br><div><h4 style="letter-spacing: -0.06em; font-weight: normal; color: rgb(73, 73, 73); margin: 3px 0px;"><b><font face="Lucida Grande" style="font-size: 14px;">Anti-patterns to be ignored or attract abuse from others:</font></b></h4><h4 style="letter-spacing: -0.06em; margin: 3px 0px;"><font face="Lucida Grande" style="font-size: 14px;"><span style="background-color: rgb(255, 255, 255);"><font color="#494949">12.&nbsp;</font></span><span style="color: rgb(51, 51, 51); font-weight: normal; background-color: rgb(255, 255, 255); line-height: 18px;">Reply to an existing thread but starting a new topic</span></font></h4><div><div><br></div><div>Mark</div></div><div><br><div><div>On 16 Jan 2014, at 03:40, Dean Whisnant &lt;dean@basys.com&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>This may be a very basic question, but I'm using drools 5.1.1 and when I invoke a stateful session and that session ends I receive back all of the facts that were created during that session and I translate those into an EDI transaction. &nbsp;As an example I might have a few objects of types "2700*LX,2750* N1,2750* REF, and 2750*DTP". &nbsp;I know my rules fired create objects like:<br><br>LX*1<br>N1*75*CMSEC<br>REF*17*A<br>DTP*007*D8*20140114<br>LX*2<br>N1*75*STATUS<br>REF*17*AFTNM<br>DTP*007*D8*20140114<br><br>Each of these lines is an object of the type I mentioned above.<br><br>My task is to make sure that the different object types "stick" together when I put them in the .x12 file so that they are formatted above.<br><br>What I do internally is I keep track that I have two of each of these objects, but I don't know if there is some type of timestamp that is on them that I could keep the first LX, N1, REF, DTP together or not.<br><br>In one example I have a rule that inserts them in the order you see, yes, it literally inserts 8 objects/facts into memory. And I need to know the order they were inserted so that I can properly form a file out of them on the backend.<br><br>Any thoughts?<br><br>Thanks,<br><br>Dean<br><br>_______________________________________________<br>rules-users mailing list<br>rules-users@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></div></div></body></html>