private OutputParams MethodHelloWorldAndQuestions(InputParams inputs, ref bool SkillIsPausable) { SkillIsPausable = false; ValuesForSee value; //First cast the inputs try { value = (ValuesForSee)inputs.Values; } catch (System.InvalidCastException ex) { //If you can't cast the inputs, then there is a special error code for this return(new OutputParams(Skill.ERROR_VALUES_PROCESS_INVALID, null)); } //Then execute the code try { //Lets say skill is productive (even if it is not that true) inputs.IsProductive = true; //Let's say the skill needs 3000ms to execute (because of the question) inputs.RemainingDuration = 3000; Console.WriteLine("=========================================================================================================="); Console.WriteLine(inputs.ToString()); Console.WriteLine("=========================================================================================================="); OutputParams outputs = InterativeAskReturnedCode(inputs, -301); //Check if you have an alternative post condition if (value.AlternativePostConditionAvailable && outputs.ReturnCode == 0) { //Ask user if he wants to go to alternative post condition System.Windows.MessageBoxResult res = System.Windows.MessageBox.Show("Do you want to go to alternative post condition?", "Alternative", System.Windows.MessageBoxButton.YesNo); switch (res) { case System.Windows.MessageBoxResult.Yes: outputs.GoToAlternativePostCondition = true; break; default: outputs.GoToAlternativePostCondition = false; break; } } //you don't have to Update remaining time to "0" => it is already done in the SEE mother class return(outputs); } catch (OperationCanceledException ex) { //External element asked for "emergency stop". //The "Closing Method" will be called (second method passed to the constructor of the skill) //You can do some memory freeing here. Console.WriteLine("=========================================================================================================="); Console.WriteLine("emergency stop"); Console.WriteLine("=========================================================================================================="); //And then, rethrow the exception throw; } catch (Exception ex) { //Your user code, which starts at -300 return(new OutputParams(-301, null, false, new SkillProException(ex.Message, ex))); } }