1 17 package org.apache.servicemix.beanflow; 18 19 25 public enum ExampleEnumSteps implements WorkflowStep<ExampleEnumSteps> { 26 27 START { 28 public ExampleEnumSteps execute(Workflow<ExampleEnumSteps> workflow) { 29 System.out.println("START"); 30 31 return STEP2; 33 } 34 }, 35 STEP1 { 36 public ExampleEnumSteps execute(Workflow<ExampleEnumSteps> workflow) { 37 System.out.println("STEP1"); 38 return STOP; 39 } 40 }, 41 STEP2 { 42 public ExampleEnumSteps execute(Workflow<ExampleEnumSteps> workflow) { 43 System.out.println("STEP2"); 44 return STOP; 45 } 46 }, 47 STOP { 48 public ExampleEnumSteps execute(Workflow<ExampleEnumSteps> workflow) { 49 System.out.println("STOP"); 50 workflow.stop(); 51 return null; 52 } 53 } 54 } 55 | Popular Tags |