2. 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
3. Installation
o As easy as any WSO2 Product
o Download
o Unzip
o Run (BPS_UNZIPED_FOLDER/bin/wso2server.sh)
16. A customer want to open a bank account
Fulfil
data
(Form)
check initial deposit
> amount X
Notify customer
17. 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
18. 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
19. Configuring Process default metadata
o Please click on the
diagram and set
the properties
according the
image on this slide.
19
20. 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
21. Start Node
o Now Click on the Form tab and add the following properties accordingly:
21
22. 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
23. 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
24. 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
25. 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
28. 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
29. 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
30. 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.
31. Now: Creating the Premium Account Human Task
o Name: Premium Account
o Candidate Group: premium-managers
o Here the form:
32. 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
33. 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
34. 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.
35. Email Task
o The step before
finish that process
sample is to send
and email to the
customer.
36. 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
48. Accessing the whole process context via REST
Testing via Postman
https://192.168.1.135:9443/bpmn/runtime/process-instances
https://<SEU IP>:<PORTA>/bpmn/runtime/process-instances
49. Accessing the whole process context via REST
Testing via Postman
https://192.168.1.135:9443/bpmn/runtime/process-instances
https://<SEU IP>:<PORTA>/bpmn/runtime/process-instances
50.
51. For more info on this
o See that reference:
o https://docs.wso2.com/display/BPS351/BPMN
+REST+API