1. Workflow 1.1. Introduction The Workflow module is a powerful graphical tool for flexible combination of any set of tasks. The figure below shows an example of a simple workflow, where a RIFLEX condition is followed by a post processor. When this workflow is being run, first the RIFLEX condition set will be run with the values of Hs and Tp set in the workflow and then a post processor will be run in order to find the maximum value for z-position. The data from the RIFLEX condition and from the post processor are stored in a file (using File Output) and may be inspected using plots after the workflow has finished. Using workflow also allows the user to interact with external programs without having to leave the interface. This is an efficient way of invoking for instance external post processing functionality. With workflow, the user have the possibility to share variables between various conditions and/or post processors. This is useful when running the same environment in SIMO and RIFLEX, the significant wave height can then be a variable in both SIMO and RIFLEX and be controlled by a workflow. A workflow task has one or more workflows and there can be many workflow tasks in a Workspace. 1.2. Getting started The easiest way of getting started with using workflows is to look at the examples found under Help > Examples > Workflow. 1.3. Workflow components 1.3.1. Condition A condition can be included in a workflow. Any condition in the workspace may be chosen. In addition, the user must choose the type of analysis to be performed (typically static or dynamic). Variables in the condition can be made available to the workflow by adding them using the link Add/remove variables in the condition editor. Only free variables can be added, that is, variables that are not varied in the the chosen condition (set or space). Results from a condition can be combined with other components in the workflow (for instance a post processor) using the output slot. 1.3.2. Workflow Set A workflow set is a variation of the variables in another workflow. It is analogous to a condition set. A workflow has to be chosen in the editor. Input and output can be added in the editor based on the available input/output in the chosen workflow. Variables from the chosen workflow can be added and varied in the table under Configure run variables. 1.3.3. Post processor A post processor can be included in a workflow. The post processor must be chosen in the editor. Input and output to the post processor can be added based on the available input/output in the chosen post processor. A post processor can contain variables, as any other task, and these can be controlled from a workflow if they are added in the editor. 1.3.4. Workflow A workflow can be included in another workflow. Input and output can be added in the editor based on the available input/output in the chosen workflow. A typical use of a workflow in another workflow is when the user wants to hide the details of one workflow to simplify the graphical presentation. 1.3.5. External Program An external program can be included in a workflow. The user must specify the external executable to be run, as well as any arguments. In the screenshot below, an example with Python is shown. The executable is C:\Python27\python.exe and the Python-script to be run is C:\SIMA\hdf5example.py. Data from a workflow can be exported to a file as part of running an external program. Add items in the table under Export to file and input slots will appear on the External Program box. Connect the desired data to an input slot and choose a file format and a file name. Three different file formats can be chosen for file export: CSV, column-based and HDF5. External data can be imported into a workflow as part of running an external program. Add items in the table under Import from file and output slots will appear on the External Program box. This data will be imported into the workflow when the external program has finished running. A typical application of an external program is when the user wants to run some specialized post processing using for instance MATLAB or Python. 1.3.6. Workflow Note A simple node which one can use to add notes to a workflow. By selecting and single-clicking the node, one can edit the text. Additionally the node is resizable to accommodate different amounts of text. 1.3.7. Double Variable A double variable can be connected to any input slot in a workflow. Variables in a workflow can be varied using a workflow set. A variable has a name and a default value. The default value will be used if the variable is not varied in a workflow set. 1.3.8. Integer Variable An integer variable can be connected to any input slot in a workflow. Variables in a workflow can be varied using a workflow set. A variable has a name and a default value. The default value will be used if the variable is not varied in a workflow set. 1.3.9. String Variable A string variable can be connected to any input slot in a workflow. Variables in a workflow can be varied using a workflow set. A variable has a name and a default value. The default value will be used if the variable is not varied in a workflow set. 1.3.10. Workflow Input Workflow Input can be connected to any component in a workflow in order to obtain data from other workflows. 1.3.11. File Input The file input node can be used to read data from file. The HDF5 file format is supported. See HDF5 file format for an explanation of usage and an example. 1.3.12. Workflow Output Workflow Output can be connected to any component in a workflow in order to make data available to other workflows. 1.3.13. File Output The file output node can be used to output data series to files. Four different formats are supported: CSV (comma separated) column HDF5 EXCEL CSV and column formatted files are suitable for exporting to Microsoft Excel, MATLAB and others. MATLAB, Python and several other programming languages and software packages have support for HDF5. See HDF5 file format for an explanation of usage and an example. EXCEL exports to an xlsx file which is an open XML format that may be opened in a Microsoft Excel Workbook or other open source office products like Libre Office, Open Office and others.. 1.3.14. Plot A plot can be connected to any component in a workflow in order to inspect the data. 1.4. Running a workflow A workflow can be run either by: right-clicking the workflow in the navigator and press Run workflow from start, or by right-clicking anywhere in the workflow diagram and press Run workflow from start. Parts of a workflow may also be run by right-clicking a box in the workflow diagram and press Run workflow from this point (or use the green play-button that appear when hovering the mouse over a box). The workflow will the run from the selected box to the end, without re-running preceding parts of the workflow. 1.5. Searching for errors When a run-time error occurs, the failing part of the workflow will be marked with an error sign and an error dialog will appear. The error dialog will give a hierarchy of error messages, enabling the user to find cause of the error. When the post processor is not giving results as expected, one may use the inspect option on the post processor box in the workflow diagram to open the post processor with data from the workflow. 1.6. Data storage All unnecessary data generated by a workflow will be deleted unless configured otherwise. The user may choose to keep all data by going to Tools > Preferences > General and disable the option Delete old results from disk automatically. Note: A large amount of data is generated and by choosing this option there is a risk of running out of storage. Condition Input