metadatacenter / cedar-template-editor

Web application containing the CEDAR Template Designer, Metadata Editor, and Metadata Explorer
Other
7 stars 4 forks source link

scenario to test re instance deletion #212

Closed graybeal closed 8 years ago

graybeal commented 8 years ago

1) Create instance, fill out at least one field, save instance 2) Copy URL somewhere safe, confirm it returns to your instance 3) Delete instance 4) Click on URL now. What happens? (It should produce 'instance not found', but I think I saw it create a new, empty instance.)

martinjoconnor commented 8 years ago

This may not be a bug. Initial URL should work indefinitely. When Save is pressed in the instance editor a new URL is generated.

graybeal commented 8 years ago

Hmm, don't understand this answer so I will provide a more detailed requirement.

What persistence model are we assuming for our templates and instances?

Let's say there are two persistence models for Information Artifacts: (1) Always Persists (once created, can never be deleted); (2) Provisional (can be removed at any time). And content can undergo a state change from (1) to (2), once a certain state of maturity has been reached; but can never go backwards. An artifact that follows model (1) may be deprecated, and/or made not accessible to some users, but the artifact itself should still exist.

I am assuming that, at least at first, my templates and instances are Provisional. I may have nothing in them, they may be useless or bad for many reasons. There is no reason we would want these to persist, is there? They are Nothing But Trouble.

I accept that maybe we agree on some threshold, after which an entity can't be fully deleted but can only be deprecated. Then the initial URL should 'work', in some sense at least, indefinitely.

There are a lot of specific and edge use cases to be considered further, but this is what I'm thinking for starters.

martinjoconnor commented 8 years ago

The initial URL is a URL to populate a form generated from a specific template. It can be distributed to users and will work as long as the template exists. If the template is deleted the URL will generate a 404. It is actually a really cool feature. I used it several times in the demo to quickly have a blank form ready to go. Think of it as the pre-canned URL for a form generated from a template that is ready to go.

The current behaviour is that when the user clicks 'Save' a new URL is immediately generated. This URL will act as the URL for the new instance as long as it exists. This behaviour will likely be modified somewhat when we implement auto-save. In this case, the original URL will quickly be replaced on the first auto-save, or we could conceivably immediately generate a new URL immediately on form open.

So the current behaviour is by design.