I am having trouble getting my Switch Case step to start properly. There are no errors in my development robot. What should I do?
- Emb asked 1 year ago
- You must login to post comments
What version of robot do you have? I was facing a similar issue, but then I realized that the ‘Switch’ step was a new step and I hadn’t installed the latest development robot (only the unattended one). After I installed the new development robot locally, it worked perfectly!
- Roko answered 1 year ago
- You must login to post comments
Great news, it now works fine with robot version 2.0.5999.0. I completely forgot about it, my mistake!
- Emb answered 1 year ago
- You must login to post comments
One more thing, now I received an error when using the expression *OrderNumber* < 10 in a Switch Case step. Do you know what could be causing this issue?
log: [ERR] System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Int32.Parse(String s)
at Robotiq.ScriptExecutor.StepHandlers.Implementation.SwitchStepHandlers.SwitchStepHandler.<>c__DisplayClass8_0.b__0(SwitchCaseStep x)
at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Robotiq.ScriptExecutor.StepHandlers.Implementation.SwitchStepHandlers.SwitchStepHandler.HandleCore(Boolean startRobotLocally)
at Robotiq.Steps.Common.StepHandler.Handle(Boolean startRobotLocally)
2024-03-27 10:45:15.795 +01:00 [ERR] Error ocurred in step [“SwitchStep”, “”,”79290faa-8a7e-cbcd-575b-c2ec5134e9a5″]. Error: System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Int32.Parse(String s)
at Robotiq.ScriptExecutor.StepHandlers.Implementation.SwitchStepHandlers.SwitchStepHandler.<>c__DisplayClass8_0.b__0(SwitchCaseStep x)
at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Robotiq.ScriptExecutor.StepHandlers.Implementation.SwitchStepHandlers.SwitchStepHandler.HandleCore(Boolean startRobotLocally)
at Robotiq.Steps.Common.StepHandler.Handle(Boolean startRobotLocally).
2024-03-27 10:45:15.976 +01:00 [INF] Create Process Output Variables and send them to Handler after failed execution.
2024-03-27 10:45:15.978 +01:00 [INF] Handler is connected. Sending message to handler of type : OUTPUTVARIABLE
2024-03-27 10:45:16.696 +01:00 [ERR] [Process – pero] An error occured in step [79290faa-8a7e-cbcd-575b-c2ec5134e9a5 – null] Exception: Robotiq.Steps.Common.ProcessLevelErrorHandlingException: Input string was not in a correct format.
—> System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Int32.Parse(String s)
at Robotiq.ScriptExecutor.StepHandlers.Implementation.SwitchStepHandlers.SwitchStepHandler.<>c__DisplayClass8_0.b__0(SwitchCaseStep x)
at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Robotiq.ScriptExecutor.StepHandlers.Implementation.SwitchStepHandlers.SwitchStepHandler.HandleCore(Boolean startRobotLocally)
at Robotiq.Steps.Common.StepHandler.Handle(Boolean startRobotLocally)
— End of inner exception stack trace —
at Robotiq.Steps.Common.StepHandler.Handle(Boolean startRobotLocally)
at Robotiq.ScriptExecutor.ConsecutiveStepHandlersCreatorHelper.HandleSteps(IEnumerable`1 steps, IStepHandlerCreator stepHandlerCreator, Boolean startRobotLocaly, Option`1 containerStepHandlerInfo, IVariableRepository variableRepository, Func`2 callerSpecificLogic)
at Robotiq.ScriptExecutor.Workflow.<>c__DisplayClass5_0.b__0()
at Robotiq.ScriptExecutor.OperationCaller.TrySafe(Action action, Action`1 exceptionAction)
- Emb answered 1 year ago
- Switch Case step only allows fixed values, not expressions. Please refer to the step info and examples of use.
- You must login to post comments
Please login first to submit.