Skip to content
New issue

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

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

Already on GitHub? # to your account

documentation for preconditions in EDN #10

Open
timclemons opened this issue Apr 29, 2016 · 3 comments
Open

documentation for preconditions in EDN #10

timclemons opened this issue Apr 29, 2016 · 3 comments

Comments

@timclemons
Copy link

Having an example or two of how to create preconditions, including onFail actions, would be extremely helpful.

@timclemons
Copy link
Author

Any thoughts on this? Should this project still be considered under development?

@kumarshantanu
Copy link
Owner

@timclemons Hi, and sorry for a late reply. I would welcome a pull request to include a pre-conditiion example. I have had limited time of late, but I will try to gather some time for this in case I don't see any pull request.

@timclemons
Copy link
Author

I'm certainly willing to submit a pull request, but at the moment I'm trying to reverse engineer how exactly preconditions work in an EDN file.

There's one example file I found with a commented precondition at liquibase-edn:

https://github.com/kumarshantanu/liquibase-edn/blob/master/src/test/resources/example.edn

There it has the following:

"preConditions" [{"runningAs" {"username" "liquibase"}}]}

Presumably, the camel case string keys can be replaced with hypen-separated keywords:

:pre-conditions [{:running-as {:username "liquibase"}}]

Still trying to confirm the above works, as it doesn't throw any exceptions in the parser, but still doesn't seem to perform a precondition check. I'm also trying to fill in how the following use cases are structured in EDN:

  • and, or, and not as applied to conditions
  • precondition attributes such as onFail, onError, onUpdateSQL, onFailMessage and onErrorMessage

Any insight would be very much appreciated.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants