this.lookupKey = null;
}
@Override
public String begin() {
FlowStateLifecycle lifecycle = this.getFlowStateLifecycle();
if ( lifecycle != null ) {
switch( lifecycle ) {
case initialized:
// normal case continue with begin
break;
case created:
// o.k. behavior - not initialized yet so do the initialization.
this.initializeFlow();
break;
case initializing:
// begin() within an initializing ??? very odd. for now just log and return
getLog().debug(this+": begin() called but state is "+lifecycle);
return null;
case started:
// double begin() called. slightly bad coding but o.k. otherwise
return this.getCurrentPage();
case starting:
// nested begin()'s also odd but for now just log and return.
getLog().debug(this+": begin() called but state is "+lifecycle);
return getCurrentPage();
default:
// the flowState has completed -- trying to restart is not supported.
getLog().debug(this+": begin() called but flow completed already state is "+lifecycle);
return getCurrentPage();
}
}
this.setFlowLifecycleState(starting);
FlowStateLifecycle nextFlowLifecycleState = failed;
try {
// TODO ... should we just be using next()... seems better.
selectActivity(0, true);
nextFlowLifecycleState = started;
} catch(RuntimeException e) {