<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Business Rules using Fluent API - JBPM 5
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/jovijesc">Jhonatas Vicente de Jesus</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/628668#628668">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p style="padding-left: 30px;"><span style="background-color: #ffffff;" title="Regras de Negócio usando Fluent API - JBPM 5">Business Rules using Fluent API - JBPM 5 <br/><br/></span><span title="Olá galera.">Hello people. <br/><br/></span><span style="background-color: #ffffff;" title="Gostaria de saber como criar regras de negócio ou regras de navegação usando a Fluent API.">I wonder how to create business rules or rules of navigation using the Fluent API. <br/></span><span style="background-color: #ffffff;" title="Encontrei esse código abaixo:">I found this code below: <br/><br/></span><span style="background-color: #ffffff;" title="Split split = new Split();">Split split = new Split (); <br/>        </span><span title="split.setName(&quot;split&quot;);">split.setName ("split"); <br/>        </span><span style="background-color: #ffffff;" title="split.setMetaData(&quot;x&quot;, 1);">split.setMetaData ("x", 1); <br/>        </span><span style="background-color: #ffffff;" title="split.setMetaData(&quot;y&quot;, 2);">split.setMetaData ("y", 2); <br/>        </span><span style="background-color: #ffffff;" title="split.setMetaData(&quot;width&quot;, 3);">split.setMetaData ("width", 3); <br/>        </span><span style="background-color: #ffffff;" title="split.setMetaData(&quot;height&quot;, 4);">split.setMetaData ("height", 4); <br/>        </span><span style="background-color: #ffffff;" title="split.setType(Split.TYPE_XOR);">split.setType (Split.TYPE_XOR); <br/>        </span><span style="background-color: #ffffff;" title="Connection connection = new ConnectionImpl(split, Node.CONNECTION_DEFAULT_TYPE, actionNode, Node.CONNECTION_DEFAULT_TYPE);">Connection connection = new ConnectionImpl (split, Node.CONNECTION_DEFAULT_TYPE, actionNode, Node.CONNECTION_DEFAULT_TYPE); <br/>        </span><span title="Constraint constraint = new ConstraintImpl();">ConstraintImpl Constraint constraint = new (); <br/>        </span><span title="constraint.setName(&quot;constraint1 ><&&&quot;);">constraint.setName ("constraint1 ><&&"); <br/>        </span><span title="constraint.setPriority(1);">constraint.setPriority (1); <br/>        </span><span style="background-color: #ffffff;" title="constraint.setDialect(&quot;dialect1&quot;);">constraint.setDialect ("dialect1"); <br/>        </span><span style="background-color: #ffffff;" title="constraint.setType(&quot;type1&quot;);">constraint.setType ("type1"); <br/>        </span><span style="background-color: #ffffff;" title="constraint.setConstraint(&quot;constraint-text1&quot;);">constraint.setConstraint ("constraint-text1"); <br/>        </span><span style="background-color: #ffffff;" title="split.setConstraint(connection, constraint);">split.setConstraint (connection, constraint); <br/>        </span><span style="background-color: #ffffff;" title="connection = new ConnectionImpl(split, Node.CONNECTION_DEFAULT_TYPE, ruleSetNode, Node.CONNECTION_DEFAULT_TYPE);">connection = new ConnectionImpl (split, Node.CONNECTION_DEFAULT_TYPE, ruleSetNode, Node.CONNECTION_DEFAULT_TYPE); <br/>        </span><span title="constraint = new ConstraintImpl();">ConstraintImpl constraint = new (); <br/>        </span><span title="constraint.setName(&quot;constraint2&quot;);">constraint.setName ("constraint2"); <br/>        </span><span title="constraint.setPriority(2);">constraint.setPriority (2); <br/>        </span><span title="constraint.setDialect(&quot;dialect2&quot;);">constraint.setDialect ("dialect2"); <br/>        </span><span title="constraint.setType(&quot;type2&quot;);">constraint.setType ("type2"); <br/>        </span><span title="constraint.setConstraint(&quot;constraint-text2&quot;);">constraint.setConstraint ("constraint-text2"); <br/>        </span><span title="split.setConstraint(connection, constraint);">split.setConstraint (connection, constraint); <br/>        </span><span title="process.addNode(split);">process.addNode (split); <br/>        </span><span title="new ConnectionImpl(startNode, Node.CONNECTION_DEFAULT_TYPE, split, Node.CONNECTION_DEFAULT_TYPE);">new ConnectionImpl (startNode, Node.CONNECTION_DEFAULT_TYPE, split, Node.CONNECTION_DEFAULT_TYPE); <br/><br/></span><span title="Como eu poderia definir uma expressão?">How could I set an expression? </span><span title="Se idade > 18 vai para atividade XXXX, se não vai para outra atividade.!">If age> 18 go to XXXX activity, if it goes to another activity.! <br/><br/></span><span style="background-color: #ffffff;" title="Não encontrei como posso definir as expressões de navegação.">I can not find how to set the terms of navigation. <br/><br/></span><span style="background-color: #ffffff;" title="Desculpe pelo inglês, eu usei o google translate!!">Sorry for English, I used google translate! </span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/628668#628668">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>