@Kite9Item
public Diagram example_1_8_StateTransition(DiagramBuilder db) throws Exception {
ClassBuilder cb = db.withClasses(Book.class);
cb.show(db.asConnectedContexts());
Context c = (Context) db.getNounElement(Book.class);
FiniteStateMachineWizard fsmFormat = new FiniteStateMachineWizard(db, c);
Field f = Book.class.getDeclaredField("state");
FSMDataProvider provider = new EnumWithAnnotationFSMDataProvider(db, f, BookState.class, BeforeState.class,
AfterState.class);
fsmFormat.write(provider);
return db.getDiagram();
}