Top Banner
Confidential Internal Activiti BPM Framework Shivnarayan R. Varma Sr. Architect, Tech COE April 30, 2014
21

Actviti bpm framework 1.0

Oct 19, 2014

Download

Technology

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Actviti bpm framework 1.0

Confidential Internal

Activiti BPM Framework

Shivnarayan R. VarmaSr. Architect, Tech COE

April 30, 2014

Page 2: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 2 Confidential Internal

Table of Contents

• What is BPM?• Why BPM?• Key Advantages of BPM• Overview BPMN• Overview Activiti• Activiti Process Engine• Activiti API• Activiti Spring Integration• Embedding Activiti with Your Application• Q & A

Page 3: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 3 Confidential Internal

What is BPM?

What is Business Process Modeling?

Business Process Modeling is the activity of representing processes of an enterprise, so that the current process may be analyzed and improved by other professionals. This describes the order in which a series of steps need to be executed using a flow chart.

Page 4: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 4 Confidential Internal

Why BPM ? Part - 1

• With its visual modeling of all workflow and logic, BPM accelerates change and enables understanding for both IT and users far beyond what is possible by looking at mockups or lines of code.

• Model the logic and click the run button and it’s executing.

• No detail too small, no behind the scenes piles of code.

• No code generation and then modifications, the model is the code.

• By making software development a truly collaborative experience between IT and the business, many steps in the traditional development cycle are reduced or removed.

• Users participate directly as workflow is diagrammed, screens are laid out and business rules are defined.

Page 5: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 5 Confidential Internal

Why BPM ? Part - 2

• Real-time Information on the Performance of Processes

• Easy development – Configure new processes and applications on the fly, exactly the way business wants. Predictable, on time and within budget

• Reduced TCO – Implement new processes and applications faster and cheaper with a highly scalable BPM platform, leveraging existing IT investment

• No limitations – Build and change processes and applications without restrictions imposed by existing, proprietary technologies

Page 6: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 6 Confidential Internal

Relationship of BPEL to BPMN

• Business Process Execution Language (BPEL), short for Web Services Business Process Execution Language (WS-BPEL), is an executable dialect of XML that allows for the modeling of interactions between Web services on the cloud. Business Process Execution Language (BPEL), short for Web Services Business Process Execution Language (WS-BPEL), is an executable dialect of XML that allows for the modeling of interactions between Web services on the cloud. BPEL allows for complex orchestrations of multiple service applications through a single controller service.

• There is no standard graphical notation for WS-BPEL. Unlike BPEL, BPMN is not executable and so is mostly used for planning and design. BPMN, though, has a visual component that makes it easier to understand for business people not familiar with programming.

Page 7: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 7 Confidential Internal

BPMN 2.0 Positioning

BPMN2Model

ProcessChoreography

Collaboration

ServicesWS-BPEL

Activiti

SOA

Rules

Event

BRMS

Page 8: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 8 Confidential Internal

BPMN 2.0

Page 9: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 9 Confidential Internal

BPMN 2.0

Page 10: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 10 Confidential Internal

BPMN 2.0 Example

<?xml version="1.0" encoding="UTF-8"?><definitions id="definitions"xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:activiti="http://activiti.org/bpmn"typeLanguage="http://www.w3.org/2001/XMLSchema"expressionLanguage="http://www.w3.org/1999/XPath"targetNamespace="http://www.activiti.org/bpmn2.0">

<process id="hello"><startEvent id="start"/><sequenceFlow id="sf1" sourceRef="start" targetRef="helloScriptTask"/><scriptTask id="helloScriptTask" name="Execute script" scriptFormat="groovy"><script>println 'hello ' + customerId + '!'</script></scriptTask><sequenceFlow id="sf2" sourceRef="helloScriptTask" targetRef="end"/><endEvent id="end"/>

</process></definitions>

Page 11: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 11 Confidential Internal

Overview Activiti

Page 12: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 12 Confidential Internal

Activiti Deployment View

Page 13: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 13 Confidential Internal

Sample Demo

Developing sample Process flow using BPM and running it…..

Page 14: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 14 Confidential Internal

Activiti Process Engine

Page 15: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 15 Confidential Internal

Activiti API Example for Hello

ProcessEngine engine= new ProcessEngineBuilder() .configureFromResource(“activiti.cfg.xml”) .buildProcessEngine();engine.getRuntimeService().startProcessInstanceByKey(“hello”);Task task = engine.getTaskService().createTaskQuery().singleResult();Engine.getTaskService().complete(task.getId());

Page 16: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 16 Confidential Internal

Activiti API

Powerful and uniform query API1. Deployments and process definitionsrepositoryService.createProcessDefinitionQuery.keyLike(“%mortgage%”).latest();2. Process instances and executions

runtimeService.createProcessInstanceQuery .processDefinitionKey(“mortgage-process)”.orderByProcessInstanceId().desc();

3. History

historyService.createHistoricActivityQuery().processDefinitionId(procDefId) .activityType(“userTask”).orderByDuration().asc();

4. VariablesruntimeService.createProcessInstanceQuery() .variableValueGreaterThan(“amount”, 50000);

5. Tasks, jobs, users, groups, historic activities/process instances/variables, …

Page 17: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 17 Confidential Internal

Activiti Spring Integration

Page 18: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 18 Confidential Internal

Activiti Integration with spring Config<beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">      <property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" /> -- --  <property name="eventListeners">      <list>         <bean class="org.activiti.engine.example.MyEventListener" />      </list>    </property>

  </bean></beans>

Page 19: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 19 Confidential Internal

Embedding Activiti with Your Application

• Embeds in • Your database• Your transaction• Your domain model• Your tests• Your Spring configuration

19

TomcatJDK 5

…Oracle, MySQL, PostgreSQL

Activiti YourApp

Spring

Page 20: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 20 Confidential Internal

• Start a BPM workflow based event from incoming messages in queue or newly inserted row in database or Feed file received.

• Our Message Listener / DB-Poller will listen incoming messages and creates BPM event based on that.

• Create Web application which allows users to login and shows list of all the workflow based task assigned to them.

• BPMN based workflow is initiated to handle this workflow task.• Task will be assigned based various groups, users, roles, profiles defined in

database.

Real time example: Demonstrating Activiti integration with spring in web application

20

Page 21: Actviti bpm framework 1.0

© 2013 Fiserv, Inc. or its affiliates. 21 Confidential Internal

Q & A

21

Questions?