Bugzilla – Bug 4672
SPEC: How to identify the first job element.
Last modified: 2013-02-28 22:47:13 UTC
The first job element can be a step, flow, split, or a decision. I'm
wondering how an implementation determines which element should be the
first to run inside a job.
Or is there a requirement that applications have to order them in a
particular way? for example, the first non-abstract element under <job>
is the first to run.
I didn't find such language in the current spec draft. So looks like
this is left to implementations. I think this is an area that can
benefit from more detailed spec coverage, at least provide some
guidelines, usage tips, etc.
I guess one way is to traverse all next attr/element values, and if the
id of any non-abstract step/decision/flow/split is not referenced as
next by others, then it can be the head. Steps, split, flows and
decisions can be nested in multiple levels.
Some steps are not used as next, but exist as the parent of others:
<step id="child" parent="parent">
In the above example, I find both steps can be the head. So in order to
identify "child" is the element to run, we will also need to exclude
those that are parent of other elements.
Just wanted to share my questions and thoughts, and would like to hear
your insights and comments.
The spec does say:
"The first step, flow, or split defines the first step (flow or split) to execute for a given Job XML."
In the case of inheritance, would this be the first in the parent or child ?
The spec says this:
"5.2.5 Step Sequence
The first step, flow, or split defines the first step (flow or split) to execute for a given Job XML. The 'next' attribute on the step, flow, or split defines what executes next."
I will clarify the paragraph to make it clear that "first" means in order of occurrence parsing from beginning to end of the xml document. In the case of a step, the "first" step must be abstract=true.
This update will go into PFD v1.5.
Concerning inheritance, this matter of "first" could apply only to job inheritance and job inheritance explicitly excludes inheritance of steps, flows, splits, and decisions, as per section 5.8 Job XML Inheritance.