Atitit. Summary of Visual Programming jbpm6 environment and usage...

Source: Internet
Author: User
Tags jboss knowledge base jbpm

Atitit. Summary of Visual Programming jbpm6 environment and usage...

 

 

1. Significance of jbpm 1

2. jbpm6 environment configuration 2

2.1. down 2

2.2. Install eclipse jbpm plugin 2

2.3. Set jbpm6_runtimes 2

3. Sequential Execution Process configuration 3

3.1. cretae demo prj executes the automatically generated test code 3

3.2. Create a new process BPMN file 3

3.3. Add the start and end controls 4

3.4. Add a script task control... process Desgin... opoen BPMN, then open prodesginer... 4

3.5. Set the execution Java statement of the script task control .. 4

3.6. Set the ID attribute of process: process2 5

3.7. Call the execution process function 5

4. jbpm if else Branch Structure Configuration 6

4.1. Java code 6

4.2. Add the Start Control and script task control task0 6

4.3. Create a global variable (within the scope of the process file) 6

4.4. Set task0 control to return variable value 6

4.5. Add an if else Branch Control: Gateway diverge 6

4.6 add two script task controls to execute Task 1 () & task 2 (); 7

4.7. Add a gateway converge control pointing to the end control... 7

5. jbpm cycle structure. Configuration 7

6. Other concept 7

6.1. Java and mvel 7

6.2. jpdl is one of the Process Languages built on the jbpm framework 8

6.3. Java Rule Engine-drools 8

6.4. Refer to 8

 

1. Significance of jbpm

In visual programming...

Front-end visual programming includes Dreamweaver, and the back-end is automatically generated by myeclipse hibernate...

Only when the Business Code is still encoded...

The use of jbpm can greatly reduce coding, and the use of drag-and-drop, flowcharts to program...

 

 

Author: old wow's paw attilax iron, email: [email protected]
Reprinted please indicate Source: http://blog.csdn.net/attilax

2. jbpm6 environment configuration 2.1. Down

Jbpm-distribution-6.1.0.CR1-installer-full.zip (403 m)

 

Include

Dashboard-builder-6.1.0.CR1.war 18 m

Jbpm-console-6.1.0.CR1.war (196 m)

Jboss-as-7.1.1.Final.zip 130 m

Jbpm-6.1.0.CR1-bin.zip 42 m

Org.drools.updatesite-6.1.0.CR1.zip 20 m

 

Jbpm-console is a web version. You can choose not to use the... dashboard-builder. It seems to be a Form builder... install Li Yizhen and install Ma 'an... give up ..

Eclipse 4.3

 

2.2. Install eclipse jbpm plugin

 

U: \ jbpm-installer \ liborg.drools.updatesite-6.1.0.CR1.zip (19 m)

Install by archi.zip

0. After restarting, you will find one more parameter in eclipse preference: jbpm. For example, it indicates that you have succeeded.

 

2.3. Set jbpm6_runtimes

U: \ jbpm-installer \ Lib \ jbpm-6.1.0.CR1-bin (41 m)

Open eclipse-> preferences. A dialog box is displayed, and "jbpm" is found in the text box ".

3. step 3 configure the installed jbpm runtimes path, click open, click the "add" button, name write: "jbpm6_runtimes", path: browse to the "jbpm-6.0.1.Final-bin" path, that is, it was just released to disk D.

 

3. Configure the sequential execution process 3.1. cretae demo prj run the automatically generated test code

 

Open eclipse, right-click the new jbpm Project, and enter a project name in the project name, for example, "testjbpm6". Then, finish the project (the runtime environment we configured will be used ).

It will automatically generate an instance for us. The processtest. Java file can run the sample. BPMN process file. Run the process. Java class directly, right-click Run as-> JUnit test, then the console will enter the "Hello World" Text

 

 

3.2. Create a new process BPMN File

New> jbpm> pbmn process> pkg1 package> New File bpmnati. BPMN...

 

Drag start, script task, and end nodes to connect them with squ flow lines...

 

 

 

3.3. Add the start and end controls 3.4. Add a script task control... process Desgin... opoen BPMN, then open prodesginer...

Like follow ..

 

3.5. Set the execution Java statement of the script task control ..

Note> rit key> property {panel},> can see action properry... enter Java statement ..

 

 

Set the action attribute system. Out. println ("Hello World attilax22") of the task node ");

3.6. Set the ID attribute of process: process2

 

3.7. Call the execution process function

The execution process requires two parameters: the path of the BPMN file and the ID of the process...

You need to create a knowledge base that contains the process definition.

You need to create a session to communicate with the process engine and the startup process.

Runtimemanager makes it easier for you to access ksession and task services.

 

Public static void main (string [] ARGs ){

Kiehelper = new kiehelper ();

Kiebase = kiehelper. addresource (

Resourcefactory. newclasspathresource ("pkg1/bpmnati. BPMN "))

. Build ();

Kiesession ksession = kiebase. newkiesession ();

Processinstance = ksession. startprocess ("process2 ");

4. Configure the if else branch structure of jbpm 4.1. Java code

If (task0 ())

Task1 ()

Else task2 ();

 

4.2. Add the Start Control and script task control task04.3. create a global variable (within the scope of the process file)

Task0> property> action> globale ::

// Define your globals here: e.g. Global java. util. List mylist

Global integer task0result

 

4.4. Set the return variable value of the task0 Control

 

Task0result = 3; // jeig haosyeo bcyi zayon... only a task can use... bnen cross task...

 

// Kcontext. setvariable ("task0result", 1 );

Kcontext. getknowledgeruntime (). setglobal ("task0result", new COM. sample. tif (). task0rztmeth ());

// Jeig nen cross task...

 

4.5. Add an if else Branch Control: Gateway diverge

Then configure the conditions... jump ..

Type: XOR

Constraints: To node1: Return task0result = 1;

To node2: Return task0result = 2;

 

4.6. Add two script task controls to execute task1 () & task2 (); 4.7. Add a gateway converge control pointing to the end control...

 

 

5. jbpm loop structure. Configuration 6. Other concept 6.1. Java and mvel

Jbpm currently supports two dialects: Java and mvel. Java actions should be effective Java code. Mvel actions can be expressed in the business scripting language mvel. Mvel accepts any valid Java code, but also provides support for nested parameter access (for example, person. Name, rather than person. getname (), and many other script improvements. Therefore, mvel expressions are more convenient for commercial users. For example, for an action, the name of the process variable of the printed person in the "requester" looks like this:

// Java Dialect

System. Out. println (person. getname ());

 

// Mvel Dialect

System. Out. println (person. Name );

 

6.2. jpdl is one of the Process Languages built on the jbpm framework.

. In jpdl, tasks, wait states, timers, and automatic processing are provided )... And intuitively describe the business process through graphic process definitions.

Jpdl can be deployed in any Java application environment, including javase application (swing/SWT) and javaee application (Application Server ).

 

 

 

 

6.3. Java Rule Engine-drools

Drools is a Java-based rule engine. It is open-source and can free complicated and variable rules from hard coding and store them in files as Rule scripts, this allows changes to rules to take effect immediately online without having to correct the code and restart the machine.

6.4. Reference

Install the jbpm6 running environment (jbpm6 2)-chengzhangmsdn column-blog channel-csdn.net.htm

JBoss series 80: Use jbpm-console in jbpm 6 to create and execute BPM processes-Other integrations-red/Black Union .htm

Jbpm5.1 introduction (3)-skyme-blog Park .htm

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.