Use the general permission framework to develop the workflow approval function.
It is really easy to use the general permission development workflow approval function. You only need to call the underlying approval and automatic approval methods.
Start Approval process
Var workFlowCode = string. empty; // new approval workflow Id string objectId = entity. ID; // new approval workflow name string objectFullName = string. format ("{0} (outlet modification)", Utils. userInfo. companyName); // process no. ProcessCode const string categoryCode = "EditSite"; // process name ProcessName const string categoryFullName = "outlet modification approval "; const string auditIdea = "submit an application for approval"; var workFlowCurrentManager = new BaseWorkFlowCurrentManager (Utils. dbHelperUserCenter, Utils. userInfo); workFlowCurrentManager. autoStatr (null, objectId, objectFullName, categoryCode, categoryFullName, workFlowCode, auditIdea );View Code
Approve the process
// Obtain the approval ID var workFlowCurrentManager = new BaseWorkFlowCurrentManager (Utils. dbHelperUserCenter, Utils. userInfo); var workFlowCurrent = workFlowCurrentManager. getObjectBy (string. empty, entityAdd. ID); workFlowCurrentManager. autoAuditPass (workFlowCurrent. id, auditIdea );View Code
Note: you do not need to care about how the underlying layer is implemented. You only need to call these two methods to implement the workflow from startup to approval.
Each review contains detailed records, to-do items, process monitoring, and ready-made method calls.
Currently, only automatic approval is used, and more complex approval is used later.
Approval Process Definition
PS Thank You For Your selfless sharing on auspicious day.