Rules and Actions — isTrue is returning false when value is clearly matching (the log shows it) — CONFUSION

This post was originally published on this site

All I have a choiceParameter to allow the user to specify OS and version target (e.g. Red Hat Linux 7).  I am able to see the list of OS options fine.  I set an actionList nested in a set of PostShowPageActionList and showProgressDialogs (see XML code snippet below) . The actionList by itself works great.  But when I attempt to put a ruleList adjacent (under it) with <isTrue value=”opensuse15_1″/> it does not fire — and that’s because it says in the LOG (see below) that the result is ‘0’ even though the <value>:””opensuse15_1″” –> “”opensuse15_1″” which is clearly a match.

I’m confused so perhaps you might help me clarify why this isn’t working.  The goal is for the user to select the OS, me to test which OS it is and run the right set of OS library installers for that version of linux — i.e. if opensuse run zypper (list of packages) or if redhat run yum (list of packages) etc.

       

Log snippet:

Evaluating set of rules with ‘and’ evaluation logic

Properties of element <isTrue>:

<negate> : “0” -> “0”

<value> : “”opensuse15_1″” -> “”opensuse15_1″”

 

 

Evaluating rule <isTrue>

Result is ‘0’

Rule evaluation logic is ‘and’, no need to evaluate other rules

Rules are false

Rules do not match skipping action <showProgressDialog>

 

 

XML code snippet:

  <choiceParameter>

            <name>operatingSystem</name>

            <title>Select Operating System</title>

            <description>Operating system selection</description>

            <explanation>Choose the target Operating System</explanation>

            <value></value>

            <default>opensuse15_1</default>

            <allowEmptyValue>1</allowEmptyValue>

            <displayType>combobox</displayType>

            <ordering>default</ordering>

            <width>30</width>

            <optionList>

                <option description=”Red Hat Linux 7″ text=”Red Hat 7″ value=”redhat7″>

                    <image></image>

                </option>

                <option description=”Centos Linux 7″ text=”Centos 7″ value=”centos7″>

                    <image></image>

                </option>

                <option description=”Red Hat Linux 8″ text=”Red Hat 8″ value=”redhat8″>

                    <image></image>

                </option>

                <option description=”Centos Linux 8″ text=”Centos 8″ value=”centos8″>

                    <image></image>

                </option>

                <option description=”OpenSUSE Linux Leap 15.1″ text=”OpenSUSE Leap 15.1″ value=”opensuse15_1″>

                    <image></image>

                </option>

                <option description=”SUSE Enterprise” text=”SUSE Enterprise 15.2″ value=”suse15_2″>

                    <image></image>

                </option>

                <option description=”Ubuntu Linux” text=”Ubuntu 18.04″ value=”ubuntu18_04″>

                    <image></image>

                </option>

            </optionList>

            <postShowPageActionList>

                <showProgressDialog>

                    <title></title>

                    <actionList>

                        <runProgram progressText=”Installing Local OS RPMs …”>

                            <program>zypper</program>

                            <programArguments>in -y which vim unzip python3 python3-pip python-virtualenvwrapper python3-devel libgnutlsxx-devel libgnutls-devel gcc-c++ gnutls libjson-c-devel libboost_python-py3-1_66_0 libboost_python-py3-1_66_0-devel libboost_headers1_66_0-devel patterns-devel-base-devel_basis libopenssl-devel tcl</programArguments>

                        </runProgram>

                    </actionList>

                    <ruleList>

                        <isTrue>

                            <value>”opensuse15_1″</value>

                        </isTrue>

                    </ruleList>

                </showProgressDialog>

            </postShowPageActionList>

        </choiceParameter>

    </parameterList>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.