Use the general permission framework to develop the workflow approval function.

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.