Make Groups for Tutorial
Created: 2014-04-16 15:57:22
Last updated: 2015-10-12 12:55:21
The workflow pairs people from two groups of equal size into the same number of pairs with one member from each group. This is done randomly, using the random.org randomization engine, which in turn is based on atmospheric radio noise.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Descriptions (1)
The workflow pairs people from two groups of equal size into the same number of pairs with one member from each group. This is done randomly, using the random.org randomization engine, which in turn is based on atmospheric radio noise. |
Dependencies (0)
Inputs (2)
Name |
Description |
expeRts |
|
beginneRs |
|
Processors (6)
Name |
Type |
Description |
Generate_Random_Org_Call |
beanshell |
Scriptout1 = "https://www.random.org/sequences/?min=0&max=" + in1 + "&col=1&format=plain&rnd=new" |
Get_Web_Page_from_URL |
localworker |
Scriptif ((url == void) || (url == null)) {
throw new RuntimeException("The url must be specified");
}
URL inputURL = null;
if (base != void) {
inputURL = new URL(new URL(base), url);
}
else {
inputURL = new URL(url);
}
URLConnection con = inputURL.openConnection();
InputStream in = con.getInputStream();
StringBuffer result = new StringBuffer();
BufferedReader reader;
String encoding = con.getContentEncoding();
if (encoding == null) {
reader = new BufferedReader(new InputStreamReader(in));
} else {
reader = new BufferedReader(new InputStreamReader(in, encoding));
}
String line = null;
String NEWLINE = System.getProperty("line.separator");
while ((line = reader.readLine()) != null) {
result.append(line);
result.append(NEWLINE);
}
reader.close();
contents = result.toString();
|
Make_Groups |
beanshell |
Scriptout1 = new ArrayList();
for (i=0; i |
Split_string_into_string_list_by_regular_expression |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
Line_Break |
stringconstant |
Value\r\n|\n |
Get_Number_of_Groups |
beanshell |
Scriptout1 = in1.size() - 1; |
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
Generate_Random_Org_Call |
|
in1
|
out1
|
Make_Groups |
|
in1
in2
in3
|
out1
|
Get_Number_of_Groups |
|
in1
|
out1
|
Datalinks (9)
Source |
Sink |
Get_Number_of_Groups:out1 |
Generate_Random_Org_Call:in1 |
Generate_Random_Org_Call:out1 |
Get_Web_Page_from_URL:url |
beginneRs |
Make_Groups:in1 |
expeRts |
Make_Groups:in2 |
Split_string_into_string_list_by_regular_expression:split |
Make_Groups:in3 |
Get_Web_Page_from_URL:contents |
Split_string_into_string_list_by_regular_expression:string |
Line_Break:value |
Split_string_into_string_list_by_regular_expression:regex |
beginneRs |
Get_Number_of_Groups:in1 |
Make_Groups:out1 |
Groups |
Uploader
License
All versions of this Workflow are
licensed under:
Version 2 (latest)
(of 2)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment