Long running workflows

Hi,

If we have long running workflow like IOT use case, the history of the workflow will be very long and the workflow won’t close because it just continuously responding to events/signals.
In this case, how to trim the history?

Use continue as new. It allows restarting workflow atomically with the same WorkflowID passing arguments from a previous run to the new one.

Here is how it is done in Go.
Here is a sample how it is done in Java.