I just read over the BES.XSD
since it had been a while since I had looked at it to figure out what FixletWithActions
is and now I understand what the issue is in this specific case.
FixletWithActions
is NOT a thing that can be submitted to the BigFix REST API at all, it isnāt actually a real thing what so ever. It is just a pointer within the XSD itself to the āTypeā and schema for Fixlets
and Tasks
.
There are a few different things you can send to the BigFix REST API as far as real content XML that is the same as if you would export it from the console. You can see these in the XSD as anything that starts with <xs:element name=
at the top level at the very start of the XSD within this key:
<xs:element name="BES">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
So what the heck is FixletWithActions
???
Well, in BigFix, technically, there is almost 0 difference between a Fixlet and a Task as far as the actual XML is concerned internally. There are very slight differences in terms of defaults and default behaviors within a baseline, but as far as how they are represented internally, no difference, which is what this actually is saying here:
<xs:element name="BES">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Fixlet" type="FixletWithActions" />
<xs:element name="Task" type="FixletWithActions" />
What this means is that both a Fixlet
and a Task
are defined by the schema as laid out within the named ātypeā FixletWithActions
within the XSD but FixletWithActions
only exists within the XSD itself as a pointer to that complex type. If you want to create a Fixlet OR a Task, then you must generate XML which has all the required elements within the FixletWithActions
but the actual XML would be something like:
<BES>
<Fixlet>
`the required stuff according to FixletWithActions`
</Fixlet>
</BES>
or
<BES>
<Task>
`the required stuff according to FixletWithActions`
</Task>
</BES>
If you really want all the details, expand this
So both Fixlet
and Task
are of type FixletWithActions
which has the following schema:
<xs:complexType name="FixletWithActions">
<xs:complexContent>
<xs:extension base="Fixlet">
<xs:sequence>
<xs:element name="DefaultAction" type="FixletAction" minOccurs="0" />
<xs:element name="Action" type="FixletAction" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Notice the <xs:extension base="Fixlet">
element?
This means that FixletWithActions
has all of the schema of type Fixlet
as well.
This is where things get even more confusing. Why is there a Fixlet
type that Fixlet
itself extends?
The reason is that when BigFix first started everything was a Fixlet
and there were ONLY Fixlets. It was the only content within BigFix. As all other content was added to BigFix, that content extended the base type, which was Fixlet
. So in a sense, a Fixlet is a very specific instance of the Fixlet
type, but a Task
and a Baseline
and most other BigFix content is also an extension of this Fixlet
type. In fact, as Iām typing this, Iām realizing this might cause a circular reference within the schema itself.
So the full reality of the schema of a Fixlet is basically something like:
Fixlet (element)
-> Fixlet type
DefaultAction element (0 or 1)
-> FixletAction type
various elements
-> ActionScript type
-> ActionSuccessCriteria type
-> ActionSettings type
-> ActionSettingsLocks type
Action element (0 or more)
-> FixletAction type
various elements
-> ActionScript type
-> ActionSuccessCriteria type
-> ActionSettings type
-> ActionSettingsLocks type