# `Sp_Del_ACT_Flow_Data` (procedure)

> 根据模块sId删除模块（包含子模块）


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

_No parameters._

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Del_ACT_Flow_Data`'`._

## Narrative

**Business context:** Installation / data-purge tool — wipes Activiti workflow tables and system-message logs. Used during initial environment setup or when a tenant is being rebuilt from scratch; not part of any user-facing menu.

**What it does:** Truncates message and log tables (`sys_msg`, `sys_login_log`, `sys_job_log`, `syslog`, `syslogdetail`, `syssendedingtalkmsg`, `syssendewxmsg`), ERP flow tables (`biz_flow`, `biz_todo_item`, `biz_todo_copyto`), the Activiti event log, all `act_hi_*` history tables, and the Activiti runtime tables (`act_ru_*`, `act_re_procdef`, `act_procdef_info`), bracketing the runtime truncates with `SET FOREIGN_KEY_CHECKS=0/1` so dependent FKs do not block the wipe. Preserves `act_ge_property`, `act_ge_bytearray`, `act_re_model`, `act_re_deployment` (commented out).

**Invocation:** Status: appears orphaned. No `gdsmodule` hook, no `gdsconfigformmaster` data-source, no other routine references it, and xly-src ships only the install script `script/del/Sp_Del_ACT_Flow_Data.sql`. Part of the `script/del/` reset family — operators invoke it manually via SQL when rebuilding ACT / log state.
