. Net three workflow engine comparisons: WWF, netbpm, and Ccflow

Source: Internet
Author: User

Original:. Net three workflow engine comparison: WWF, netbpm and Ccflow

Below will be the current mainstream of the three workflow to introduce and compare, and then through the three process engine design a more typical process to show you the three process of creating the process. These three workflow engines are Windows Workflow foundation,netbpm, respectively, Ccflow.

NETBPM and Ccflow are two domestic well-known open source software, especially ccflow in the domestic development momentum strong.

This typical process hypothesis: the company has two levels of leadership, the first level for the Boss chief

Scenario Description:

In a company, department employee leave needs the approval of the Supervisor chief.
If the number of days of vacation is greater than 10 days, the boss bosses must approve it after the department supervisor agrees.
If the department head is absent, submit it directly to the boss for approval.
The applicant may withdraw the leave application before the leave is approved.
After applying for approval, make changes to the days of leave (or other business data processing). After each leave application is completed, it must be recorded regardless of whether it is passed or canceled.
At the end of the process, the system should email the result information of the leave to the applicant.

For applications greater than 10 days, if the department supervisor has approved the approval and the supervisor has not approved, then the applicant revocation of the application, the system should send an email Notification Department Supervisor application has been revoked.

Here we are just a simulation, of course, real life situation is more complicated than this;

Windows Workflow Foundation

Microsoft's Workflow products provide a workflow engine and a process designer that comes with the VS solution, but the process designer faces a programmer rather than a business person, so the interface is more professional, the process runs only to create console applications, there is no process run interface, there is no form library, and requires two development of forms and interfaces.

Create a process using WWF:

1. Start VS2010 and create a program for the sequential Workflow console.
2. Enter the project name and click OK to automatically enter the process design interface.
3. The auto-generated Workflow1.cs is a workflow component.
4. Drag and drop a ifelse active component onto the design screen in the toolbox.
5. At this time, more coding work and form interface design work, such as in the left branch of IdelseBranchActivitiy1, to determine whether the absence of new applications for leave, or cancel the leave, activate the Conditiong attribute, and add the internal event Evaluateqingjianovalidcode, and activate, in the internal input logic code according to the database records to determine whether the leave pass, failed to cancel the leave. You can also go to another branch Evaluateqingjiacode continue to apply for a new leave;
6. Drag-and-drop the parallelActivity1 component after the IfElse node, to determine whether the leave person is chief, The Executecode handler that sets the CodeActivity3 property in SequenceActivity1 is Evaluatechiefnovalidcode and activated, and the internal code is used to determine if it is not chief. Another branch of the SequenceActivity1 is judged to be the case of Chief;
7. If not chief leave, you need to evaluatechiefnovalidcode in the logical judgment and form design, fill out the request for leave, and drag and drop ifelse components, the implementation of CODEACTIVITY6 code in order to determine the situation is greater than 10 days.
8.F5 can run a console program, where data that is not passed or canceled is required to be recorded, implemented through code and design databases, and code is required to send an email, and the WWF does not provide this capability.

The flowchart of the WWF design is as follows:

netbpm

From JBPM1 porting to the open source Workflow project under the. NET platform, two times development has some difficulty, because its use of the castle framework has many sub-projects, more technical points, need one by one familiar before the process of two development.

To create a workflow process using NETBPM:
1. One of the difficult points of using netbpm is to understand the build configuration file and submit the leave order configuration as follows:

<?XML version= "1.0"?><!--Note: When defining a process, it is recommended to draw a flowchart and then define it so that it is clear and not easy to make mistakes about how processdefiniton.xml is defined, please strictly follow the NPDL rules -<process-definition>  <!-- ===================================  -  <!--= = PROCESS DEFINITION PROPERTIES = = -  <!-- ===================================  -    <name>Leave demo</name>  <Description>The process simulates the company's absence process,</Description>  <Responsible>Ae</Responsible>  <!-- ======================  -  <!--= = START & endstate = = -  <!-- ======================  -  <start-statename= "Start Leave request">    <Description>Submit a leave order</Description>    <!--Role is defined, and when the engine executes on the Start-state node, it assigns the performer information to the attribute "requester" of the role. -    <role>Requester</role>    <!--Here you define the Start-state field, which represents the property that the filed is associated with, and in that state, its access rights to the property. If you need to define its operating interface on the Web form, how to display the Web form, etc., you need to supplement the field with the Webinterface.xml file corresponding node -    <Fieldattribute= "Start Date"Access= "Write-only-required" />    <Fieldattribute= "End Date"Access= "Write-only-required" />    <Fieldattribute= "Leave Days"Access= "Write-only-required" />    <Fieldattribute= "comment"Access= "Write-only" />    <transition to= "is Cancel Fork" />  </start-state>    <!--End node do not define other than name -  <end-statename= "End" />  <!-- ======================  -  <!--= = Actions = = -  <!-- ======================  -  <!--Explanation: The action of the Process-definition node is defined here, the valid event type is: Process-instance-start, Process-instance-end and Process-instance-cancel -    <!--here specifically: at the end of the process, send an e-mail message to the applicant, record the leave log -      <ActionEvent= "Process-instance-end"Handler= "NetBpm.Example.LeaveOfAbsence.EmailAction, NetBpm.Example.LeaveOfAbsence"on-exception= "Log">        <!--defines the action parameter, which is used when the delegate class instantiates a class to invoke a method. If the Emailaction Run method here sends the message, you need to know who to send it to, the message header, and so on, then the parameters can provide auxiliary -        <parametername= "to">Previousactor</parameter>        <parametername= "Subject">You submitted a request for leave</parameter>        <parametername= "message">Requested a holiday from ${start date} to ${end date} with comment ${comment}</parameter>      </Action>    <!--here is: Record the leave log at the end of the process, here Log simulation Note: Each node can define multiple action -    <ActionEvent= "Process-instance-end"Handler= "NetBpm.Example.LeaveOfAbsence.LogLeaveInfoAction, NetBpm.Example.LeaveOfAbsence"on-exception= "Log">    <parametername= "Loginfo">Record a leave log? :)</parameter>  </Action>  <!-- ================  -  <!--= = ATTRIBUTES = = -  <!-- ================  -  <!--Explanation: Defines a property value and how it is serialized. Property values typically include 3 classes -  <!--One : attributes for roles -  <attributename= "Requester"type= "actor" />  <attributename= "Chief"type= "actor" />  <attributename= "Boss"type= "actor" />    <!--One: All acitivity-state (including start-state) need to update the attributes, and user form content corresponding -  <attributename= "Start Date"type= "Date" />  <attributename= "End Date"type= "Date" />  <attributename= "Leave Days"type= "integer" />  <attributename= "comment"type= "text"Initial-value= "reason for leave or remark" />  <attributename= "Chief evaluation result"type= "Evaluation" />  <attributename= "Boss Evaluation result"type= "Evaluation" />  </Concurrent-block>  </process-definition>

2. Other configuration file code is too long to be pasted out;
3. Define the delegate class: The delegate class is contained in the Assembly under the Lib folder.

Because of the large number of delegate classes, only a few typical delegate classes are posted here:

1. NetBpm.Example.LeaveOfAbsence.AutoSetAttributionsAction: The delegate class is designed as a generic delegate class, which is used to set the table properties, such as the process after the user cancels the leave path, The Runtrace attribute is set to Requestercancel for whichwaydicision to be used for judgment.
2. NetBpm.Example.LeaveOfAbsence.AnyOneJoin: This delegate is used primarily to set the activation parent flow mechanism, where the parent flow is activated as long as any one of the paths reaches the join.
3. NetBpm.Example.LeaveOfAbsence.WhichWayDecision: The delegate according to the flow of actual flows through the path, according to the identity of the attribute runtrace, such as the choice of which side to go.
4. This article is just an example of a reference to using NPDL to define the NETBPM process, and it is clear that a lot of optimization is needed if the process is to be put into practice. The amount of code in it is still very large.

The flowchart under NETBPM design is as follows:

CC Flow

Ccflow is a homegrown open source workflow. Supports SQL Server, Oracle, Access, MySQL database, supports cluster computing, and supports multiple languages. Process design, form design are visualized, WYSIWYG. Ccflow provides powerful data analysis capabilities: A variety of reports, graphs, mining, and earning of process operations, which can be used for real (time) validity, cost analysis (manpower, time, property), and all-round analysis and monitoring. Ccflow more with Mobile + mobile phone + SMS + SMS Cat + Email Seamless connection, let your work the first time to communicate, the first time to deal with.

Create a workflow process using CC flow:

1. After installing the program in the Web container, open the process designer, establish the leave process, you can generate fill out the leave and end nodes;
2. Drag the chief Approval node, Boss approval node, add lines and label notes;
3. Set up a form: Mail Select a dummy form or a free type form, set up the form, and set up each node's work position;
4. Set the process jump direction conditions, such as determine who the lover is, determine the number of days of leave, etc., the selected data to originate from the form data.
5. Click Run to run the process, you can open the Windows service, you can use your own message alert and mail sending function;

The flow chart for CC flow design is as follows:

In summary, the three workflow differences are shown in the following table:

. Net three workflow engine comparisons: WWF, netbpm, and Ccflow

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.