WCP-04 Exclusive choice - if/else branching

Created: 2012-02-20 23:20:08      Last updated: 2012-02-20 23:23:59

The choice of executing choiceA or choiceB is determined by using String_List_Intersection and String_List_Difference. If in="true" then the intersection will yield a non-empty list, triggering execution of choiceA. This list will however not differ from the input, and so choiceB will iterate over an empty list (ie. not execute).

Note how using 'difference' for the else-case here means that if you run the workflow with in="bob", choiceB would still run. Some early if/else workflows for Taverna 1 using Fail_if_false and conditional run would in these cases run both choices.

To extend this workflow with multiple choices, add several intersections, but use String_list_Union to feed the intersected lists to list2 of String_list_difference.

If no else-case is needed, simply delete String_list_difference and choiceB.

The nested workflows wrap the chosen services A and B, thereby the services do not need to support receiving the token.

It is important to note that in this workflow 'in' is an input port at depth 0 so that only a single value is 'chosen' over the same time. If this was made depth 1, then several choices could be triggered. If you want to perform iterations over A and B (presumably taking some inputs), with individual choices, you need to wrap this workflow as a nested workflow and iterate over it.

Information Preview

Information Run

Run this Workflow in the Taverna Workbench...

Option 1:

Copy and paste this link into File > 'Open workflow location...'
http://myexperiment.org/workflows/2743/download?version=1
[ More InfoExpand ]


Information Workflow Components

Information Authors (1)
Information Titles (1)
Information Descriptions (1)
Information Dependencies (0)
Inputs (1)
Processors (5)
Beanshells (0)
Outputs (1)
Datalinks (8)
Coordinations (0)

Information Workflow Type

Taverna 2

Information License

All versions of this Workflow are licensed under:

Information Version 1 (of 1)

Information Credits (1)

(People/Groups)

Information Attributions (2)

(Workflows/Files)

Information Tags (7)

Log in to add Tags

Information Shared with Groups (0)

None

Information Featured In Packs (0)

None

Log in to add to one of your Packs

Information Attributed By (0)

(Workflows/Files)

None

Information Favourited By (0)

No one

Information Statistics

 

Citations (0)

None


Version History

In chronological order:



Reviews Reviews (0)

No reviews yet

Be the first to review!



Comments Comments (0)

No comments yet

Log in to make a comment




Workflow Other workflows that use similar services (0)

There are no workflows in myExperiment that use similar services to this Workflow.