maxForks extended to multiple processes?

In my pipeline, I give the option to use multiple different aligners. However, I only want one alignment process instance to run at a time. Currently I only offer one aligner and control this by setting maxForks 1 in that process. Since different aligners may require different parameters or containers, I’d ideally like to have them be called via different processes, but then I’m not sure how I’d ensure only one of them is run at a time. Is there a way to do this?

Hi @bskubi. Just to confirm: The plan is for your pipeline to allow different aligners to be used in the same pipeline run?

Yes, that’s correct.

Because the alignment processes do not have a data dependency, you can create a state dependency so that one process starts only when the other finishes. There’s an implementation pattern for that here.