Jflow is a jQuery plugins and requires:
To use jflow, add the the following files to your WEB site:
Jflow provides different plugins to allow the developper to build easily his own WEB application.
The The following code presents an example of how to use the availablewf
plugin:
$(document).ready(function(){
$("#example").availablewf({
serverURL: "http://localhost:8080",
});
});
The availablewf()
plugin is in charge to display the list of all implemented workflows. This list
can be filtered and its visualization can be customized.
Call availablewf
with id element
with a single line of JavaScript:
$('#element').availablewf(options)
Options can be passed via JavaScript.
Name | Type | Required | Default value | Description |
---|---|---|---|---|
serverURL | path | false | http://localhost:8080 | The remote URL pointing to the running jflow server. |
template | string | false | Base HTML to use when creating the list of available workflows. The template will be injected into the defined element (element ). |
|
filters | list | false | [] | Defines the workflow classes that should not be displayed. |
filter_groups | list | false | [] | Defines the workflow groups that should be filtered. |
select | boolean | false | false | If true the workflows filtered using the filter_groups option will be displayed, if false they will not. |
Requests the jflow server to reload and refresh the workflow list.
$('#element').availablewf('reload')
Event Type | Description |
---|---|
select.availablewf | This event fires immediately when the user select a workflow on the list. The selected workflow is given as parameter to the callback function. |
$('#element').on('select.availablewf', function (workflow) {
// do something…
})
The activewf()
plugin displays a table with all the executed workflows. It allows to monitor all the workflows
and can be an enter point to monitor a specific workflow.
Call activewf
with id element
with a single line of JavaScript:
$('#element').activewf(options)
Options can be passed via JavaScript.
Name | Type | Required | Default value | Description |
---|---|---|---|---|
serverURL | path | false | http://localhost:8080 | The remote URL pointing to the running jflow server. |
template | string | false | - |
Base HTML to use when creating the list of active workflows. The template will be injected into the defined element (element ). |
metadataFilter | list | false | new Array() | Filter the displayed workflows by a list of metadata. |
Requests the jflow server to reload and refresh the active workflow list.
$('#element').activewf('reload')
Event Type | Description |
---|---|
select.activewf | This event fires immediately when the user select a workflow on the list. The selected workflow with an initialized status is given as parameter to the callback function. |
$('#element').on('select.activewf', function (workflow) {
// do something…
})
The wfform()
plugin builds the form the final user have to fill to run the workflow. The form can be
customized and several user actions can be catched.
Call wfform
with id element
with a single line of JavaScript:
$('#element').wfform(options)
Options can be passed via JavaScript.
Name | Type | Required | Default value | Description |
---|---|---|---|---|
serverURL | path | false | http://localhost:8080 | The remote URL pointing to the running jflow server. |
[*]Template | string | false | - |
wfform provides several templates for several types. As example, the dateTemplate is in charge to
display a date type. The other available templates are choiceTemplate , inputfileTemplate ,
browsefileTemplate , regexpfilesTemplate , booleanTemplate , textTemplate
and progressTemplate . |
workflowClass | string | true | null | The workflow class name, as defined in the Python class , of the workflow to build. |
displayRunButton | boolean | false | true | Should wfform display the button in charge to run the workflow. |
displayResetButton | boolean | false | true | Should wfform display the button in charge to reset the workflow. |
parameters | hashtable | false | {} | A hashtable fixing the value of the desired parameters defined by {param:value} . All the parameters with a fixed value
will be hidden from the form populated to the final user. |
timer | number | false | 2000 | The time in milliseconds between 2 updates of progressTemplate displayed when files have to be uploaded. |
forceIframeTransport | boolean | false | false | In case the application required cross-domain requests, the parameter should be settled to true. |
Resets all the form fields.
$('#element').wfform('reset')
Requests the jflow server to run the workflow with the specified parameters. Before submiting the workflow to the
server, all the fields are checked. Once the workflow is launched on the server side, the event run.wfform
is triggered.
$('#element').wfform('run')
Render the form. This method can be useful when the form is built within a hidden $("#element")
. The function
allows to render all form components such as the handsontable
displayed for MultiParameterList
.
$('#element').wfform('render')
Load the workflow information and display the corresponding form.
$('#element').wfform('load')
Event Type | Description |
---|---|
uploaded.wfform | This event fires immediately when the files to upload are all uploaded. |
run.wfform | This event is fired when the workflow has been launched on the server side. |
uploading.wfform | This event is fired immediately when the upload of the files is started. |
loaded.wfform | This event is fired when the workflow information have been retrieved from the server. |
$('#element').on('uploaded.wfform', function (workflow) {
// do something…
})
The wfstatus()
plugin is used to display a workflow execution status. This plugin is able to
display the workflow status using a component list layout or using a graph layout. In both case each command
lines run are monitored and an error report is provided if something wrong happends.
Call wfstatus
with id element
with a single line of JavaScript:
$('#element').wfstatus(options)
Options can be passed via JavaScript.
Name | Type | Required | Default value | Description |
---|---|---|---|---|
serverURL | path | false | http://localhost:8080 | The remote URL pointing to the running jflow server. |
headTemplate | string | false | - |
Base HTML to define the description of the workflow status. |
listTemplate | string | false | - |
Base HTML to define how to display the workflow monitoring when display="list" . |
workflowID | number | true | null | Defines the workflow ID returned by the server once it is launched. |
verbose | boolean | false | false | Should the error be verbose. |
display | string | false | "graph" | How should be displayed the workflow status - "graph" | "list". When "graph" is specified, each components are represented by a node and a link between 2 nodes is displayed if a file outputed by a component is used as input by the other one. "list" allows to represent each components by a progress bar. |
Requests the jflow server to reload and refresh the workflow status.
$('#element').wfstatus('reload')
Requests the jflow server to rerun the workflow.
$('#element').wfstatus('rerun')
Render the status. This method can be useful when the form is built within a hidden $("#element")
. The function
allows to render the cytoscape
graph.
$('#element').wfform('render')
Requests the jflow server to reset a specific component. The component_name
variable should be given to the function.
$('#element').wfstatus('reset', component_name)
The wfoutputs()
plugin displays all the generated outputs produced by the workflow execution
and provides a link to download the resulting files.
Call wfoutputs
with id element
with a single line of JavaScript:
$('#element').wfoutputs(options)
Options can be passed via JavaScript.
Name | Type | Required | Default value | Description |
---|---|---|---|---|
serverURL | path | false | http://localhost:8080 | The remote URL pointing to the running jflow server. |
template | string | false | - |
Base HTML to use when creating the list of workflow outputs. The template will be injected into the defined element (element ). |
logFile | list | false | [".stderr", ".stdout", ".log"] | Defines the extensions of all the log files. |
workflowID | number | true | null | The ID of the workflow for which the outputs should be returned. |
Requests the jflow server to reload and refresh the outputs list.
$('#element').wfoutputs('reload')