Events under Nextflow

How can I specific events (push/pull, publish/subscribe) under Nextflow? Can such events be used to invoke a Nextflow workflow or would it also be possible to control to which follow-up tasks the workflow proceeds based on events. where can I find more information about events based on which control or data flow can be controlled?

You can have trigger events with Seqera Platform. You can read more about it here. For Nextflow alone, I think it’s limited to options during pipeline execution, such as the watchPath channel factory, which may be very limited compared to what you’re looking for.

many thanks. i just checked the event support under Seqera platform. does it allow more than invoking a full workflow based on events? For instance, does it allow to wait for an event inside of a workflow for instance to control the data flows to or from processes?

You should be able to do this with Nextflow alone. Nextflow pipelines are very dynamic and can work differently based on running circumstances, if you want it to.

Can you give me an example of what you want to do so I can confirm?

the ultimate example to challenge nextflow would be whether it can be used to build a state machine as shown in the attached file. assume that the states are nextflow processes. how could I use nextflow to connect these processes through events that control that transmission between states (processes). input and ouput data or processes could be transferred as part of events or by using an external repository. Is it possible to use Nextflow to build such an application?

statemachine.pdf (30.8 KB)

I think so. Maybe this discussion will clarify things for you.