VMware Cloud Community
bmarzolf
Contributor
Contributor
Jump to solution

Can I reuse rules on multiple actions?

I find myself frequently creating a series of actions that work together, and all need the same set of rules applied to them. Is there a way to wrap the actions so that one rule list will apply to all the actions?

I tried applying the <rulesList> to an <actionList> but that isn't allowed.

Labels (1)
Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
michiel_dhont
Enthusiast
Enthusiast
Jump to solution

Hi,

You can bundle those actions to an <actionGroup>. For example:

  <postShowPageActionList>


   <actionGroup>
    <actionList>
     <setInstallerVariable>
      <name>project.component(premiumComponent).selected</name>
      <value>0</value>
     </setInstallerVariable>
     <setInstallerVariable>
      <name>project.component(premiumComponent).canBeEdited</name>
      <value>0</value>
     </setInstallerVariable>
    </actionList>

       ...

    <ruleList>
     <compareText>
     <text>${licenseKey}</text>
     <logic>equals</logic>
     <value></value>
     </compareText>
    </ruleList>
   ...

</actionGroup>

In that way you can apply the same rules on various actions.

Another possibility is to create a custom rule. In that way you can easily apply the same combination of rules throughout your project:

You can find more information about creating custom rules in the following section of our manual:

https://clients.bitrock.com/installbuilder/docs/installbuilder-userguide.html#snip3465738

Best regards,

Michiel

View solution in original post

Reply
0 Kudos
2 Replies
michiel_dhont
Enthusiast
Enthusiast
Jump to solution

Hi,

You can bundle those actions to an <actionGroup>. For example:

  <postShowPageActionList>


   <actionGroup>
    <actionList>
     <setInstallerVariable>
      <name>project.component(premiumComponent).selected</name>
      <value>0</value>
     </setInstallerVariable>
     <setInstallerVariable>
      <name>project.component(premiumComponent).canBeEdited</name>
      <value>0</value>
     </setInstallerVariable>
    </actionList>

       ...

    <ruleList>
     <compareText>
     <text>${licenseKey}</text>
     <logic>equals</logic>
     <value></value>
     </compareText>
    </ruleList>
   ...

</actionGroup>

In that way you can apply the same rules on various actions.

Another possibility is to create a custom rule. In that way you can easily apply the same combination of rules throughout your project:

You can find more information about creating custom rules in the following section of our manual:

https://clients.bitrock.com/installbuilder/docs/installbuilder-userguide.html#snip3465738

Best regards,

Michiel

Reply
0 Kudos
bmarzolf
Contributor
Contributor
Jump to solution

Thank you so much! This is exactly what I needed!

Reply
0 Kudos