public class WorkflowAction
extends java.lang.Object
implements java.io.Serializable
A workflow action consists of a source component, a list of target components, and data passed by the source component to the target. It also contains information of how to invoke source and target geese.
There are two scenarios where data is passed between Boss and Geese. We explain them through a simple example as follows. Suppose a user creates a workflow where Cytoscape opens a session file and broadcasts some data to Firegoose and MeV. In this example, Boss first starts Cytoscape, and then needs to pass the session file to it. To achieve this, Boss creates a WorkflowAction, sets the source to be Cytoscape, and the targets to be Firegoose and MeV. Boss will then set the url of the session file as the WorkflowComponent.ParamNames.Data to the source's params field and call the HandleWorkflowAction API of Cytoscape. When Cytoscape receives the WorkflowAction, it should get the data from the source's params field and open the session file.
Once Cytoscape is about to send data to the subsequent geese in the workflow (namely, Firegoose and MeV), it creates another WorkflowAction, setting the source to be Cytoscape and targets to be Firegoose and MeV. Now, it puts the data in the data field of the WorkflowAction. Note the data field is a list. Cytoscape should put the data to the field in the same order as the targets field. That is, if targets[0] is Firegoose and targets[1] is MeV, then data[0] should be assigned with data for Firegoose and data[1] should be assigned with data for MeV, respectively. Cytoscape calls the HandleWorkflowAction API of Boss, which will then create two WorkflowActions for Firegoose and Mev, respectively, and passes the data to them as described in the first scenario.
Modifier and Type | Class and Description |
---|---|
static class |
WorkflowAction.ActionType |
static class |
WorkflowAction.DataType |
static class |
WorkflowAction.Options |
Constructor and Description |
---|
WorkflowAction(java.lang.String workflowID,
java.lang.String sessionID,
java.lang.String componentID,
WorkflowAction.ActionType actionType,
WorkflowComponent source,
WorkflowComponent[] targets,
int option,
org.systemsbiology.gaggle.core.datatypes.GaggleData[] data) |
Modifier and Type | Method and Description |
---|---|
WorkflowAction.ActionType |
getActionType() |
java.lang.String |
getComponentID() |
org.systemsbiology.gaggle.core.datatypes.GaggleData[] |
getData() |
int |
getOption() |
java.lang.String |
getSessionID() |
WorkflowComponent |
getSource() |
WorkflowComponent[] |
getTargets() |
java.lang.String |
getWorkflowID() |
void |
setData(org.systemsbiology.gaggle.core.datatypes.GaggleData[] gdata) |
void |
setTargets(WorkflowComponent[] targets) |
public WorkflowAction(java.lang.String workflowID, java.lang.String sessionID, java.lang.String componentID, WorkflowAction.ActionType actionType, WorkflowComponent source, WorkflowComponent[] targets, int option, org.systemsbiology.gaggle.core.datatypes.GaggleData[] data)
workflowID
- The ID of a workflow. The ID is generated by the server when a workflow is saved.
If the workflow is not saved, the ID could be empty.sessionID
- The sessionID is generated by the Boss for each run of a workflow. It is used by
the geese of a workflow to store data corresponding to the session.componentID
- The ID of the source goose. This is used by the source goose to
generate report data for a workflow.actionType
- The type of the workflowAction (Request or Response).source
- The workflowComponent corresponding to the source goose.targets
- A list of workflowComponents corresponding to target geese.option
- Option of the workflowAction. Refer to the Options enum for details.data
- A list of data to be processed by target geese. Each element corresponds to
one element in the targets list.public java.lang.String getWorkflowID()
public java.lang.String getSessionID()
public java.lang.String getComponentID()
public WorkflowAction.ActionType getActionType()
public WorkflowComponent getSource()
public WorkflowComponent[] getTargets()
public void setTargets(WorkflowComponent[] targets)
public int getOption()
public org.systemsbiology.gaggle.core.datatypes.GaggleData[] getData()
public void setData(org.systemsbiology.gaggle.core.datatypes.GaggleData[] gdata)