I'm trying to use Quartz Composer to create a continuous integration build radiator.
I put together a simple XML file to describe the projects and the latest success of each of their workflows:
<projects>
<project>
<title>Project A</title>
<workflows>
<workflow>
<title>Build 1.0</title>
<status>success</status>
</workflow>
<workflow>
<title>Build 2.0</title>
<status>success</status>
</workflow>
</workflows>
</project>
<project>
<title>Project B</title>
<workflows>
<workflow>
<title>Build 1.0</title>
<status>success</status>
</workflow>
</workflows>
</project>
</projects>
This will obviously have more information but I'm just trying to get the basics working for now. I set up a composition and am using XML Downloader to load the above XML file from the filesystem.
The problem I'm having is thus: when I use the Structure Key Member patch on an element with multiple children, I get back multiple children BUT when I use Structure Key Member on an element with just one child I get back the single child instead of a collection of 1 item.
I've illustrated the problem below in an example composition:
Am I doing something wrong? Is this expected behavior? Why isn't the lower chain not also returning a QCStructure?
Unfortunately, the
XML Downloader
patch doesn't properly handle multiple adjacent empty elements.One possible workaround might be to restructure your XML to remove the "projects" group, and just make "project" a property of each "workflow":
This produces a structure with usable results.
(When
XML Downloader
builds a structure from XML, attributes are equivalent to child tags, so "project" could be either and you'd get the same result.)