# Interface IProcessRestorer OptimaJet.Workflow.Core.Runtime.ProcessRestoring.IProcessRestorer Provides a customization point for process recovery after runtime restart. Namespace: [OptimaJet.Workflow.Core.Runtime.ProcessRestoring](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/) ```csharp public interface IProcessRestorer ``` ## Methods `bool NeedCustomRestore(string schemeCode, ProcessStatus status)` Indicates whether a process instance should be handled by a custom restore decision during recovery. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | The scheme code of the process being restored. | | `status` | `ProcessStatus` | The status assigned to the process before restore begins (currently either [ProcessStatus.Error](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/ProcessStatus/) or [ProcessStatus.Terminated](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/ProcessStatus/)). | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to apply custom restore logic using [IProcessRestorer.GetCustomRestoreDecision(ProcessInstance)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/IProcessRestorer/); otherwise [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to use the default recovery behavior. | ### Remarks Restorers are evaluated in registration order; the first implementation that returns [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) is used. `RestoreDecision GetCustomRestoreDecision(ProcessInstance process)` Gets the custom restore decision for a process selected for custom recovery. ### Parameters | Name | Type | Description | | --- | --- | --- | | `process` | `ProcessInstance` | The process instance to inspect before recovery continues. | ### Returns | Type | Description | | --- | --- | | `RestoreDecision` | A [RestoreDecision](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/RestoreDecision/) specifying the next restore action. Return [RestoreDecision.Default](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/RestoreDecision/) or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) to keep default restore behavior. | [Previous TypeSearcher](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/TypeSearcher/) [Next RestoreDecision](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/RestoreDecision/)