3

I have researched documentation (toronto and cuba) and it did not help me understand data rules at all, has anyone had to have email validation. Can you give me an example?

Thanks, Rob

1 Answers1

2

I believe you are running Aviarc 3.5.0. If that is the case there is an example of datarules written for this version of the engine. One of those rules is email validator.

The rules are attached to the databroker with the addition of the attribute rules in the definition.xml file which specifies the location of the rules file, so you would end up having something like that:

<databroker factory-class="com.aviarc.framework.databroker.workflowsql.AviarcWorkflowSQLDataBrokerFactoryImpl"
            rules="data-rules.xml" >
    <operation name="get-all" pre-workflow="workflows/new-customer-get-all">

    </operation>
    <store-dataset-changes>
        <create pre-workflow="workflows/NeW-CuStOmer-Create"/>
        <update pre-workflow="workflows/new-customer-update"/>
        <delete pre-workflow="workflows/new-customer-delete"/>
    </store-dataset-changes>
</databroker>

The file "data-rules.xml" then is meant to reside in the databroker's directory on the same level as definition.xml. And this is where you do specify the actual rules.

Cheers, Vlad

Vlad
  • 385
  • 3
  • 10
  • Thanks Vlad, what has us pickled is figuring out where to create the rules file, and how to point our data broker at it... – Robert Knox Oct 03 '12 at 05:54
  • @RobertKnox Rob, I've updated my answer to include the details on where the rules file resides and how to reference it in the broker definition file. – Vlad Oct 04 '12 at 00:15
  • Thank you Vlad I will work on this tonight to get it working. – Robert Knox Oct 04 '12 at 01:58