<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>I have been following the documentation to create a RuleFlowProcess, and I went the route of creating the flow programmatically, but I can't find an example of adding this process to the knowledge builder. It seems to want an external resource of a given type. In my little code scenario below how would I add this programmatically created RuleFlowProcess?</div><div><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;DefaultFlowGenerator flowGenerator = <span style="color: #921167">new</span> DefaultFlowGenerator(); &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; RuleFlowProcess flow = flowGenerator.generateFlow( <span style="color: #4726f9">"flow"</span> );&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; knowledgeBuilder.add( flow.getResource() /* this is null */, null /* what do i put here*/&nbsp;); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div><br></div><div>Do I have to serialize to an external form and deserialize?</div><div><br></div><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Thanks,<br><br>Jason<br><br>----------------------------------------------------------<br>Jason van Zyl<br>Founder, &nbsp;Apache Maven<br><a href="http://twitter.com/jvanzyl">http://twitter.com/jvanzyl</a><br>---------------------------------------------------------</div><div><br></div><div>Three&nbsp;people&nbsp;can&nbsp;keep&nbsp;a&nbsp;secret&nbsp;provided&nbsp;two&nbsp;of&nbsp;them&nbsp;are&nbsp;dead.<br><br>&nbsp;--&nbsp;Unknown<br></div><div><br></div></div></div><br class="Apple-interchange-newline">
</div>
<br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Thanks,<br><br>Jason<br><br>----------------------------------------------------------<br>Jason van Zyl<br>Founder, &nbsp;Apache Maven<br><a href="http://twitter.com/jvanzyl">http://twitter.com/jvanzyl</a><br>---------------------------------------------------------</div><div><br></div><div>A&nbsp;language&nbsp;that&nbsp;doesn’t&nbsp;affect&nbsp;the&nbsp;way&nbsp;you&nbsp;think&nbsp;about&nbsp;programming&nbsp;is&nbsp;not&nbsp;worth&nbsp;knowing.&nbsp;<br>&nbsp;<br>&nbsp;-—&nbsp;Alan&nbsp;Perlis<br></div><div><br></div></div></div></span></span><br class="Apple-interchange-newline">
</div>
<br></body></html>