Workshop WSO2 BPS 3.5.x - BPMN

52
WSO2 BPS 3.5 Partner Foundations Workshop BPMN Chapter Edgar Silva @jedgarsilva

Transcript of Workshop WSO2 BPS 3.5.x - BPMN

Page 1: Workshop WSO2 BPS 3.5.x - BPMN

WSO2 BPS 3.5 Partner Foundations Workshop BPMN Chapter

Edgar Silva @jedgarsilva

Page 2: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 3: Workshop WSO2 BPS 3.5.x - BPMN

Installation

o As easy as any WSO2 Product o Download o Unzip o Run (BPS_UNZIPED_FOLDER/bin/wso2server.sh)

Page 4: Workshop WSO2 BPS 3.5.x - BPMN
Page 5: Workshop WSO2 BPS 3.5.x - BPMN
Page 6: Workshop WSO2 BPS 3.5.x - BPMN

Deployed applications

o Carbon (Management Console) o Human Task Explorer o BPMN Explorer

Page 7: Workshop WSO2 BPS 3.5.x - BPMN

Deployed applications

o Carbon (Management Console)

Page 8: Workshop WSO2 BPS 3.5.x - BPMN

Deployed applications

o Human Task Explorer -https://127.0.0.1:9443/humantask-explorer

Page 9: Workshop WSO2 BPS 3.5.x - BPMN

Deployed applications

o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer

Page 10: Workshop WSO2 BPS 3.5.x - BPMN

Deployed applications

o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer

Page 11: Workshop WSO2 BPS 3.5.x - BPMN

Deployed applications

o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer

Page 12: Workshop WSO2 BPS 3.5.x - BPMN

Creating your first workflow process

Page 13: Workshop WSO2 BPS 3.5.x - BPMN

Before your start

o You must have the latest Activiti Plugin installed into your eclipse:

o http://activiti.org/designer/update/

Page 14: Workshop WSO2 BPS 3.5.x - BPMN

Take a look on what we will do ….

Page 15: Workshop WSO2 BPS 3.5.x - BPMN
Page 16: Workshop WSO2 BPS 3.5.x - BPMN

A customer want to open a bank account

Fulfil data (Form)

check initial deposit

> amount X

Notify customer

Page 17: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 18: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 19: Workshop WSO2 BPS 3.5.x - BPMN

Configuring Process default metadata

o Please click on the diagram and set the properties according the image on this slide.

19

Page 20: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 21: Workshop WSO2 BPS 3.5.x - BPMN

Start Node

o Now Click on the Form tab and add the following properties accordingly:

21

Page 22: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 23: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 24: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 25: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 26: Workshop WSO2 BPS 3.5.x - BPMN

Creating Exclusive Gateway

o Please add the following properties

26

Page 27: Workshop WSO2 BPS 3.5.x - BPMN

Creating Exclusive Gateway

o Please add the following properties

27

Page 28: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 29: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 30: Workshop WSO2 BPS 3.5.x - BPMN

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.

Page 31: Workshop WSO2 BPS 3.5.x - BPMN

Now: Creating the Premium Account Human Task

o Name: Premium Account o Candidate Group: premium-managers o Here the form:

Page 32: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 33: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 34: Workshop WSO2 BPS 3.5.x - BPMN

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.

Page 35: Workshop WSO2 BPS 3.5.x - BPMN

Email Task

o The step before finish that process sample is to send and email to the customer.

Page 36: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 37: Workshop WSO2 BPS 3.5.x - BPMN

Finish : End Node

Page 38: Workshop WSO2 BPS 3.5.x - BPMN

Deploying Process

Page 39: Workshop WSO2 BPS 3.5.x - BPMN

Exporting Process to an Archive (zip)

o It will generate a zip file.

o After that rename the file for .bar

Page 40: Workshop WSO2 BPS 3.5.x - BPMN

Deploying Process in BPS Console

Page 41: Workshop WSO2 BPS 3.5.x - BPMN
Page 42: Workshop WSO2 BPS 3.5.x - BPMN
Page 43: Workshop WSO2 BPS 3.5.x - BPMN
Page 44: Workshop WSO2 BPS 3.5.x - BPMN
Page 45: Workshop WSO2 BPS 3.5.x - BPMN
Page 46: Workshop WSO2 BPS 3.5.x - BPMN

Process Instance

Page 47: Workshop WSO2 BPS 3.5.x - BPMN

BPMN REST api

Page 48: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 49: Workshop WSO2 BPS 3.5.x - BPMN

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

Page 50: Workshop WSO2 BPS 3.5.x - BPMN
Page 51: Workshop WSO2 BPS 3.5.x - BPMN

For more info on this

o See that reference: o https://docs.wso2.com/display/BPS351/BPMN

+REST+API

Page 52: Workshop WSO2 BPS 3.5.x - BPMN

Comments, questions: @jedgarsilva

More information: www.wso2.com