---
title: ResetFlowFuncState
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefc_23_00083.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefc_23_00083.html
indexId: 41ab63ae06b0cee7d6ec4b9a1982ab31e11935a873a61ac5f6161ed63c07875f71
---
# ResetFlowFuncState

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

在故障恢复场景下，快速重置FlowFunc为初始化状态。


#### 函数原型

```
int32_t ResetFlowFuncState(const std::shared_ptr<MetaParams> &params)
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| params | 输入 | 多func重置状态参数信息。 |


#### 返回值

- 0：SUCCESS。
- other：FAILED，具体请参考  UDF错误码
。


#### 异常处理

无。


#### 约束说明

此接口为虚函数，当用户的FlowFunc未实现ResetFlowFuncState函数时，框架默认返回FLOW_FUNC_ERR_NOT_SUPPORT（认为当前FlowFunc不支持此操作），把原来创建的FlowFunc删除掉，重新创建一个新的FlowFunc，然后再调用Init接口进行初始化。
