Hi Guillame,
For the first point i've raised a jira and i've attached the diff file
for drools endpoint.
I don't know if this is the better solution, but it works.
Here the endpoint configuration:
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:drools="http://servicemix.apache.org/drools/1.0"
xmlns:foo="http://servicemix.org/cheese"
>
<drools:endpoint service="foo:myRouterTestRouter"
endpoint="myRouterTestRouter"
ruleBaseResource="classpath:myRouterTestRouter.drl"
defaultTargetService="foo:myMailServerTestSplitter"/>
</beans>
Guillaume Nodet ha scritto:
On 3/20/07, Andrea Zoppello <[EMAIL PROTECTED]> wrote:
Guillaume Nodet ha scritto:
> On 3/20/07, Andrea Zoppello <[EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>>
>> I've two questions about the usage of drools 3.1 component.
>>
>> 1)Is possible to specify a default "target service" where the
message
>> will be routed if no one of the
>> rule specified in thre rulebase file has been executed????
>>
>> This is due to a use case where i want to use the drools component
as a
>> "semantic validator" where a jbi
>> fault must be generated according to some rulebase otherwise i
want to
>> specify the default target service for the normal execution.
>>
>> Probably this is possible including a rule that route to this target
>> service at the end of the drl file, what i'm asking here if there is
>> another way of doing this.
>
>
> Not currently. But feel free to raise a JIRA and submit a patch for
> that.
>
Ok i'm not sure about the correct way to do the patch.
I'm starting from servicemix 3.1 src zip distribution.
I think that to add a new attribute to drools:endpoint i need
You should use a svn client to download the code.
This way, you can build against trunk (and update your sources
without loosing any modifications you made).
See http://incubator.apache.org/servicemix/source.html
1) To add it in the servicemix-drools.xsd file that i found in
servicemix-drools-3.1-incubating-installer.zip\lib\servicemix-drools-3.1-incubating.jar
This file is generated from the code.
It will be generated when you build using maven.
2) Modify the DroolsEndpoint class code
This step is oviously needed ;-)
Once you have modified the code and added a test case (if possible),
a diff file can be generated using
svn diff
Save the output and attach it to a JIRA issue.
I'm not able to find in the source distribution where the xsd file is
located.
> 2) Is possible to access datasource defined in smx jndi in the drools
>> drl file??
>> This is because because some semantic validation can require to
>> validate the message content querying
>> a database??
>
>
> Same answer. Though I don't really see how to to data.
> You can always lookup the DataSource using java calls, right ?
> Do you expect it to be directly accessible ?
>
> Thank you
>>
I'll try in the next day to access a datasource using java code inside
the drl than i will report
my results
Ok.
Thanks
>> Andrea Zoppello
>> Engineering Ing. Informatica
>>
>>
>
>