4 Replies Latest reply on Mar 31, 2014 9:43 AM by anikulin

    SY Service Channel in Drools Service

    anikulin

      Hi guys

       

      I'm using SY Drools Service and want to add Channel to it. I tried to expose already created SY Bean as a channel, but as a result neither the service operation was fired nor any exception occured. switchyard.xml configuration looks like this:

       

      <sca:component name="TestRule">
        <rules:implementation.rules>
        <rules:channels>
        <rules:channel
        class="org.switchyard.component.common.knowledgMy e.service.SwitchYardServiceChannel"
        name="BeanService" operation="send" reference="BeanService" />
        </rules:channels>
        <rules:manifest>
        <rules:resources>
        <rules:resource location="testRule.drl" type="DRL" />
        </rules:resources>
        </rules:manifest>
        <rules:operations>
        <rules:operation name="init" type="FIRE_UNTIL_HALT" />
        <rules:operation name="insertFact" type="INSERT">
        <rules:inputs>
        <rules:input from="message.content" />
        </rules:inputs>
        </rules:operation>
        </rules:operations>
        </rules:implementation.rules>
        <sca:service name="DroolsService">
        <sca:interface.java
        interface="com.example.switchyard.switchyard_channel_example.DroolsService" />
        </sca:service>
        </sca:component>
        <sca:component name="BeanServiceBean">
        <bean:implementation.bean
        class="com.example.switchyard.switchyard_channel_example.BeanServiceBean" />
        <sca:service name="BeanService">
        <sca:interface.java
        interface="com.example.switchyard.switchyard_channel_example.BeanService" />
        </sca:service>
        </sca:component>
      

       

      Please, let me know what I'm doing wrong. Thanks for help.

       

      Regards, Anton