Skip to content

Working with Solution Sets

Solution Sets is a concept introduced in IFS Cloud being a simple configuration which defines what components should be enabled or disabled from the whole IFS component suite.
Being integrated with Developers Studio and Code Generation, any active Solution Set configuration will simply act as a filter and...

  • Show and/or Code Generate the enabled components
  • Remove and/or Not Code Generate the disabled components

In IFS Cloud, the Workspace/BuildHome file structure will always be complete and contain all components IFS provides, physically on disk. That is a big change compared to previous versions of IFS Applications where only the components that were to be installed were also physically available on the Workspace/BuildHome. Then, all missing components were then simply assumed not being available and were therefore never installed.

IFS Cloud, having all components always available, is instead relying on the SolutionSet configuration file (solutionset.yaml) whose purpose is to list the components that should be enabled and by that, installed.

Figure:  *solutionset.yaml* configuration file

Projects using Solution Set

When the solutionset.yaml file is located by in the root of the FNDBAS component, Developers Studio will adjust its content and limit the components in the Projects Navigator, listing only the components that are defined as enabled (set as true in the yaml file).

Figure:  Projects Navigator, reflecting the enabled components defined as **true** in the *solutionset.yaml*

Note:   If no solutionset.yaml file is found, Developers Studio will assume everything is available (that is, assuming it�s still physically available on disk).

When a Project is opened and the solutionset.yaml is found (in the FNDBAS component), the tooltip on each Project node in the Navigator will display the used Solution Set Id.

Figure:  Tooltip showing the active Solution Set Id, defined in the *solutionset.yaml*

Details about the SolutionSet definition can be shown by opening the file using the RMB option found on the Project node, named Open Solution Set

Figure:  RMB option **Open Solution Set**

If the content of a SolutionSet file is changed, typically if you toggle a component true/false, Developer Studio must re-initialize using the updated solutionset.yaml, or the listed components will be shown incorrectly. That�s done by starting the RMB option Reinitialize Solution Set, also found on the Project node. As alternative, you can simply Close and then Open you project again as that will apply the updated solutionset.yaml and correctly initialize the components.

Figure:  RMB option **Reinitialize Solution Set**

Code Generation

The whole impact of a SolutionSet definition is seen first when we start to code generate IFS Cloud. Components that are disabled ( false ) will not be shown in the Projects Navigator and therefore not being possible to code generate. For components that are enabled ( true ), there will also be a noticeable change during the code generation as the model files containing items marked with the DynamicComponentDependency attribute will check the component availability using the SolutionSet definition. If the dependent component is disabled (or not listed in the SolutionSet), the result will be same as if the mentioned component was not physically available on disk. That means that the entire section below each DynamicComponentDependency annotation will be removed, not being part of the code generation.

Having the Solution Set integration with Developers Studio, developers can now simply and quickly toggle the enable state of a component, back and forth, in order order to see the impact of it when code generating the model.

Let us use a simple example and code generate a client file, Formula.client (APPSRV) with a SolutionSet containing partca: true:

1. In DevStudio, find and select the Formula.client file
2. Select the file and RMB on it, choosing the option Generate Code
3. The result should open an Output window listing several files being code generated.

Figure:  **Generate Code** for **Formula.client**
  1. Run the first two steps again (1 and 2) and you should get an Output like

Figure:  **Generate Code** for **Formula.client** once again

The key issue here is that all the files that were generated now are an exact match of the files that were already stored on the disk, hence the message
4 files generated but not written to disk since they weren't modified.

  1. Now, let�s disable the PARTCA component in the solutionset.yaml file, setting partca: false
    6. On the Projects Navigator node, start the RMB option Reinitialize Solution Set
    7. Run the first two steps once again (1 and 2) and you should now get new files with a difference like:

Figure:  **Generate Code** for **Formula.client** once again, after having set **partca: false**

As noticeable, several files are now regenerated, being written to disk overwriting the previous files. Why is that, for a file hosted in APPSRV when all that was done was disabling the PARTCA component?
The answer to that will be probably obvious for many if we open up the Formulas.client file and find the following section:

Figure:  *@DynamicComponentDependency* tags makes the code to change

As shown, the Formula.client hosted in APPSRV contains dynamic dependencies to PARTCA, being annotated using the @DynamicComponentDependency attribute, resulting in having the command UsedbyGroupsCommand to be�

  • ...Included if the PARTCA component is enabled ( partca: true )
  • ...Excluded in the PARTCA component is disabled ( partca: false )

By switching the component(s) in the solutionset.yaml file true or false, will result in different code generation of the files having the extensions.projection/.client/.app

Note:   If a component is missing the solutionset.yaml file, the code generation will treat that the same as having an entry like <component>: false