Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State Level Multiple Inheritance [SWF-1682] #859

Open
spring-operator opened this issue Feb 26, 2016 · 1 comment
Open

State Level Multiple Inheritance [SWF-1682] #859

spring-operator opened this issue Feb 26, 2016 · 1 comment
Labels
in: core status: waiting-for-triage We need additional information before we can continue

Comments

@spring-operator
Copy link
Contributor

Johannes Grimm opened SWF-1682 and commented

Currently Spring Web Flow supports multiple inheritance only on a flow level:

<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.springframework.org/schema/webflow
        http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
    parent="parent-a,parent-b">
    ...
</flow>

Inheritance for states only supports single inheritance:

<flow>
    <view-state id="viewExample" parent="parent-flow#viewExample" />
</flow>

I would like to propose a patch that enables multiple inheritance for states to enable flow definitions like the following:

<flow>
    <view-state id="viewExample" parent="parent-a-flow#viewExample,parent-b-flow#viewExample" />
</flow>

I attached a minimal but complete example as [^state-multi-inheritance.zip]. The project already contains the required patches for spring web flow which are attached as [^patch.diff]. The modifications also handle special cases if a flow is inherited multiple times like given in the following example:

  • example-flow#state inherits from parent-a#state and parent-b#state
  • parent-a#state inherits from parent-c#state
  • parent-b#state inherits from parent-c#state

example-flow#state inherits parent-c#state two times but in the flow model the additions from parent-c#state should occur only once.


Affects: 2.4.2

Attachments:

@spring-operator
Copy link
Contributor Author

Rossen Stoyanchev commented

From a brief look the key concern I have is that view-state has a number of attributes and those cannot be reconciled in case of differences. The classical problem with multiple inheritance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: waiting-for-triage We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

1 participant