Open
Description
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;
}
})
}
Metadata
Metadata
Assignees
Labels
No labels