Dependent workflows


What

Required

Description

schema location

WorkflowDescriptors.xml

yes

Definition of workflows

https://fewsdocs.deltares.nl/schemas/version1.0/workflowDescriptors.xsd

Each root workflow file configured in DELFT-FEWS must be registered in the WorkflowDescriptors configuration. This is required to identify the root workflows to DELFT-FEWS. The configuration also sets some properties of the workflow. Do not add workflow descriptors for workflow files that are only used as a sub workflow file.

The default name of the WorkflowDescriptors  is:  WorkflowDescriptors.xml. This file is located in the RegionConfigFiles folder.


Figure: Elements of the workflowDescriptor configuration.

workflowDescriptor

Root element of the WorkflowDescriptor. A new element is required for each workflow. Multiple instances may be defined.

Attributes:

<workflowDescriptor id="Run_Model_Catchment_A">
	<workflowFileName>Run_Model_Template</workflowFileName>
	<properties>
		<string key="CATCHMENT" value="A"/>
	</properties>
</workflowDescriptor> 

Node (since 2019.01)

The workflows can be organised in a folder structure in the Manual Forecast Display with the node element. The workflow desctiptor ID's need to be added to the nodes. If this functionality is included in the workflowDescriptors, workflows that are not included in the node tree will not be visible anymore in the Manual Forecast Display.

<rootNode>
		<node name="Import">
			<workflowId>Import_Hydro_Observations</workflowId>
			<workflowId>Import_Forecasts</workflowId>
			<workflowId>Import_EarthObservation</workflowId>
			<workflowId>Import_Earth2Observe</workflowId>
			<workflowId>Import_HYCOM_All</workflowId>
			<workflowId>Import_WaveWatch3</workflowId>
		</node>
		<node name="Process">
			<workflowId>Create_GFS_Ensembles</workflowId>
			<workflowId>Copy_GFS_Grid</workflowId>
			<workflowId>Modify_GFS_Grid</workflowId>
		</node>
		<node name="Rest">
			<workflowId>Process_Operational_Grids</workflowId>
			<workflowId>WFlow_historic</workflowId>
			<workflowId>WFlow_forecast</workflowId>
			<workflowId>WFlow_E2O_historic</workflowId>
			<workflowId>Fractions_forecast</workflowId>
		</node>
	</rootNode>

ApprovalEventCode (since 2020.01)

ApprovalEventCode is user configured event code that is logged upon approving a forecast, instead of default event code “DataStore.NewCurrentRun” . ApprovalEventCode make it possible to log different approval event codes per workflow, so that different actions can be triggered by Master-Controller after approving particular forecast(s) . ApprovalEventCode can be any string that meets requirements of the event code pattern .

Use ‘ approvalEventCode’ to take more control over the triggering of the actions by Master_controller after the forecast approval .
Both workflows below do exactly the same forecast, but log different approval event code. Only the code FluvialForecast.Approved is used in Event Action Mapping (more info Event and Actions)
Master-Controller triggers any follow up action only when FluvialForecast becomes approved. FluvialForecastIntermediate can be run without any follow up actions.

<workflowDescriptor id="FluvialForecastIntermediate" forecast="true" visible="true" autoApprove="true">  
             <approvalEventCode>FluvialForecastIntermediate.Approved</approvalEventCode>
</workflowDescriptor>
<workflowDescriptor id="FluvialForecast" forecast="true" visible="true" autoApprove="true">  
             <approvalEventCode>FluvialForecast.Approved</approvalEventCode>
</workflowDescriptor>