Sure, that isn’t a problem - you would just need to use theprocesses modification feature of the engine to remove the active tokens and create a new ones. Then you can remove the variables and you’re good to go.
Although why is it important to keep the processes instance id?
That’s only if you’re restarting a completed process… if the processes is not yet finished you can “restart” it and keep the same id. Which is why i suggested the modification API instead of the restart instance api.
thanks for the clarification . Also is it better to restart through some event ( Like using Conditional Start Event) rather than using an API . That way i can visually see that the process can be initialized and restarted if needed .
If beginning from the start is usual behavior then i’d certainly suggest modeling it, there are lots of possible ways of doing that. If it is not an expect or frequent occurrence then modeling it might be a little over the top.