Within the taskflow, define the binding type as
Event
and select the file listener as the event source. When you publish the taskflow, the taskflow subscribes to the file listener that is defined in it. When a file event occurs, the file listener invokes the taskflow.