State Machine Use Case

I was going through the documents of State Machine from the studio user guide. I saw a small example in it and tried to perform the automation. its regarding using the state machine in which we need to find random numbers between 1 and 100.

I followed the process but whichever number I put it tells the number is too small.

I am also attaching the xmal file, please check it once

FirstStateMachine.xaml (12.1 KB)

Hi,

In my environment, your workflow seems to work well. Can you elaborate your problem?

Regards,

The Code is correct. :slight_smile: Congratulations! To get the random no in the ouput panel add log message. So that you can always play the random no generator by knowing what the exact match value is.

Cheers Happy Programming!

The thing is even if I put the number close to 100 it says it’s too small try with bigger number , But it is suppose to give me , even I tried putting 3 digit number but it says the same.

Hi,

If possible, can you share whole the project as zip file?

Regards,

I think you are trying this Use case. Even if you follow this video it is working correct for you. You want to add any additional functionality. ?

https://youtu.be/EP4G2yK7Y40?si=FKWxcU4Zkf8jELrb

Guess the number.xaml (13.9 KB)

it shows me only one message that input number is too small. even though i tried putting big number,

Hi,

Can you also share project.json etc?

Regards,

not really just checked with state machin and got to see this solved example. Anyway that log msg idea is great, here I see the random number, but even though I put a bigger number than the value I know it still says “Your number is too small, try a bigger number”. Is my condition appropriate?

i use your code only & added few of the logs as you can see it is working fine for me :slight_smile:

No_Generator.zip (3.6 KB)
For Your Ref

I will check immediately, in my scenario, I tried adding a log msg like you with the int.no but still, it shows me the same msg of no is too small even though I put a bigger number.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.