Upload
edgar-silva
View
201
Download
0
Embed Size (px)
Citation preview
WSO2 BPS 3.5 Partner Foundations Workshop BPMN Chapter
Edgar Silva @jedgarsilva
Foundation
o WSO2 BPS 3.5 - BPMN Capabilities o Summary:
o Rely on Apache project: Activiti BPMN o Historical background:
o Tom Bayens (former jBPM founder/leader)
o Supported as well for other organzations
o Activiti on Steroids o Multitenant o Clustering o Rich REST API o etc
Installation
o As easy as any WSO2 Product o Download o Unzip o Run (BPS_UNZIPED_FOLDER/bin/wso2server.sh)
Deployed applications
o Carbon (Management Console) o Human Task Explorer o BPMN Explorer
Deployed applications
o Carbon (Management Console)
Deployed applications
o Human Task Explorer -https://127.0.0.1:9443/humantask-explorer
Deployed applications
o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer
Deployed applications
o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer
Deployed applications
o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer
Creating your first workflow process
Before your start
o You must have the latest Activiti Plugin installed into your eclipse:
o http://activiti.org/designer/update/
Take a look on what we will do ….
A customer want to open a bank account
Fulfil data (Form)
check initial deposit
> amount X
Notify customer
Process Explanation (When process is well designed, that is useless)
o A customer want to open an account into our thin bank o According the initial process, that customer will be
managed by a different customer level (platinum or standard).
o In the end the customer will discover who is your account manager, that will be the responsible for the whole relationship
o That last step/interaction will be made via e-mail
Create a new project
1. Create an Activiti Project called thinbank-bpm
2. Follow the basic instructions for creating the project (source destination, package etc)
3. Create an Activiti Diagram called open-account.bpmn
18
Configuring Process default metadata
o Please click on the diagram and set the properties according the image on this slide.
19
Start Node
o That is the first step in the process. o From the Palette, just add that start
node o Click on the start node and set the
following properties
20
Start Node
o Now Click on the Form tab and add the following properties accordingly:
21
Checkpoint 1 : What had you made so far…
o You configured which will be the initial variables
available for instantiate a new process instance.
o Those variables will be presented into a form, that can be rendered in WSO2 BPS 3.5.x
Basics : Process Instance
o Class vs Object o Definition vs Instance
23
Process Definition
Process Instances
name: Jorge Santana
name: Elvis Presley
name: Mano Brown
Creating Sequence Flows
o Between each step in the process, you will need a sequence-flow (arrow) representing the flow.
o It might be added from the components palette
o or:
24
Creating Sequence Flows
o In the next step we will create an exclusive gateway node.
o So click on exclusive and drag to your right in the canvas.
25
Creating Exclusive Gateway
o Please add the following properties
26
Creating Exclusive Gateway
o Please add the following properties
27
Creating Exclusive Gateway
o An exclusive gateway defines the possible next steps, according some variable or event.
o It is similar to a Case or IF according to the scenarios
o In our sample, we will have 2 possible ways: o A Human Task for Default Account
or o If the Initial Deposit Amount is larger
than <A value> it goes to Premium Account
o In that case we will 2 possible next steps according a variable
28
Creating the Default Account Human Task
o Please fill the following
properties:
o Name: Default Account
o Click on Main Config tab and
add the following value on
Candidate Group: “default-
managers"
o Click on Form Tab and add the
the properties according next
slide
Add the following Form Properties
o Note: Just take a look on properties that are writable or not (read only
props), that ones were informed by the “customer" in previous step.
Now: Creating the Premium Account Human Task
o Name: Premium Account o Candidate Group: premium-managers o Here the form:
From Exclusive Gateway, how the process knows to where navigate?
o One of the sequence-flows will be the default one.
o And the other will be activated/executed when and just when the (condition) variable initialDeposit is greater than 10,000
From Exclusive Gateway, how the process knows to where navigate?
o One of the sequence-flows will be the default one.
o And the other will be activated/executed when and just when the (condition) variable initialDeposit is greater than 10,000
From Exclusive Gateway, how the process knows to where navigate?
o In that sequence flow that lands on Premium Account Human Task, you will add in the Main config tab the following condition: ${initialDeposit>10000}
o So based on the value on the initialDeposit process instance variable, we will go to Premium or Default Account.
Email Task
o The step before finish that process sample is to send and email to the customer.
Email Task
o The step before finish that
process sample is to send
and email to the customer.
o Keep in mind that you have
to configure BPS for
sending e-mails: https://
docs.wso2.com/display/
BPS351/Working+with+the
+Email+Task
Finish : End Node
Deploying Process
Exporting Process to an Archive (zip)
o It will generate a zip file.
o After that rename the file for .bar
Deploying Process in BPS Console
Process Instance
BPMN REST api
Accessing the whole process context via REST Testing via Postman
https://192.168.1.135:9443/bpmn/runtime/process-instanceshttps://<SEUIP>:<PORTA>/bpmn/runtime/process-instances
Accessing the whole process context via REST Testing via Postman
https://192.168.1.135:9443/bpmn/runtime/process-instanceshttps://<SEUIP>:<PORTA>/bpmn/runtime/process-instances
For more info on this
o See that reference: o https://docs.wso2.com/display/BPS351/BPMN
+REST+API
Comments, questions: @jedgarsilva
More information: www.wso2.com