/** * Create an instance of {@link Next } * */ public Next createNext() { return new Next(); }
private boolean matchExitStatusAgainstOnAttribute(String exitStatus, TransitionElement elem) { logger.fine("Trying to match exitStatus = " + exitStatus + " , against transition element: " + elem); String exitStatusToMatch = null; if (elem instanceof End) { exitStatusToMatch = ((End) elem).getOn(); } else if (elem instanceof Fail) { exitStatusToMatch = ((Fail) elem).getOn(); return matchSpecifiedExitStatus(exitStatus, exitStatusToMatch); } else if (elem instanceof Stop) { exitStatusToMatch = ((Stop) elem).getOn(); } else if (elem instanceof Next) { exitStatusToMatch = ((Next) elem).getOn(); } else { throw new IllegalStateException("Shouldn't be possible to get here. Unknown transition element, " + elem.toString()); } boolean match = matchSpecifiedExitStatus(exitStatus, exitStatusToMatch); String logMsg = match ? "Matched" : "Didn't match"; logger.fine(logMsg); return match; }
if (t instanceof Next) { Next next = (Next) t; nextExecutionElement = getExecutionElementFromId(peerExecutionElements, next.getTo()); returnTransition.setNextExecutionElement(nextExecutionElement); break;
private boolean matchExitStatusAgainstOnAttribute(String exitStatus, TransitionElement elem) { logger.fine("Trying to match exitStatus = " + exitStatus + " , against transition element: " + elem); String exitStatusToMatch = null; if (elem instanceof End) { exitStatusToMatch = ((End) elem).getOn(); } else if (elem instanceof Fail) { exitStatusToMatch = ((Fail) elem).getOn(); return matchSpecifiedExitStatus(exitStatus, exitStatusToMatch); } else if (elem instanceof Stop) { exitStatusToMatch = ((Stop) elem).getOn(); } else if (elem instanceof Next) { exitStatusToMatch = ((Next) elem).getOn(); } else { throw new IllegalStateException("Shouldn't be possible to get here. Unknown transition element, " + elem.toString()); } boolean match = matchSpecifiedExitStatus(exitStatus, exitStatusToMatch); String logMsg = match ? "Matched" : "Didn't match"; logger.fine(logMsg); return match; }
if (t instanceof Next) { Next next = (Next)t; nextExecutionElement = getExecutionElementFromId(peerExecutionElements, next.getTo()); returnTransition.setNextExecutionElement(nextExecutionElement); break;
/** * Create an instance of {@link Next } * */ public Next createNext() { return new Next(); }
private boolean matchExitStatusAgainstOnAttribute(String exitStatus, TransitionElement elem) { logger.fine("Trying to match exitStatus = " + exitStatus + " , against transition element: " + elem); String exitStatusToMatch = null; if (elem instanceof End) { exitStatusToMatch = ((End) elem).getOn(); } else if (elem instanceof Fail) { exitStatusToMatch = ((Fail) elem).getOn(); return matchSpecifiedExitStatus(exitStatus, exitStatusToMatch); } else if (elem instanceof Stop) { exitStatusToMatch = ((Stop) elem).getOn(); } else if (elem instanceof Next) { exitStatusToMatch = ((Next) elem).getOn(); } else { throw new IllegalStateException("Shouldn't be possible to get here. Unknown transition element, " + elem.toString()); } boolean match = matchSpecifiedExitStatus(exitStatus, exitStatusToMatch); String logMsg = match ? "Matched" : "Didn't match"; logger.fine(logMsg); return match; }
if (t instanceof Next) { Next next = (Next)t; nextExecutionElement = getExecutionElementFromId(peerExecutionElements, next.getTo()); returnTransition.setNextExecutionElement(nextExecutionElement); break;
@Override public TransitionElement substituteProperties(final TransitionElement controlElement, final Properties submittedProps, final Properties parentProps) { if (controlElement instanceof End) { ((End)controlElement).setOn(this.replaceAllProperties(((End)controlElement).getOn(), submittedProps, parentProps)); ((End)controlElement).setExitStatus(this.replaceAllProperties(((End)controlElement).getExitStatus(), submittedProps, parentProps)); } else if (controlElement instanceof Fail) { ((Fail)controlElement).setOn(this.replaceAllProperties(((Fail)controlElement).getOn(), submittedProps, parentProps)); ((Fail)controlElement).setExitStatus(this.replaceAllProperties(((Fail)controlElement).getExitStatus(), submittedProps, parentProps)); } else if (controlElement instanceof Next) { ((Next)controlElement).setOn(this.replaceAllProperties(((Next)controlElement).getOn(), submittedProps, parentProps)); ((Next)controlElement).setTo(this.replaceAllProperties(((Next)controlElement).getTo(), submittedProps, parentProps)); } else if (controlElement instanceof Stop) { ((Stop)controlElement).setOn(this.replaceAllProperties(((Stop)controlElement).getOn(), submittedProps, parentProps)); ((Stop)controlElement).setExitStatus(this.replaceAllProperties(((Stop)controlElement).getExitStatus(), submittedProps, parentProps)); ((Stop)controlElement).setRestart(this.replaceAllProperties(((Stop)controlElement).getRestart(), submittedProps, parentProps)); } return controlElement; }
/** * Create an instance of {@link Next } * */ public Next createNext() { return new Next(); }
@Override public TransitionElement substituteProperties(final TransitionElement controlElement, final Properties submittedProps, final Properties parentProps) { if (controlElement instanceof End) { ((End)controlElement).setOn(this.replaceAllProperties(((End)controlElement).getOn(), submittedProps, parentProps)); ((End)controlElement).setExitStatus(this.replaceAllProperties(((End)controlElement).getExitStatus(), submittedProps, parentProps)); } else if (controlElement instanceof Fail) { ((Fail)controlElement).setOn(this.replaceAllProperties(((Fail)controlElement).getOn(), submittedProps, parentProps)); ((Fail)controlElement).setExitStatus(this.replaceAllProperties(((Fail)controlElement).getExitStatus(), submittedProps, parentProps)); } else if (controlElement instanceof Next) { ((Next)controlElement).setOn(this.replaceAllProperties(((Next)controlElement).getOn(), submittedProps, parentProps)); ((Next)controlElement).setTo(this.replaceAllProperties(((Next)controlElement).getTo(), submittedProps, parentProps)); } else if (controlElement instanceof Stop) { ((Stop)controlElement).setOn(this.replaceAllProperties(((Stop)controlElement).getOn(), submittedProps, parentProps)); ((Stop)controlElement).setExitStatus(this.replaceAllProperties(((Stop)controlElement).getExitStatus(), submittedProps, parentProps)); ((Stop)controlElement).setRestart(this.replaceAllProperties(((Stop)controlElement).getRestart(), submittedProps, parentProps)); } return controlElement; }
public class MainActivity extends Activity { Next next; TextView timesHit_txtview; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); next = new Next(); // Initialize Next timesHit_txtview = (TextView) findViewById(R.id.textView2); // Initialize Widget timesHit_txtview.setText(5); Button next_btn = (Button) findViewById(R.id.button1); next_btn.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent nextscreen_intent = new Intent(view.getContext(), Next.class); startActivityForResult(nextscreen_intent, 0); } }); }
@Override public TransitionElement substituteProperties(final TransitionElement controlElement, final Properties submittedProps, final Properties parentProps) { if (controlElement instanceof End) { ((End)controlElement).setOn(this.replaceAllProperties(((End)controlElement).getOn(), submittedProps, parentProps)); ((End)controlElement).setExitStatus(this.replaceAllProperties(((End)controlElement).getExitStatus(), submittedProps, parentProps)); } else if (controlElement instanceof Fail) { ((Fail)controlElement).setOn(this.replaceAllProperties(((Fail)controlElement).getOn(), submittedProps, parentProps)); ((Fail)controlElement).setExitStatus(this.replaceAllProperties(((Fail)controlElement).getExitStatus(), submittedProps, parentProps)); } else if (controlElement instanceof Next) { ((Next)controlElement).setOn(this.replaceAllProperties(((Next)controlElement).getOn(), submittedProps, parentProps)); ((Next)controlElement).setTo(this.replaceAllProperties(((Next)controlElement).getTo(), submittedProps, parentProps)); } else if (controlElement instanceof Stop) { ((Stop)controlElement).setOn(this.replaceAllProperties(((Stop)controlElement).getOn(), submittedProps, parentProps)); ((Stop)controlElement).setExitStatus(this.replaceAllProperties(((Stop)controlElement).getExitStatus(), submittedProps, parentProps)); ((Stop)controlElement).setRestart(this.replaceAllProperties(((Stop)controlElement).getRestart(), submittedProps, parentProps)); } return controlElement; }