Activities
Workflow Manager contains the Standard Activities available in the System.Activities namespace, please visit https://msdn.microsoft.com/en-us/library/mt481468(v=vs.110).aspx for more information.
Activities descriptions:
|Category|Purpose|
|-|-|
|CalculateDfs2ExceedancePercent |Calculate the percentage of cells in a Dfs2 file exceeding a threshold value |
|CalculateDfs2Statistics |Calculate the cell statistics of an input Dfs2 |
|CopyDirectory |Copy a windows directory |
|CopyFile |Copy a file |
|CreateDirectory |Create a folder |
|DeleteDirectory |Delete a folder |
|DeleteFile |Delete a file |
|Dfs2Grid2Ascii |Convert a dfs2 file to Ascii format |
|Dfs2SpatialRModel | |
|DfsFileStatistics |Determines Start, End and Number of Timesteps for a Dfs file |
|Dfsu2Dfs2 |Convert a Dfsu to Dfs2 |
|Exec |Execute an application, batch file or command line |
|ExtractDfs0From2DDfsu |Obtain point values for specified location from a 2d Dfsu file |
|ExtractDfsu2DLayerFrom3D |Extract 2D Dfsu layer from 2d Dfsu |
|GetFiles |Get a list of files from a specified directory |
|Logging |Log text to a system |
|ModifyPfsFile |Modifies a PFS File |
|ReadFromFile |Read text from a file |
|ReadTimeseries |Read values from a time series |
|RenameDirectory |Rename a windows directory |
|RenameFile |Rename a file |
|ReportMessage |Report a message |
|ReportProgress |Report progress |
|RunIronPythonScript |Execute an iron python script |
|RunModel |Execute a DHI model |
|SendMail |Send an email |
|SpreadsheetToDictionaries |Converts a worksheet to a list of dictionaries |
|SummariseDfsu2DLayerFrom3D |Extract a single layer from a 3D DFSU file, and write it to a 2D dfsu file based on a summarisation |
|TimeseriesAnalysis |Analyse time series to determine Minimun, Maximum, Average or Sum |
|TransferTimeseries |Transfer time series from source to destination |
|WriteTimeseries |Write data to a time series |
|WriteTimestep |Write single time step to a time series |
|WriteToFile |Write text to a file |
|RunScenario |Run a MIKE Workbench Scenario |
CalculateDfs2ExceedancePercent¶
Purpose:
Calculate the percentage of cells in a Dfs2 file exceeding a threshold value
Description:
This Activity calculates the exceedance percentage of a dfs2 file above the specified threshold. This calls the MIKE Zero TXStat command line tool to effectively carry out this calculation.
The input dfs2 is processed with every selected time step and cell compared against the threshold. The result is a static or single time step dfs2, with each cell containing the exceeding percentage calculated for each time step in the selected duration for that cell location.
There is an associated designer for an improved user interface experience. The PrePopulate button populates the First time step and Last time step drop downs with the available time steps in the dfs2 file.
Properties:
Property | Description |
---|---|
Input Dfs2 File | Input Dfs2 to process. A file dialog browser is available for file selection. |
Output Dfs2 File | Resulting static Dfs2. A file dialog browser is available for file selection. |
Items | Comma separated list of items to compare against threshold value. |
Threshold | The threshold value used, default value is zero. |
Grid Limits | Comma separated list of grid indexes if only a spatial subset of the input file is to be processed. |
Include Missing Values | Boolean to specify if null or empty values will be included in calculation. Default is true. This is presented as a check box in the designer. |
First time step | First time step to include in calculation, default is very first time step. The designer contains a drop down with all possible values. |
Last time step | Last time step to include in calculation, default is very last time step. The designer contains a drop down with all possible values. |
CalculateDfs2Statistics¶
Purpose:
Calculate the cell statistics of an input Dfs2
Description:
This Activity calculates the statistics of an input Dfs2. This calls the MIKE Zero TXStat command line tool to effectively carry out this calculation.
The statistics that can be calculated are Maximum, Minimum, Mean, Standard Deviation and Median.
The input dfs2 is processed with every selected time step and cell. The result is a static or single time step dfs2, with each cell calculated statistic over the selected duration for that cell location
There is an associated designer for an improved user interface experience. The Retrieve File Data button populates the First time step and Last time step drop downs with the available time steps in the dfs2 file.
Properties:
Property | Description |
---|---|
Input Dfs2 File | Input Dfs2 to process. A file dialog browser is available for file selection. |
Output Dfs2 File | Resulting static Dfs2. A file dialog browser is available for file selection. |
Statistics Type | The statistics to calculate for each cell location, being Maximum, Minimum, Mean, Standard Deviation or Median. The designer contains a drop down with these statistics. |
Items | Single Item to be calculated or Colon separated range list of items to compare against threshold value. |
Grid Limits | Comma separated list of grid indexes if only a spatial subset of the input file is to be processed. |
First time step | First time step to include in calculation, default is very first time step. The designer contains a drop down with all possible values. |
Last time step | Last time step to include in calculation, default is very last time step. The designer contains a drop down with all possible values. |
CopyDirectory¶
Purpose:
Copy a windows directory
Description:
This activity copies a windows directory from source to destination. There is an option to delete the destination before copy, if it already exists.
Properties:
Property | Description |
---|---|
SourceDirectory | The source folder or directory to be copied |
DestinationDirectory | The destination to copy the folder too |
DeleteBeforeCopy | Boolean option to delete the destination before copy if it already exists |
CopyFile¶
Purpose:
Copy a file
Description:
This activity copies a file from source to destination on a file system
Properties:
Property | Description |
---|---|
SourceFileName | The source file to be copied |
DestinationFileName | The destination path to copy the file too |
CreateDirectory¶
Purpose:
Create a folder
Description:
This activity creates a windows folder or directory on the file system at the specified directory
Properties:
Property | Description |
---|---|
Directory | The path where the folder will be created |
DeleteDirectory¶
Purpose:
Delete a folder
Description:
This activity deletes a windows folder or directory on the file system at the specified location, and also deletes its contents
Properties:
Property | Description |
---|---|
Directory | The path where the folder will be deleted |
KillAnyUsingProcess | Boolean to specify if any processes have contained files opened are to be terminated |
DeleteFile¶
Purpose:
Delete a file
Description:
This activity deletes files on the file system at the specified paths
Properties:
Property | Description |
---|---|
Files | A list of file paths, of files that will be deleted |
KillAnyUsingProcess | Boolean to specify if any processes have files opened are to be terminated |
Dfs2Grid2Ascii¶
Purpose:
Convert a dfs2 file to Ascii format
Description:
This Activity converts a Dfs2 file to Ascii format. A single Ascii file is produced for each selected time step in the Dfs2 file
The MIKE Zero Mike2Grd tool is called by this Activity to carry out the conversion.
The Retrieve File Data button populates the First time step and Last time step drop downs with the available time steps in the dfs2 file.
Properties:
Property | Description |
---|---|
Input Dfs2 File | Input Dfs2 to process. A file dialog browser is available for file selection. |
Output Dfs2 File | Resulting static Dfs2. A file dialog browser is available for file selection. |
Item Number | Single Item to be convertered. |
First time step | First time step to include in calculation, default is very first time step. The designer contains a drop down with all possible values. |
Last time step | Last time step to include in calculation, default is very last time step. The designer contains a drop down with all possible values. |
Projection | The Projection to be used |
Dfs2SpatialRModel¶
Purpose:
Description:
Properties:
Property | Description |
---|---|
Folder Path | |
R File Location | |
Data Process Location | |
DFS2 Output Location | |
R Program File Path | |
First Time steps | |
Last Time steps |
DfsFileStatistics¶
Purpose:
Determines Start, End and Number of Timesteps for a Dfs file
Description:
This activity opens a Dfs file, determines the number of time steps, and the start and end dates
Properties:
Property | Description |
---|---|
InputFileName | The path of Dfs file to be read in |
StartTime | Output Property containing date and time of start of Dfs file being the first time step |
EndTime | Output Property containing date and time of end of Dfs file being the last time step |
TimeStepCount | Output Property containing the number of time steps |
Dfsu2Dfs2¶
Purpose:
Convert a Dfsu to Dfs2
Description:
This Activity converts a Dfsu mesh into a Dfs2 grid file. A designer has been developed for improved user interface. The tools calls the MIKE Zero DataManagerFM tool to carry out the conversion.
Properties:
Property | Description |
---|---|
Input Dfsu File | The Input Dfsu file to be converted. A file dialog browser is available for file selection. |
Output Dfs2 File | The output Dfs2 file to be generated. A file dialog browser is available for file selection. |
Projection Text | The spatial WKT projection name to be used in the output Dfs2 file |
Rotation | The spatial Rotation to be used in the output Dfs2 file |
Land Value | The Land Value to be used in the output Dfs2 file |
Grid Origin X | The X Origin of the grid to be used in the output Dfs2 file |
Grid Origin Y | The Y Origin of the grid to be used in the output Dfs2 file |
J | The number of grid cells along the X Axis to be used in the output Dfs2 file |
Dx | The X Axis grid spacing to be used in the output Dfs2 file |
K | The number of grid cells along the Y Axis to be used in the output Dfs2 file |
Dy | The Y Axis grid spacing to be used in the output Dfs2 file |
L | The number of grid cells along the Z Axis to be used in the output Dfs2 file |
Dz | The Z Axis grid spacing to be used in the output Dfs2 file |
Exec¶
Purpose:
Execute an application, batch file or command line
Description:
This activity executes an application, batch file or command line tool.
Properties:
Property | Description |
---|---|
FileName | The path to application, batch file or command line |
Arguments | Optional The list of arguments for the application, batch or command |
Priority | Optional Priority category for the executable process to run, being Normal, Idle, High, RealTime, BelowNormal, AboveNormal |
IsSuccess | Optional Output Boolean property indicating if the executable was a success or not |
ExitCode | Optional Output Interger property with exit code that ran |
ContinueOnError | Optional Boolean to not throw exception if executable fails |
WaitForExit | Optional Boolean to specify whether or not to wait for the executable to complete. Default is true. |
ExtractDfs0From2DDfsu¶
Purpose:
Obtain point values for specified location from a 2d Dfsu file
Description:
This activity accepts a list of x,y coordinates in a text file. These x,y locations have their corresponding results extracted from the Dfsu for the listed items. A designer has been developed for improved user interface.
Properties:
Property | Description |
---|---|
Input Dfsu2D File | The Input 2D Dfsu file to be converted. A file dialog browser is available for file selection. |
Output Dfs0 File | The results Dfs0 File. An item is created for each and every x,y location and for each item |
Items | Colon separated list of items to be read from the Dfsu. |
Location Definition File | A file containing x,y location to obtain results for |
ExtractDfsu2DLayerFrom3D¶
Purpose:
Extract 2D Dfsu layer from 2d Dfsu
Description:
This activity produces a 2D Dfsu for s single layer from a 3D Dfsu. A designer has been developed for improved user interface. A button “Retrive File Data” is available to prepopulate the drop down once input file has been selected.
Properties:
Property | Description |
---|---|
Input Dfsu3D File | The Input 3D Dfsu file to be extracted from. A file dialog browser is available for file selection. |
Output Dfsu2D File | The resulting 2D Dfsu File. A file dialog browser is available for file selection. |
Start Time Index | First time step to extract for, default is very first time step. The designer contains a drop down with all possible values |
End Time Index | Last time step to extract for, default is very last time step. The designer contains a drop down with all possible values |
Layer Number | The Layer to extract from the 3D file to produce the 2D file. The designer contains a drop down with all possible layers |
GetFiles¶
Purpose:
Get a list of files from a specified directory
Description:
This activity returns a list of files from a directory. The list can be filtered based on a search pattern. The relative or full paths can be returned. The sub directories are searched through as well.
Properties:
Property | Description |
---|---|
Directory | The directory path to retireve files for |
Pattern | Filter with text for search pattern |
ReturnRelative | Boolean to specify if relative paths within the directory are returned, or full paths instead |
Files | Output property containing the list of files returned |
Logging¶
Purpose:
Log text to a system
Description:
This activity logs text or a message to a specified system
Properties:
Property | Description |
---|---|
RepositoryType | The type of Repository |
ConnectionString | Connection string of destination system to log message too |
LogLevel | Log level being Debug, Information, Warning, Error or Critical |
Text | Text to be Logged |
Source | Source text identified what is creating the log |
Tag | Optional Property tag text |
MachineName | Optional Property for server name |
ModifyPfsFile¶
Purpose:
Modifies a PFS File
Description:
This activity modifies a PFS file, by writing a new Value at the specified XML Node Path.
Properties:
Property | Description |
---|---|
FileName | The file path of the PFS to be modified |
Path | The XML Node Path to have its value edited |
Value | The new Value for the XML Node Path |
ReadFromFile¶
Purpose:
Read text from a file
Description:
This activity reads all the text from a specified file. The text is read into the Text output property variable
Properties:
Property | Description |
---|---|
FileName | The file path of the file to be read |
Text | Output Property that contains the file contents text read in. |
ReadTimeseries¶
Purpose:
Read values from a time series
Description:
This activity reads in time series values from specified time series, for a date range. Dates and Values are returned. The connection string and ID are specified to determine what time series to read from.
Properties:
Property | Description |
---|---|
RepositoryType | The type of time series to read. Current supported time series are CSV files. |
ConnectionString | The connection string being the location of the CSV file |
TimeSeriesId | The Name or Id of the time series in the CSV file, to be read in |
Start | Start of period to read in values for. This is Optional |
End | End of Period to read in values for. This is Optional |
TimeSeriesData | Output Property with list of time series values with Dates and Values read in from the time series |
RenameDirectory¶
Purpose:
Rename a windows directory
Description:
This activity renames a directory on the file system with a new name
Properties:
Property | Description |
---|---|
Directory | The path of the Directory on the file system to have its name changed |
NewName | The new name for the directory |
RenameFile¶
Purpose:
Rename a file
Description:
This activity renames a file on the file system with a new name
Properties:
Property | Description |
---|---|
File | The path of the File on the file system to have its name changed |
NewName | The new name for the file |
ReportMessage¶
Purpose:
Report a message
Description:
This activity reports a message to the tracking system
Properties:
Property | Description |
---|---|
Message | The Message text to be reported |
Level | The Level of the message being Off, Error, Warning, Info, Verbose |
ReportProgress¶
Purpose:
Report progress
Description:
This activity reports progress to the tracking system
Properties:
Property | Description |
---|---|
Progress | Integer value denoting the progress |
ProgressMessage | Text message to be part of the progress reported |
RunIronPythonScript¶
Purpose:
Execute an iron python script
Description:
This activity runs an iron python module. A file path and module denotes where the script is located. Script arguments can be specified too
Properties:
Property | Description |
---|---|
PythonFileName | Path to *.py iron python text file |
FunctionName | Name of the module to be run |
PythonPath | Optional Path to iron python executable that actually runs the script |
Argument1 | Optional script argument |
Argument2 | Optional script argument |
Argument3 | Optional script argument |
Argument4 | Optional script argument |
Argument5 | Optional script argument |
Argument6 | Optional script argument |
Argument7 | Optional script argument |
Argument8 | Optional script argument |
Argument9 | Optional script argument |
RunModel¶
Purpose:
Execute a DHI model
Description:
This activity runs a model. The model types that can be run are MIKE11, MOUSEHD, MOUSERUNOFF, MIKESHE, AutoCAL, MIKE21, MIKE21FM, MIKEFLOOD or MIKEFLOODGPU.
Properties:
Property | Description |
---|---|
SimulationFileName | File Path of the model to be run |
ModelType | Enumerator of the model type to be run, options are MIKE11, MOUSEHD, MOUSERUNOFF, MIKESHE, AutoCAL, MIKE21, MIKE21FM, MIKEFLOOD or MIKEFLOODGPU |
IsSucces | Output Boolean Property specifying if the model ran successfully or not |
ContinueOnError | Optional Boolean to not raise Exception is the model fails |
SendMail¶
Purpose:
Send an email
Description:
This activity sends an email
Properties:
Property | Description |
---|---|
Body | Body text to be emailed |
From | From email address |
SmtpServer | Smtp server specified to carry out the sending of the email |
Subject | Email subject |
To | To email address |
SpreadsheetToDictionaries¶
Purpose:
Converts a worksheet to a list of dictionaries
Description:
This activity reads in a spread sheet from either Excel format, or MIKE Workbench format, and converts each column into a dictionary. The dictionary key is the very first column.
Properties:
Property | Description |
---|---|
RepositoryType | Type of spread sheet being either Excel or MIKE Workbench |
ConnectionString | Connection string for the spread sheet to connect to Excel or MIKE Workbench |
SpreadsheetId | Id or name of the spread sheet |
SheetId | Id or name of the worksheet or tab to read in |
Dictionaries | List of dictionaries that is returned. There is a dictionary for each value column, and the very first column is the key for each dictionary |
SummariseDfsu2DLayerFrom3D¶
Purpose:
Extract a single layer from a 3D DFSU file, and write it to a 2D dfsu file based on a summarisation
Description:
A 2D Dfsu is produced based on summarization being Maximum, Minimum or Average of spefieid Layers, Items and Time Steps in the 3D Dfsu input file. The result is single layer time varying and possibly multiple item 2D Dfsu file. A designer has been developed for improved user interface. A button “Retrive File Data” is available to prepopulate the drop downs once input file has been selected
Properties:
Property | Description |
---|---|
Input Dfsu File | The file path to the input 3D Dfsu. A file dialog browser is available for file selection. |
Output Dfsu File | The file path to the output 2D Dfsu. A file dialog browser is available for file selection. |
Summary Type | Summary Type for summarisation, being Avergae, Maximum or Minimum |
Layers | The layers in the 3D Input Dfsu to be summarised |
Items | Colon separated list of Item indexes to be summarised in the 3d Input File, and corresponding items will be produced in the output 2D Dfsu file |
First time step | First time step to extract for, default is very first time step. The designer contains a drop down with all possible values |
Last time step | Last time step to extract for, default is very last time step. The designer contains a drop down with all possible values |
TimeseriesAnalysis¶
Purpose:
Analyse time series to determine Minimun, Maximum, Average or Sum
Description:
This activity connect to a time series through DHI Domain Services and determine either the Minimum, Maximum, average or Sum. This can connect the spread sheet time series, CSV, MIKE Workbench as well as other repositories.
Properties:
Property | Description |
---|---|
RepositoryType | Type of time series being either CSV, Excel or MIKE Workbench |
ConnectionString | Connection string for the time series to connect to CSV, Excel or MIKE Workbench |
TimeSeriesId | Optional The Name or Id of the time series to analyse |
Start | Optional the Start of period to analyse within the time series |
End | Optional the End of period to analyse within the time series |
AnalysisType | Analysis Type being Minimun, Maximum, Average or Sum |
Result Output | Property that contains the analysis result |
TransferTimeseries¶
Purpose:
Transfer time series from source to destination
Description:
This activity connect to a spread sheet containing a definition of source and destination time series repositories for transfer.
Properties:
Property | Description |
---|---|
RepositoryType | Type of spread sheet being either Excel or MIKE Workbench |
ConnectionString | Connection string for the spread sheet to connect to Excel or MIKE Workbench |
SpreadsheetId | Id or name of the spread sheet |
SheetId | Id or name of the worksheet or tab to read in |
Replacements | Optional Property to replace time series values |
WriteTimeseries¶
Purpose:
Write data to a time series
Description:
This activity connect to a spread sheet containing a definition of source and destination time series repositories for transfer.This writes Domain Services data to specified time series again via Domain Services.
Properties:
Property | Description |
---|---|
RepositoryType | Type of spread sheet being either Excel or MIKE Workbench |
ConnectionString | Connection string for the spread sheet to connect to Excel or MIKE Workbench |
TimeSeriesId | Id or Name of time series |
TimeSeriesData | Data to be written to time series |
WriteTimestep¶
Purpose:
Write single time step to a time series
Description:
This writes DateTime, Value and QualityFlag to specified time series again via Domain Services.
Properties:
Property | Description |
---|---|
RepositoryType | Type of spread sheet being either Excel or MIKE Workbench |
ConnectionString | Connection string for the spread sheet to connect to Excel or MIKE Workbench |
TimeSeriesId | Id or Name of time series |
DateTime | DateTime for time step to be written |
Value | Value for time step being written |
QualityFlag | Quality Flag for time step being written |
WriteToFile¶
Purpose:
Write text to a file
Description:
The text specified is written entirely to file. This is an option to append instead of overwriting if the file exists
Properties:
Property | Description |
---|---|
Text | Text to be written to file |
Append | Optional Boolean to append text to file if it exists. Default is not to append but overwrite |
FileName | Path of File to be written to |
RunScenario¶
Purpose:
Run a MIKE Workbench Scenario
Description:
This Activity executes a simulation of a scenario in the MIKE Workbench Scenario Manager
Properties:
Property | Description |
---|---|
ConnectionString | Connection string to MIKE Workbench database |
JobUser | MIKE Workbench User to run the scenario job under |
JobWorkspace | MIKE Workbench Workspace to run the scenario job under |
ScenarioPath | Full Path of Scenario in MIKE Workbench Scenario Manager |
Approve | Boolean to Approve the Scenario after it has run |
StartTime | Start Date and Time of simulation |
EndTime | End Date and Time of simulation |
TimeOfForecast | Time Of Forecast of simulation |
SimulationPath | Output Property of full path of simulation in MIKE Workbench Scenario Manager |