Skip to main content
7-Bedrock
April 21, 2021
Solved

How to stop the thingworx service.

  • April 21, 2021
  • 1 reply
  • 1464 views

I have a service which runs a loop and keeps setting the value in a session variable. Service is executed on click of button in mashup by a user. I want to stop the previous thread when the user re-clicks the button.

Best answer by PaiChung

Services can't be stopped.

What is your use case though.

Why do you have a loop that is setting values all the time (how often)

What you could do is add a flag that says, user has clicked button, don't update on this look, reset flag and move on.

When button is clicked it re-enables the flag.

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
April 22, 2021

Services can't be stopped.

What is your use case though.

Why do you have a loop that is setting values all the time (how often)

What you could do is add a flag that says, user has clicked button, don't update on this look, reset flag and move on.

When button is clicked it re-enables the flag.