1 Reply Latest reply on Oct 26, 2011 5:40 AM by tfennelly

    FileWatcher with SwitchYard

    scisci

      Hi,

      I'm new to switchyard and also to AS7.

      My problem is to start a bpm ( bpmn2 ) with SwitchYard services when a file is put in a directory.

      Would Someone please help me or tell me where is possible to find am How to.

      Tanks

      Mirko

        • 1. Re: FileWatcher with SwitchYard
          tfennelly

          Take a look at the "camel-binding" and "bpm-service" quickstarts.  What you're looking for sounds like a hybrid of the two of these examples.

           

          Your switchyard config might end up looking something like....

           

          <?xml version="1.0" encoding="UTF-8"?>
          <switchyard xmlns="urn:switchyard-config:switchyard:1.0">
              <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="osdemo" targetNamespace="urn:switchyard-quickstart:bpm-service:1.0">
                  <service name="ProcessOrder" promote="ProcessOrder">
                      <camel:binding.camel configURI="file://target/input?fileName=test.txt&amp;initialDelay=50&amp;delete=true"/>
                  </service>
                  <component name="ProcessOrder">
                      <implementation.bpm xmlns="urn:switchyard-component-bpm:config:1.0" processDefinition="META-INF/ProcessOrder.bpmn" processId="ProcessOrder">
                          <taskHandler class="org.switchyard.component.bpm.task.SwitchYardServiceTaskHandler" name="SwitchYard Service"/>
                      </implementation.bpm>
                      <service name="ProcessOrder">
                          <interface.java interface="org.switchyard.quickstarts.bpm.service.ProcessOrder"/>
                      </service>
                  </component>
              </composite>
          </switchyard>
          
          1 of 1 people found this helpful