01 /*
02 * Created on May 14, 2007
03 */
04 package com.x8ing.lsm4j.state;
05
06 /**
07 * After a state has been processed the controler tries to figure out how to go on. All attached transitions are
08 * evaluated. If no of all conditions results in true, the {@link ProcessableGraph} throws this exception.
09 *
10 * @author Patrick Heusser
11 */
12 public class NoMatchingTransitionConditionFoundException extends AbstractProcessableGraphException {
13
14 private static final long serialVersionUID = 1L;
15
16 private ProcessableTransition currentProcessableTransition = null;
17
18 private ProcessableState state = null;
19
20 public NoMatchingTransitionConditionFoundException() {
21 super();
22 }
23
24 public ProcessableTransition getCurrentProcessableTransition() {
25 return currentProcessableTransition;
26 }
27
28 public void setCurrentProcessableTransition(ProcessableTransition currentProcessableTransition) {
29 this.currentProcessableTransition = currentProcessableTransition;
30 }
31
32 @Override
33 public String getMessage() {
34
35 String msg = "failed at stateID=";
36
37 if (state != null) {
38 msg += state.toString();
39 }
40 return msg;
41 }
42
43 public ProcessableState getState() {
44 return state;
45 }
46
47 public void setState(ProcessableState state) {
48 this.state = state;
49 }
50 }
|