Mittwoch, 15. Mai 2013

New RQL Queries IF and FOR in Cleaner RQL

While seeting up the cleaner job (Excleanerbur how it is called in development), I found interesting new RQL Queries. RQLCOMMAND allows if and elseif queries as well as for loops. Richt now I'm unsure, whether this is limited to projects, language variants and project variants, or if this can be used in a general way. As soon as I find more time, I will investigate fruther. This might speed up complex RQL scripts a lot.

<?xml version="1.0" encoding="UTF-8"?>
<RQLCOMMAND type="for" name="PROJECTS">
    <LIST>
        <IODATA loginguid="[!guid_login!]">
            <ADMINISTRATION>
                <USER guid="[!guid_user!]">
                    <PROJECTS action="list" extendedinfo="1"/>
                </USER>
            </ADMINISTRATION>
        </IODATA>
    </LIST>
    <OBJECTIVES>
        <RQLCOMMAND type="if">
            <WHERE name="testproject" value="0" operator="="/>
            <OBJECTIVES>
                <RQLCOMMAND type="if">
                    <WHERE name="inhibitlevel" value="0" operator="="/>
                    <WHERE name="inhibitlevel" value="1" operator="="/>
                    <WHERE name="inhibitlevel" value="2" operator="="/>
                    <WHERE name="inhibitlevel" value="3" operator="="/>
                    <WHERE name="inhibitlevel" value="4" operator="="/>
                    <WHERE name="inhibitlevel" value="5" operator="="/>
                    <OBJECTIVES>
                        <RQLCOMMAND type="if">
                            <WHERE name="lockedbysystem" value="0" operator="="/>
                            <OBJECTIVES>
                               
                                <IODATA loginguid="[!guid_login!]">
                                    <ADMINISTRATION action="validate" guid="[!guid_login!]" useragent="script">
                                        <PROJECT guid="[!guid_project!]"/>
                                    </ADMINISTRATION>
                                </IODATA>
                                <RQLCOMMAND type="for" name="PROJECTVARIANTS">
                                    <LIST>
                                        <IODATA sessionkey="[!key!]" loginguid="[!guid_login!]">
                                            <PROJECT>
                                                <PROJECTVARIANTS action="list" />
                                            </PROJECT>
                                        </IODATA>
                                    </LIST>
                                    <OBJECTIVES>
                                        <RQLCOMMAND type="for" name="LANGUAGEVARIANTS">
                                            <LIST>
                                                <IODATA loginguid="[!guid_login!]" sessionkey="[!key!]">
                                                    <PROJECT>
                                                        <PROJECTVARIANTS action="load">
                                                            <PROJECTVARIANT guid="[!guid_projectvariant!]"/>
                                                        </PROJECTVARIANTS>
                                                    </PROJECT>
                                                </IODATA>
                                            </LIST>
                                            <OBJECTIVES>
                                                <RQLCOMMAND type="if">
                                                    <WHERE name="cleanuplive server" value="1" operator="="/>
                                                    <OBJECTIVES>
                                                        <IODATA loginguid="[!guid_login!]" sessionkey="[!key!]">
                                                            <PROJECT>
                                                                <CLEANER action="delete" projectvariantguid="[!guid_projectvariant!]" languagevariantguid="[!guid_languagevariant!]">
                                                                    <EMAIL subject="[!mail_subject!]" userguid="[!guid_recipient!]">
                                                                <![CDATA[You can insert an optional email text here.]]>
                                                                    </EMAIL>
                                                                </CLEANER>
                                                            </PROJECT>
                                                        </IODATA>
                                                    </OBJECTIVES>
                                                </RQLCOMMAND>
                                            </OBJECTIVES>
                                        </RQLCOMMAND>
                                    </OBJECTIVES>
                                </RQLCOMMAND>
                                
                            </OBJECTIVES>
                        </RQLCOMMAND>
                    </OBJECTIVES>
                </RQLCOMMAND>
            </OBJECTIVES>
        </RQLCOMMAND>
    </OBJECTIVES>
</RQLCOMMAND>

Dienstag, 28. Februar 2012

Human RQL Plugins for OpenText / RedDot

When working with Management Server / RedDot CMS, there are numerous tasks which are dead simple, but quite hard to automate via scripting. Content migrations, redesigns or the set up of a new project from scratch are good examples. Sometimes there's time consuming tasks, but your inhouse cms resources are booked out or too valuable for this kind of job. This is when you whish for an "Army of students" getting things done for you.

Donnerstag, 23. Februar 2012

Why you do want an RQL Framework

Prologue
Some of the hints or techniques I describe might seem trivial to you. In this case, please pick the raisins and leave the rest. Funny enough there is lots of users even in large enterprises who don't know them.