You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 connection between WhatIfs-instances and workflows is established via the IFD, the Interactive Forecasting Displays, where a <whatIfTemplateId> can be defined after the <workflowId> in the Topology.

Connecting 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>
            <whatIfTemplateId>whatif_properties</whatIfTemplateId>....

The WhatIf Editor uses the whatifTemplates.xsd schema. This schema allows the configuration of a whatif-template, which is used in the WhatifEditor GUI to allows the specification of properties and modifiers to be applied in a whatif-instance.

Properties can be specified directly (string, int, double, boolean) or by selection from an enumeration or by selection from a configuration file (e.g. moduledataset, module parameter file)

Modifiers can be specified per modifierType. The actual behaviour of the modifier depends on the setting of <whatIfModifierType> element for this modifierType in the ModifierTypes.xml:

  • only apply the modifier if referenced in a whatif
  • always apply the modifier (i.e. the default behaviour)
  • never apply the modifier in a whatif workflow (= always apply unless running a whatif workflow)

Note: Modifiers need to be committed (i.e. non-local) to become available for application in a whatif-instance. It may therefore be useful to turn on the <autoCommit>-flag in the ModifierTypes.xml

Specifying modifier behavior in relation to the whatif in the ModifierTypes.xml.
    <timeSeriesModifier id="modify_timeseries_only_applied_in_whatif" name="Modify time series (only applied in whatif)">
        <whatIfModifierType>apply if referenced in what-if workflow</whatIfModifierType>
        <timeSeries>....

The whatIfTemplates-schema

The whatifTemplates-schema contains two main sections:

  • valueTypes: to specify the kinds of properties and their limitations
  • whatifTemplates: to compose which properties and modifiers can be specified in the template. whatifTemplates can be nested (but not unlimited)


  • No labels