Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AmeerAhmed
IntegratingJBPMIntoA...
IntegratingJBPMIntoA...




JSPWiki v2.2.33

[RSS]


Hide Menu

IntegratingJBPMIntoAppFusePartDeux


Difference between version 29 and version 28:

At line 5 changed 1 line.
This tutorial is a continuation from [Integrating jBPM into AppFuse]. Please refer to the previous tutorial to complete your basic configuration. In this tutorial we will expand into writing real-world like process defintions, overview of the various jBPM services (persistence, schedule, logging etc) and injecting spring beans into actions. We will also address the issue of redeploying process defintions across server restarts.
This tutorial is a continuation from [Integrating jBPM into AppFuse]. Please refer to the previous tutorial to complete your basic configuration. This tutorial will cover running Appfuse/jbpm from Eclipse.
At line 12 removed 7 lines.
* [5] Create and load identities into jBPM database
* [6] Enhance Process Defintion by creating and assigning tasks
* [7] Write test case to validate Process Definition execution
* [8] Enhance Process Defintion by creating ActionHandlers (DecisionHandler)
* [9] Write test case to validate new Process Definition execution
* [10] Wire spring beans inside jBPM Actions
* [11] Test spring bean execution
At line 27 changed 1 line.
Before we dive into creating process definitions with the new tool lets create some packages where we will save our process defintions and actions.
Before we dive into creating process definitions lets create some packages where we will save our process defintions and actions.
At line 36 changed 1 line.
So lets start off by creating a simple test process.\\
Start off by creating a simple test process.\\
At line 48 removed 2 lines.
iii) That should give you the graphical tool interface as such.\\
At line 52 changed 1 line.
We are now ready to start designing!\\
Reference the definition in {{org/appfuse/jbpm/dao/hibernate/applicationContext-hibernate.xml}}:\\
At line 54 removed 2 lines.
Before we really begin we have to reference the definition in {{org/appfuse/jbpm/dao/hibernate/applicationContext-hibernate.xml}}:\\
At line 76 changed 1 line.
1) Click on one of each process states(Start, State, End) on the left panel and draw them in. You can edit the names of the states by clicking on thier name.
1) Click on one of each process states(Start, State, End) on the left panel and draw them in.
At line 78 changed 1 line.
2) Choose transition from the left panel and click once on the start state and then on helloWorld state. Then from helloWorld to end.
2) Choose transition from the left panel and click thru all the states to establish flow.
At line 82 removed 1 line.
Congratulations you have created a process definition using the process design tool!
At line 84 removed 2 lines.
Let's write a test case to validate our process definition.
At line 87 changed 1 line.
We have already written a test case in the [previous article|IntegratingJBPMIntoAppFuse], so go ahead and create {{ProcessTest.java}} class under {{test/dao/org/appfuse/jbpm/dao}} and copy the code from the previous installment with the following modifications:\\
There is a test case in the [previous article|IntegratingJBPMIntoAppFuse]. Create {{ProcessTest.java}} class under {{test/dao/org/appfuse/jbpm/dao}} and copy the code from the previous installment with the following modifications:\\
At line 109 changed 1 line.
It time to recompile and run our junit test. Execute __ant refresh__.
Recompile and run JUnit test. Execute __ant refresh__.
At line 121 changed 1 line.
And finally select Project from the Eclispe's menu above and choose clean.
Select Project from the Eclispe's menu above and choose clean.
At line 127 changed 1 line.
Now you can run the ProcessTest. Ensure you have ProcessTest open and selected and then choose Run As -> Junit Test
Now you can run the ProcessTest. Ensure ProcessTest is open and selected and then choose Run As -> JUnit Test
At line 139 removed 1 line.
You have successfully deployed and tested a process definition.
At line 142 changed 1 line.
;:%%(color: blue)''For production usage it is not ideal to redeploy process definitions on every startup. Once you have played around with your process defintions and are quite certain they will not change. You can apply the following patch to have the JbpmConfiguration not deploy a process definition every time you restart, rather have it redeployed only if the processdefinition.xml on the file system is out of sync with the database version''%%
;:%%(color: blue)''For production usage it is not ideal to redeploy process definitions on server restarts. Once you have stable definitions there is no need for redeployment. You can apply the following patch to have the JbpmConfiguration not deploy process definitions on restarts, instead have it redeployed only if the definition on the file system is out of sync with the database.''%%

Back to IntegratingJBPMIntoAppFusePartDeux, or to the Page History.