This section briefly introduces the complete jbpm and SSH instances. If it is another version of the framework, it is easy to doProgram.
Process Definition
It is recommended to use the plug-in under eclipse provided by jbpm for the definition of the process. The graphical configuration plug-in installation file can be found under jbpm-starters-kit-3.1.4 \ jbpm-designer \ jbpm-GPD-feature \ eclipse, pay attention to the version. In this way, you can compress the three files in the defined process description into a zip package and deploy them in a unified manner to the database, so that the current node information of the image can be displayed in the B/S system.
1. Plug-in Installation
Copy the jbpm-GPD-feature folder to c: \ Program Files \ MyEclipse-6.0M1 \ eclipse \ plugins, pay attention to your own ecplise path.
Create a MyEclipse-6.0M1 file in the c: \ Program Files \ jbpm-gpd.link \ eclipse \ links folder. Content is as follows: Path = c: \ Program Files \ MyEclipse-6.0M1 \ eclipse \ plugins \ jbpm-GPD-feature.
Then restart eclipse to use the process definition function.
2. Process Definition
In the eclipse environment, choose File> New> JBoss jbpm under other> process definition. You must specify the folder to be created in your project file.
This will generate three files: gpd.xml?processdefinition.xml=processimage.jpg.
Processdefinition. XML is the process definition file. In this example:
- <?XML Version="1.0" Encoding=UTF-8"?>
-
- <Process-Definition Name="Document test process">
- Start-state name = "start" transition name = "Submit Michael approve " to = " zhangsan approval " transition
- </Start-state>
-
- <Task-node Name="Zhang San approval">
-
- <Task Name="Approval 1">
- <Assignment Actor-ID="James"/>
-
- </Task>
- <Transition Name="Submit for approval by Li Si" To="Li Si approval"></Transition>
-
- </Task-node>
- <Task-node Name="Li Si approval">
-
- <Task Name="Approval 2">
- <Assignment Actor-ID="Li Si"/>
-
- </Task>
- <Transition Name="Submit to Wang Wu for approval" To="Wang Wu approval"></Transition>
-
- </Task-node>
- <Task-node Name="Wang Wu approval">
-
- <Task Name="Approval 3">
- <Assignment Actor-ID="Wang Wu"/>
-
- </Task>
- <Transition Name="End Process" To="End"></Transition>
-
- </Task-node>
- <End-state Name="End"></End-state>
-
- </Process-Definition>
The processimage.jpg file is the image generated by the definition process, and The GPD. xml file is the coordinate description of the graphic file. It is used to display the flow picture position under B/S.
The GPD. xml file in this example
- <?XML Version="1.0" Encoding=UTF-8"?>
-
- <Process-digoal Name="Document test process" Width="801" Height="477">
- node name = "start" x =< /span> "308" Y = "4" width = "140" height = "40"
- <Transition Name="Submit to Michael Jacob for approval">
-
- <Label X="5" Y="-10"/>
-
- </Transition>
- </Node>
-
- <Node Name="Zhang San approval" X="310" Y="90" Width="140" Height="40">
- <Transition Name="Submit for approval by Li Si">
-
- <Label X="5" Y="-10"/>
-
- </Transition>
- </Node>
-
- <Node Name="Li Si approval" X="313" Y="192" Width="140" Height="40">
- <Transition Name="Submit to Wang Wu for approval">
-
- <Label X="5" Y="-10"/>
-
- </Transition>
- </Node>
-
- <Node Name="Wang Wu approval" X="308" Y="307" Width="140" Height="40">
- <Transition Name="End Process">
-
- <Label X="5" Y="-10"/>
-
- </Transition>
- </Node>
-
- <Node Name="End" X="307" Y="401" Width="140" Height="40"/>
- process-digoal