sub workflow { get workflow step from button or link selected. if (not step1) { %existing_detail = get stored details identified by unique session id of user %existing_detail .= new details $self->store(\%existing_detail) } my $page = $self->draw_page(page => workflowstep, params =>\%existing_detail); return $page } sub draw_page { my $wrkflwObj = Workflow->new(step=>$step, param=>\%existing_details); return $wrkflwObj->output; #return the html }