Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As of 2021.01 the new WhatIf functionality is being introduced with the intention to remove the outdated WhatIf functionality by 2023. This new WhatIf functionality uses WhatIfTemplates which can be populated in the WhatIf Editor, i.e. the display to create whatif-instances that can be applied to a workflow. The new WhatIf functionality works in 2021.01 and 2021.02 only in Stand-Alone, while from 2022.01 onwards all features work also on live systems.


Code Block
languagexml
titleExplorer task definition for WhatIfEditor
		<explorerTask name="WhatIf">
			<predefinedDisplay>what if editor</predefinedDisplay>
			<toolbarTask>true</toolbarTask>
			<menubarTask>true</menubarTask>
			<loadAtStartup>true</loadAtStartup>
		</explorerTask>

...

You can use the IFD-config option <enableAutoApprove> to bring the auto approve button to the attention of the user. This checkbox is however not shown when specifying a relative viewPeriod in the IFD-node.

Code Block
languagexml
titleConnecting a WhatIf-template to a workflow in the Topology.xml or TopologyGroup.xml
        <node id="run_whatif_properties" name="wf1 t1 Properties">
            <workflowId>Test_WhatIfSettings</workflowId>
			<enableAutoApprove>false</enableAutoApprove>
            <whatIfTemplateId>whatif_properties</whatIfTemplateId>....

...

The whatIfTemplates-schema

Code Block
languagexml
titleSchema reference
<?xml version="1.0" encoding="UTF-8"?>
<whatIfTemplates xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews httphttps://fewsfewsdocs.wldelftdeltares.nl/schemas/version1.0/whatIfTemplates.xsd">
</whatIfTemplates>

...

Attribute default refers to the default value selected and shown in the dropdown box. Be aware that the default value should account for the hidePattern option. When hidePattern is false, the default should include the full string including the search pattern. When hidePattern is true, the default value should include only the selected postfix.

Code Block
languagexml
titleSpecifying default values in relation to the hidePattern option (WhatIfTemplates.xml)
    <valueTypes>
        <configFile hidePattern="true" id="select_moduledataset" pattern="moduledataset_*" type="module dataset" default="grid_A"/>
        <configFile hidePattern="false" id="select_moduleparfile" pattern="moduleparfile_fixed_*" type="module parameter" default="moduleparfile_fixed_base"/>

...