-entry: alternative in version 26.04

I used -entry in my Nextflow run with Nextflow version 26.04, but I got the following error:

ERROR ~ The `-entry` option is not supported with the strict syntax – use a param to run a named workflow from the entry workflow

However, nextflow run -h shows:

-entry Entry workflow name to be executed

How should I execute a named subworkflow in version 26.04?

Hi @Hanjiewu , you need to call the named workflow through an entry workflow. If you have multiple named workflows and you want to be able to pick one, use a param.

For example:

workflow HELLO {
  // ...
}

workflow {
  if( params.flow == 'hello' )
    HELLO()
  // ...
}

To run the pipeline:

nextflow run main.nf --flow hello