【正文】
fter ErrHandler amp。 after Agree) bizData = (Ufts) = Vufts keyData = Set login = Nothing errMsg = (errmsg) writeLog (DoAudition OK amp。此為標(biāo)準(zhǔn)過(guò)程,不分行業(yè) If strAction = Agree Then DoAudition = VerifyVoucherAgree(login, Conn, VoucherType, VoucherId, objBizData, Vufts, keyData) ElseIf strAction = Reject Then DoAudition = RejectVoucher(login, Conn, VoucherType, VoucherId, objBizData, Vufts) ElseIf strAction = Disagree Then DoAudition = VerifyVoucherDisagree(login, Conn, VoucherType, VoucherId, objBizData, Vufts) End If writeLog (DoAuditionDoAudition amp。終審參考代碼:A. 標(biāo)準(zhǔn)過(guò)程,顯示審批任務(wù)提示窗口:39。更新審核標(biāo)志失敗 UndoSubmit = False Set Conn = Nothing Set dom = Nothing Exit Function End If Set Conn = Nothing writeLog (UndoSubmitAuditServiceProxySetComplete) Else Set Conn = Nothing writeLog (UndoSubmitAuditServiceProxySetAbort) UndoSubmit = False Exit Function End If Set dom = Nothing Set obj = Nothing Exit FunctionErrHandler: strErr = writeLog (UndoSubmit ErrHandler:) amp。 = amp。 set iverifystate=0,ireturncount=0 where amp。 cVoucherCode) = 3600 UndoSubmit = (bizObjectID, eventID, VoucherId, VoucherType, cVoucherCode, sBizdata, callerCtx, strErr) If UndoSubmit Then update amp。 strErr amp。 m_ufts amp。 VoucherType amp。 VoucherId amp。 eventID amp。 bizObjectID amp。zhCN:該單據(jù)已經(jīng)不存在或已被其他人修改 UndoSubmit = False Set Conn = Nothing Set dom = Nothing Set rst = Nothing Exit Function Else If (1).Value = 1 And (2).Value = 2 Then strErr = GetString() 39。 = amp。 and amp。 m_ufts amp。 where Convert(char,Convert(money,Ufts),2)=39。) as iverifystate from _ amp。) as iswfcontrolled,isnull(iverifystate,N39。871 edited Dim obj As Object Set obj = CreateObject() Set Conn = Set rst = New strSQL = select Ufts,isnull(iswfcontrolled,N39。 Set obj = Nothing Set Conn = Nothing Set dom = Nothing DoSubmit = FalseEnd Function 審批流程——撤銷撤銷的工作原理:調(diào)用工作流的自動(dòng)服務(wù)(撤銷),恢復(fù)iverifystate、ireturncount的值,將兩個(gè)值均置為0參考代碼:39。 VoucherId, effeLines If effeLines = 0 Then strErr = GetString() 39。 strMainKeyName amp。 39。 amp。 strTblName amp。 VoucherId, effeLines End If If effeLines = 0 Then strErr = GetString() 39。 strMainKeyName amp。 strTblName amp。 VoucherId sqlUpdate, effeLines DoSubmit = (bizObjectID, eventID, VoucherId, callerCtx, isWfCtl, strErr) If DoSubmit Then 39。 strMainKeyName amp。 39。 amp。 strTblName amp。871 edited Dim sqlUpdate As String If m_ireturncount = 0 Then 39。 MsgBox strSQL strSQL, Conn, adOpenDynamic, adLockReadOnly If Not ( And ) Then If IsNull((0).Value) Then m_ireturncount = 0 Else m_ireturncount = Val((0).Value) End If If IsNull((1).Value) Then m_ccode = Else m_ccode = (1).Value End If Else strErr = GetString() 39。 = amp。 and amp。 m_ufts amp。 _ where Convert(char,Convert(money,Ufts),2)=39。業(yè)務(wù)單據(jù)提交審批調(diào)用Public Function DoSubmit(bizObjectID As String, eventID As String, VoucherId As String, _ context As String, callerCtx As calledContext, m_ufts As String, _ isWfcontrolled As Boolean, ByRef strErr As String, login As Object, Optional cbilltype As String) As Boolean On Error GoTo ErrHandler Dim strVoucherInfo As String Dim dom As New DOMDocument Dim strTblName As String Dim strMainKeyName As String Dim effeLines As Long Dim isWfCtl As Boolean Dim ccode As String Dim m_ireturncount As Integer Dim m_ccode As String Dim AuditServiceProxy As Object Dim rst As New Dim Conn As Dim strSQL As String Set AuditServiceProxy = CreateObject() Dim obj As Object Set obj = CreateObject() Set Conn = strVoucherInfo = GetVoucherInfo(bizObjectID) strVoucherInfo strTblName = (maintbl).nodeValue strMainKeyName = (mainkey).nodeValue ccode = (ccode).nodeValue writeLog DoSubmit judge ufts strSQL = select ireturncount, + ccode + from amp。windows 2003 (建議使用windows2003)U8版本:U871 開(kāi)發(fā)準(zhǔn)備 開(kāi)發(fā)具有審批流功能的單據(jù),與一般單據(jù)有差別,具有審批流的單據(jù),其表頭數(shù)據(jù)庫(kù)表除了有審批人與審批時(shí)間外必須含有以下字段:VoucherType、VoucherId、VoucherCode、ufts、iverifystate、ireturncount、iswfcontrolled前三個(gè)字段是關(guān)鍵業(yè)務(wù)對(duì)象所需要的數(shù)據(jù)必須注意大小寫(xiě),后四個(gè)字段主要是控制審批業(yè)務(wù)的字段:ufts時(shí)間戳字段,處理審批時(shí)的并發(fā)問(wèn)題;iverifystate記錄審批流程的狀態(tài);ireturncount記錄