spring-webflow
spring-webflow copied to clipboard
Add support for generating flows that CRUD (create/read/update/delete) domain entities [SWF-369]
Keith Donald opened SWF-369 and commented
We can generate flows from minimal metadata based on conventions. e.g. what is shown above is a basic flow to edit this account. We should be able to get that down to something like:
flow:crud-flows <flow:entity class="app.domain.Account"/> </flow:crud-flows>
When a stateless action model is desired, the above would register flows engineered at runtime exposed at the URLs: GET http://localhost:8080/app/account/list -> list all your accounts GET http://localhost:8080/app/account/new -> show a form to create a new account GET http://localhost:8080/app/account/1 -> show account with id 1 GET http://localhost:8080/app/acocunt/1/edit -> show edit form for account with id 1 POST http://localhost:8080/app/account -> create account with id 1 PUT http://localhost:8080/app/account/1 -> update account with id 1 DELETE http://localhost:8080/app/account/1 -> delete account with id 1
Affects: 1.0.4
Issue Links:
- #1187 Make the Flow Definition Registry Implementation Namespace Aware ("depends on")
- #1225 Allow users to specify the namespace to register a flow in ("depends on")
7 votes, 9 watchers
Sören Chittka commented
CRUD-Flows are a really good idea, I'd like to see this feature very soon.
But I think the semantics of a POST-request should be different: POST http://localhost:8080/app/account -> create account with id generated by server, redirect to http://localhost:8080/app/account/[generated id]
This is how RFC2616 (HTTP/1.1) defines this semantics for POST. PUT can be used to create and/or update resources at a known location (as shown in your previous posting).