RISE UI: Choose Framework
Created: 2012-03-05 22:02:59
Last updated: 2012-03-05 22:03:48
This workflow ask the user to choose a framework among those present on the RISE server.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (0)
Titles (0)
Descriptions (0)
Dependencies (0)
Inputs (4)
Name |
Description |
UserWorkspace |
|
ServiceType |
|
server_port |
|
server_url |
|
Processors (5)
Name |
Type |
Description |
GetService |
rest |
|
ChooseFrameworkMessage |
stringconstant |
ValueSelect a framework |
ChooseFrameworkTitle |
stringconstant |
ValueFramework |
ListFramework |
xpath |
Xpath Expression/Service/Frameworks/Framework/Name |
ChooseFramework |
localworker |
Scriptimport javax.swing.BoxLayout;
import javax.swing.ButtonGroup;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
if ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {
throw new RuntimeException("selectionValues must be specified and non-empty");
}
ButtonGroup group = new ButtonGroup();
JPanel messagePanel = new JPanel();
messagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));
messagePanel.add(new JLabel((message == void ? null : message)));
JRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];
for (int i = 0; i < buttonArray.length; i++) {
buttonArray[i] = new JRadioButton(selectionValues.get(i));
if (i==0) buttonArray[i].setSelected(true);
group.add(buttonArray[i]);
messagePanel.add(buttonArray[i]);
}
JOptionPane.showOptionDialog(null, messagePanel, (title == void ? null : title),
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"OK"}, null);
String answer="";
for (JRadioButton button : buttonArray) {
if (button.isSelected()) {
answer=button.getText();
}
}
|
Outputs (1)
Name |
Description |
Framework |
|
Datalinks (9)
Source |
Sink |
UserWorkspace |
GetService:userworkspace |
ServiceType |
GetService:servicetype |
server_port |
GetService:port |
server_url |
GetService:url |
GetService:responseBody |
ListFramework:xml_text |
ListFramework:nodelist |
ChooseFramework:selectionValues |
ChooseFrameworkTitle:value |
ChooseFramework:title |
ChooseFrameworkMessage:value |
ChooseFramework:message |
ChooseFramework:answer |
Framework |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
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