declare @ID int --ID为OS_WFENTRY中要删除的ID
delete lbWFCurrentOwner where STEPID in (select ID from OS_CURRENTSTEP where ENTRY_ID=@ID)
delete lbWFNotify where messageID in (select id from lbWFNotifyMsg where instanceID=@ID)
delete lbWFNotifyMsg where instanceID=@ID
delete OS_CURRENTSTEP_PREV where ID in (select ID from OS_CURRENTSTEP
where ENTRY_ID=@ID)
delete OS_CURRENTSTEP where ENTRY_ID=@ID
delete OS_HISTORYSTEP_PREV where ID in (select ID from OS_HISTORYSTEP
where ENTRY_ID=@ID)
delete OS_HISTORYSTEP where ENTRY_ID=@ID
delete OS_WFENTRY where ID=@ID
delete WF_INITIATOR where ENTRY_ID=@ID
执行上述语句之后,需到管理控制台清空工作流缓存
delete lbWFCurrentOwner where STEPID in (select ID from OS_CURRENTSTEP where ENTRY_ID=@ID)
delete lbWFNotify where messageID in (select id from lbWFNotifyMsg where instanceID=@ID)
delete lbWFNotifyMsg where instanceID=@ID
delete OS_CURRENTSTEP_PREV where ID in (select ID from OS_CURRENTSTEP
where ENTRY_ID=@ID)
delete OS_CURRENTSTEP where ENTRY_ID=@ID
delete OS_HISTORYSTEP_PREV where ID in (select ID from OS_HISTORYSTEP
where ENTRY_ID=@ID)
delete OS_HISTORYSTEP where ENTRY_ID=@ID
delete OS_WFENTRY where ID=@ID
delete WF_INITIATOR where ENTRY_ID=@ID
执行上述语句之后,需到管理控制台清空工作流缓存