How to make processes run sequentially in DSL2 #4353
-
I have three processes and want them to be completed on after the other, what would be a good way to accomplish this? Process1st {
input:
val channelx
output:
stdout
script:
"""
Foo1 channelx
"""
}
Process2nd {
input:
val channelx
output:
stdout
script:
"""
Foo2 channelx
"""
}
Process3rd {
input:
val channelx
output:
stdout
script:
"""
Foo3 channelx
"""
}
channelx=channel.of(x)
workflow {
Process1st(channelx)
Process2nd(channelx)
Process3rd(channelx)
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
According to your workflow block, there is no data dependency between the processes, which means there shouldn't be a reason for you to want them to be run sequentially. However, if you think there's still a need for them to be run sequentially, you can create state dependency as outlined here. |
Beta Was this translation helpful? Give feedback.
-
Another way of answering would be, in code, imagining
|
Beta Was this translation helpful? Give feedback.
According to your workflow block, there is no data dependency between the processes, which means there shouldn't be a reason for you to want them to be run sequentially. However, if you think there's still a need for them to be run sequentially, you can create state dependency as outlined here.