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

allow state definition through another component #1

Open
guilhermesilveira opened this issue Nov 20, 2009 · 0 comments
Open

allow state definition through another component #1

guilhermesilveira opened this issue Nov 20, 2009 · 0 comments

Comments

@guilhermesilveira
Copy link
Member

In order to... define all possible states and transitions
I want to... allow the user to define a method which "builds" states and returns a list of them so restfulie can allow/block transition transit while executing it:

i.e.:

public List<State> getStates(Restfulie control) {
    control.state("unpaid").allow("cancel");
    return control.getStates();

//
control.state("ready").allow("receive").when(new InventoryAvailabilityOnTheNetwork());
new Dependency() {
public boolean allows(Order order) {
//return order.getStatus()=="payed" && order.getPaymentTime()<1minute;
return true;
}

            })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant