Bug 4537

Summary: How are flows identified within a split?
Product: jbatch Reporter: mminella
Component: sourceAssignee: cvignola
Status: RESOLVED MOVED    
Severity: normal CC: issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments: flowType has parent

Description mminella 2013-01-17 16:21:37 UTC
In section 5.4 on page 37, how are flows identified within the split?  Inline only (this prevents reuse of flows)?
Comment 1 cvignola 2013-01-17 16:58:18 UTC
Well, I suppose there are two ways:

<split>
<!- inline -->
<flow>
    <step>
    </step>
</flow>
<!- inheritance -->
<flow parent= />
</split>

What's missing?
Comment 2 mminella 2013-01-17 17:35:47 UTC
The flow element (as defined in 5.3 of the spec) doesn't have a parent attribute as you show in your example and since jobs don't inherit steps, I wouldn't expect flows to as well...
Comment 3 cvignola 2013-01-17 18:15:05 UTC
My mistake.  I thought there was a parent attribute defined on flow in the spec.  There is not.  

Do you propose we add a parent attribute to flow?  

If yes, what do you propose a child flow inherits from its parent?  The steps?  Everying but the steps?  Other?  Please elaborate.  Thanks
Comment 4 waynexlund 2013-01-24 05:45:23 UTC
Created attachment 68 [details]
flowType has parent
Comment 5 waynexlund 2013-01-24 05:45:56 UTC
Comment on attachment 68 [details]
flowType has parent

Just exposing our design for FlowType having a parent.
Comment 6 mminella 2013-01-24 16:10:16 UTC
In SB, there are two different types of flows defined in the XSD.  A flowType which is for defining an inline flow.  There is also an external flow that allows the configuration to reference an externally defined flow.  The external version has a ref attribute that allows you to refer to a flow defined elsewhere (same way we are referring to readers/writers/etc.  The other one does have a parent attribute for inheritance.
Comment 7 cvignola 2013-01-24 20:11:42 UTC
(In reply to comment #6)

The spec presently defines the inline flow.  The spec does not presently have a provision for external flows or flow inheritance.  Are those the same or different concepts?  I can't quite tell.




> In SB, there are two different types of flows defined in the XSD.  A flowType
> which is for defining an inline flow.  There is also an external flow that
> allows the configuration to reference an externally defined flow.  The external
> version has a ref attribute that allows you to refer to a flow defined
> elsewhere (same way we are referring to readers/writers/etc.  The other one
> does have a parent attribute for inheritance.
Comment 8 mminella 2013-01-24 22:57:47 UTC
2 things here in response to comment #7:
1.  I was incorrect on the configuration of an external flow.  An external flow would be configured as follows (our error message is inconsistent with what we actually accept...the below configuration works):

	<flow id="externalFlow">
		<step id="flow.step1" parent="parentStep"/>
	</flow>

	<job id="splitDecider" incrementer="incrementer">
		<split id="step1">
 			<flow parent="externalFlow"/>
			<flow>
				<step id="step2b" parent="parentStep"/>
			</flow>
		</split>
	</job>

2.  A job in SB actually does not allow for inline flows at the job level.  For example, the following configuration is invalid in SB:

	<flow id="externalFlow">
		<step id="flow.step1" parent="parentStep"/>
	</flow>

	<job id="splitDecider" incrementer="incrementer">
		<flow parent="externalFlow">
			<step id="step1b" parent="copyFileStepScrewedUp"/>
		</flow>
	</job>

With regards to if they are different concepts, they really are not.  It's just two different ways of referencing a flow.
Comment 9 cvignola 2013-02-02 01:19:19 UTC
We would like to add parent= to flow,  but we are running out of time.  I propose we stick with inline flows for v1.0 and attempt to add external flows in v1.1.