Alternative channel usage ifempty #3872
Unanswered
narsapuramvijaykumar
asked this question in
Q&A
Replies: 1 comment
-
I think what you would need to do here is merge the channels from A and B and apply the if-else logic in a map operator. You will need some kind of key, like a sample id, with which to join the two channels correctly. Here's a rough example: ch_a2c = proc_a() // each item looks like [sample_id, a_data]
ch_b2c = proc_b() // each item looks like [sample_id, b_data]
ch_a_or_b = ch_a2c
| join(ch_b2c)
| map { sample_id, a_data, b_data -> [sample_id, b_data ?: a_data] }
proc_c(ch_a_or_b) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Team,
I'm looking for an option under DSL-2 if a process-B fails to generate the required input(channelB2C) for process-C then it has to utilize the input from process-A(channelA2C).
I have tried the ifEmpty operator, if-else conditions under workflow and also params declaration to achieve the same and haven't got a fruitful solution post multiple attempts..!!
Thanks in advance.
Regards,
Vijay N
Beta Was this translation helpful? Give feedback.
All reactions