Financial Workflow
From Kb
Contact Article Author | Blog of Article Author | FirstPartners.net Home | LinkedIn profile of Author
Red Financial Workflow
Notes – move
- Move these tech notes (from building the worklow) into the main body of this
- Run through how to create your own worklfow
- RP also gives Web integration over basic rules
Introduction
1.1. Reminder of what it does
1.2. Sections a-b are business. Sections c-d are technical. It is done this way so that you can evaluate Red FC first, then decide to take the time to investigate further.
1.3. Tech Setup link
1.4. Start with business user overview
Todo – take sample from online sample (Jboss page)
Red Financial Workflow
What the sample does
- Started
- by Automatic timer?
- could equally be ruby on rails , web service, or JMS message?
- In This sample we use a Junit Test
- Insurance Claim recieved
- Get the information (from where??)
- Database (via Hibernate) – mock this up
- From message
- Decide what to do with it
- Use Spring Table Decision loader
- Simple Rules
- If less than 1000 payout
- If >1000 <50000 router to admin
- If greater than 50000 route to manager
- Route the appropriate person
- Harcoded Swinlanes
- Await their input
- Use JMX Console?
- Command line
- Jruby Client?
- 2nd '''''Junit Test (easiest) / Simple Java Client (main)
- Check if any further signoff is needed
- Via Decision Table above
- Send ’payout’ message when done.
- Send Email
- Could be JMS
- Could be Axis Call
- Could be BPEL
- Could be Apache Service Bus
What is Workflow
Work and process flow
End Sample: Online
| - click ’next’ or decided | ||
| - log window to show action | ||
| - visually show user icon moving through workflow | ||
| - show ’explosion’ for action fired | ||
| - |
Aim of this is online Expense management demo , with Ajax , based on Jboss sample
oR INSURANCE CLAIM DEMO
Sample : Insurance?
- go through JBoss , JBoss IDE
- introduce JBPM
- introduce bits
- bit about drools / jbpm component – state that this is kept simple to demonstrate the technologies , would normally use seam instead.
1.5. Where several people have part of the knowledge , and need to work together on a set of information, following a strict set of steps.
- workflow - what is it
- very good , but how convince the business of it’s benefits
- this article introduces you , builds a visual app that you can then demonstrate to the buisess users
- allows you to propotype workflow
WORKFLOW
- Simple workflow , very like L
- Deploy as sample App (& Notes)
- (was)end of workflow is sample insurance / expense workflow, loaded into JBoss webapp and walkthough, desc of available components
- (now) make this sample as simple as possible , using the existing components
- put together simple workflow tech sample based on insurance showing componetns
- doc jboss workflow setup
- JBPEL notes/ sample
- Describe load via JBoss jBPM Web client (standard / how could do)
- Sample insurance workflow (drawn)
- Components to use workflow
Business
1.6. Reminder of what we are trying to do (from chap 2 – problem domain)
- Business prob: working team together
- Sample : Expenses
1.7. Start
1.8. Walk through Use Case
- Screen shots
- Expenses management / Financial Decision making
- Sample : Loan signoff? financial decision making
- Sample : Insurance
- Workflow is the process that gives successful business the edge. Toyota has it’s lean manufacturing system (check). Dell has it’s Direct Distribution channels. (name bank) manages it’s credit system to reduce risk more than other Banks. All have many teams of people synchronising mulitple tasks with the single aim of business success.
- Getting IT to support your workflow is another matter. (Until now ... bit about different systems) In an ideal world, you would draw your business process – a bit like the diagram below. Then you would plug your existing systems into it and have everthing run smoothly. If any part of your business process changed, you would change the diagram and everything would follow the new process.
- Give diagram – financial workflow
- Animated Gif??
- This article shows exactly how to do this. First we draw the financial workflow. Then we plug other systems into it. Finally we make a change and show how smoothly everything works together.
1. Draw Diagram
2. Show Customer Input
3. Show Events Firing
4. Show Messages Sent
- workflow - what is it
- - very good , but how convince the business of it’s benefits
- - this article introduces you , builds a visual app that you can then demonstrate to the buisess users
- - allows you to propotype workflow
- Sample : Insurance?
- - go through JBoss , JBoss IDE
- - introduce JBPM
- - introduce bits
Using the Red Financial Workflow in the Enterprise
1.9. How it can be extended
1.10. How it can link to the other samples
Red Financial Workflow and Web 2.0
- Sharing of user knowledge
- Social Networking (and tools)
- Service Orientated Architecture
- How to orchestrate different systems. These systems may be (external) web 2.0 sites, or internal systems (with RSS capabilities added).
- Prototyping using Web 2.0 Techniques
- tie into web 2.0
- Ajax
- XML Web service out
- XML Web Service in
What RP gives you over the base
- Integrations
- Workflow starter
- Xml Integration (in and out)
- Tie to DB
- Integration with Spring
- Quartz Integration in sample
- Component Based : Introduce these , then get to work together
Deployment
1.11. Download as per chapter x
1.12. Build ant file
1.13. Deploy
-
Technical – Behind the Scenes
1.14. The use we make of the RP Core Files
1.15. Other Frameworks and Libraries used
1.16. Java files
1.17. Configuration Files
1.18. Extras
Install notes
- JBoss IDE , but download latest version of Jars (bug fix)
- Article on wiki at http://wiki.jboss.org/wiki/Wiki.jsp?page=JbpmGettingStarted
- sample server and project (including graphical process runner) linked from file:///C:/software/jbpm-starters-kit-3.1/jbpm-starters-kit-3.1/jbpm/doc/userguide/en/html/gettingstarted.html#d0e208
(download *everything*)
COMPONENT DEPLOY NOTES ON SERVER
- JBPM ide setup
- Jboss rules setup (in eclipse)
- ?? Hibernate Console??
- Hit the keywords (e.g. Oracle Application Server, IBM Websphere, SAP)
Jboss 4 Server setup
- Download
- Unzip
- (Google Desktop stop)
- go to correct server bin directory
- run \bin\run.bat
JMS sample Setup
- based on http://www.onjava.com/pub/a/onjava/2006/02/22/asynchronous-messaging-with-spring-jms.html
- added libraries from main rp2 code / jboss classpath
- log4j.xml into classes directory
- changed location of spring file (to project root)
- Changed to use file based spring setup (for Eclipse) - new FileSystemXmlApplicationContext("e:/projects/sample-spring-jms/loanapp-jms-spring.xml");
- change jbossmq-destinations-service.xml as per article
|
Hermes Setup
- make sure using Java 1.5 (hack if need be)
- download from hermesjms.com (be careful as to version
- move hermes up one level (so it is software/hermesmq/bin)
- modify hermes.bat to make it run
- Setup for jboss as per http://www.hermesjms.com/demos/jboss_config.html
- use pc name instead of localhost (settings in Article)
- make sure loader is jboss 4.0.4 (or your version number)
Configuration with JMS
-
JBPM
- download JBPM jars
possible to run without deploying to DB
(current) run - read file from deployed file on disk
(explain what different files are)
next - deploy to db
next -deploy to seam
SERVER CHANGES
- added to logging.properties
- datasource (default/ds)
AXIS DEPLOY - SERVER
- test http://localhost:8100/axis/happyaxis.jsp (or RedFinancialWorkflow)
- copy activation.jar to C:\software\Tomcat5_5\common\lib
- - test for javac on classpath http://localhost:8100/axis/EchoHeaders.jws?method=list (tools.jar on classpath)
- restart tomcat
- may also need to install mail.jar / xmlsec.jar
AXIS PROJECT SETUP
- copy of w from axis (webapps) folder into project
- -axis.jar / axis-ant.jar / commons-discovery.jar / commons-logging.jar
- - jaxrpc.jar / log4j.jar / saaj.jar / wsdl.jar
- copy of view files into ’view’ folder
- added source and test files
- new jws file based on echoheader
-
- http://localhost:8100/direct-process-flow/DirectEvent.jws?method=echo¶m=test
- ensure ANT and Tomcat versions of Java are the same (we used 1.5)
JBOSS RULES SETUP
- add logging
- add jars as per lib
Document
- Eclipse Setup (with plugins)
- Server Setup Tomcat , OAS)
Sequence of Events
1.19. Talk through what is happening behind the scenes during the section ’Using .... in the Enterprise’
- Input
- - JBoss workflow diagram
- - (Build) Actions / Tasks to ’Fire’
- - (Build) Image Manipulation
- - Web App to Tie together (use DWR)
- End Sample: Online
- - click ’next’ or decided
- - log window to show action
- - visually show user icon moving through workflow
- - show ’explosion’ for action fired
- Todo this
- o) Upgrade to standalone version (outside of eclipse)
- :- see if works ok
- :- see if can deploy to Tomcat (all War necessary)
- 1) Draw basic chart
- 2) Run Chart from JUnit
- 3) Add Logging on Actions
- 4) Add Logging on Tranistions
- 5) Package as Web Archive / call from simple servlet (with form)
- 6) Add Struts / DWR
- 7) Add table & post table click as event
- 8) Map events to Action
- 9) Data Structure in Session (state of diagram)
- 9) New Standard Action to update State based on event
- 10) Update Window based on state of data structure
- 11) Add logging to data structure
- 12) show log in window
- SNAZZY STUFF
- 1) More complicated diagram
- 2) Split diagram into table / grid
- 3) map actions to grid
- 4) map choices (e.g. varying transitions) to grid
- 5) add simple ’next’ button
- 6) persistence
Conclusion
1.20. Show that it does what we said it was going to do in
1.21. Link to next sample
Workflow – future work
Poss Use existing Jboss Jbpm sample
Note on happyaxis.jsp
Note on spring mapping in Web.xml
Note on Spring and Axis
Note on Url to call
Note that it is based on Spring Manual (section 19) and mapping from Petstore sample
Sample values to call workflow
http://iib-92mqn1j:8080/RedFinancialWorkflow/services/WorkflowStarter?method=startWorkflow&value=1
currently setup as :
WSDL available at http://iib-92mqn1j:8080/RedFinancialWorkflow/services/WorkflowStarter?wsdl
Scheduling using Quartz Bean : http://www.opensymphony.com/quartz/
And as noted in Section 23.1 of spring manual
- ease of use of workflow
- picture
- drag and drop
- events firing
- Jboss application
- sample workflow : expenses
Move to tech
- plugging into other systems
- JMS or Axis
- Called by other systems
- JMS or Axis
- Integration with Web 2.0 (via Ruby)
integration with rules
jBpm Standalone
Tech bit:
- Spring JMS Sender
- Jboss JMS Sender
Input
- JBoss workflow diagram
- (Build) Actions / Tasks to ’Fire’
- (Build) Image Manipulation
- Web App to Tie together (use DWR)
Workflow Technical Details
- Input
- - JBoss workflow diagram
- - (Build) Actions / Tasks to ’Fire’
- - (Build) Image Manipulation
- - Web App to Tie together (use DWR)
- End Sample: Online
- - click ’next’ or decided
- - log window to show action
- - visually show user icon moving through workflow
- - show ’explosion’ for action fired
- Todo this
- o) Upgrade to standalone version (outside of eclipse)
- :- see if works ok
- :- see if can deploy to Tomcat (all War necessary)
- 1) Draw basic chart
- 2) Run Chart from JUnit
- 3) Add Logging on Actions
- 4) Add Logging on Tranistions
- 5) Package as Web Archive / call from simple servlet (with form)
- 6) Add Struts / DWR
- 7) Add table & post table click as event
- 8) Map events to Action
- 9) Data Structure in Session (state of diagram)
- 9) New Standard Action to update State based on event
- 10) Update Window based on state of data structure
- 11) Add logging to data structure
- 12) show log in window
- SNAZZY STUFF
- 1) More complicated diagram
- 2) Split diagram into table / grid
- 3) map actions to grid
- 4) map choices (e.g. varying transitions) to grid
- 5) add simple ’next’ button
- 6) persistence

