SlideShare a Scribd company logo
1 of 39
Tom Baeyens & Joram Barrez
Alfresco
twitter: @tombaeyens @jbarrez




2
• Founder of Activiti & jBPM
• Passionate about Java and BPM
• http://processdevelopments.blogspot.com/




• Ex-core developer JBossjBPM
• Core developer Activiti
• http://www.jorambarrez.be/




3
• Process = Activities + Transitions
• Activity = Execution step in your application
• Configure out of the box activity types
    • User task
    • Email
    • Script
    • Web service
    • JMS
    • EJB
• Delegate to Java
  & scripting where
  necessary
• Timers


4
• Essence: State machine
• Persist state of an execution flow

                          Execution
                             EmplJohn Doe
                             Date    5/10/2010
                             Doc     vacation.xls
                             State   Approved




5
• Start process instance
    • Create new execution
    • Pass initial data in (optional)
    • Take transition to “Fetch data from DB”
    • Execute “Fetch data from DB”
    • Take transition to “Wait 1”
    • Stop interpreting process
    • Persist state
                             Execution
    • Return




6
INSERT INTO ACT_RU_EXECUTION
    (…, ACTIVITY_ID_, …)
    values
    (…, „Wait‟, …)


              Execution




7
• Signal
    • Load existing execution
    • Pass data in (optional)
    • Take transition to “Wait 2”
    • Stop interpreting process
    • Update runtime execution
    • Return

                           Execution




8
UPDATE ACT_RU_EXECUTION
    SET ACTIVITY_ID = „Wait 2‟




              Execution




9
• Signal
    • Load existing execution
    • Pass data in (optional)
    • Take transition to “Send email”
    • Execute “Send email”
    • Take transition to “end”
    • Stop interpreting process
    • Delete runtime execution
                            Execution
    • Return




10
DELETE FROM
     ACT_RU_EXECUTION WHERE ID_ =
     ?




                 Execution




11
• Examples
   • Task lists
   • JMS message send & receive
   • Web service send & receive
   • And… everything you can do in Java
• Activity pluggability




12
• Optional, default turned on
• Log every process instance
  and activity instance
• Activities at business level
Statistics are valuable
   business intelligence
For FREE




13
• How to implement a process with Activiti
   • Showing you the nitty-gritty details

• Making you an Activiti-ninja-developer-hero




14
• Use case: banks shouldn‟t lend money to just anybody
• Thorough analysis is needed
• All steps needs to be recorded in official documents
• Decisions are done based on Excel decision tables




15
16
= CMIS call


17
• Collection of resources

     Deployment deployment = repositoryService
      .createDeployment()
      .addClasspathResource(“mortgage-process.bpmn20.xml”)
      .addInputStream(“mortgage.png”)
      .addZipInputStream(“mortgage-docs.zip”)
        …




                                                        Deployment



18
• “Deploying”

     repositoryService
      .createDeployment()
      .addXXX()             bytes
        …
      .deploy()


                              Activiti engine
                                                  Mortgage process




                                       bpmn
             Deployment
                                      deployers
                                                  ProcessDefinition



19
• Markets, customers, products, … change
   • Business processes change
• Activiti supports versioned process definitions
                        ProcessInstanceprocessInstanceA =
                        runtimeService.startProcessInstanceByKey(“mortgage”);


                        repositoryService.createDeployment()
       Process def       .addClasspathResource(“mortgage-process.bpmn20.xml”)
     “mortgage”, ver
         sion = 1        .deploy();

                       ProcessInstanceprocessInstanceB =
       Process def     runtimeService.startProcessInstanceByKey(“mortgage”);
     “mortgage”, ver
         sion = 2




20
• But what about existingprocess instances?
   • They execute according the original process definition
   • “Phase-out” strategy
• New process instances
   • Default: latest deployed process definition
   • Instance migration
     runtimeService.startProcessInstanceByKey(“process-key”);
                                                       Latest deployed
     ProcessDefinitionprocDef =
     repositoryService.createProcessDefinitionQuery()
       .name(“myProcess”)
       .version(2)
       .singleResult();
     runtimeService.startProcessInstanceById(procDef.getId());

21                                                     Specific version
BPMN start event
• Programmatically
     ProcessInstanceprocessInstanceA =
     runtimeService.startProcessInstanceByKey(“myProces”);




22
• Processes often need data to run
    • Start event can have a start form to capture this data

          FormInstance form = repositoryService.getStartFormInstance(“mortgage”);




• Activiti Explorer




23
• Activiti Explorer
   • Supports easy-to-build-and-understand HTML forms




24
• Wait state
• Creates a Task entry in the DB




25
• Call custom business logic
• Support for
   • Delegation to class
   • Expressions (see later)




26
• Soon
   • Webservice support




27
• Control flow
   • Selects 1 (and only 1) outgoing seq-flow
     based on the expressions




28
• Automatic step
     • Specific service task shipped with Activiti




29
• With Activiti, your business processes are an integral
       part of your software project
         • So they should be tested just the same as your regular
           application code …
         • With unit tests !

     • Activiti supports both JUnit 3 and JUnit4 style of testing
       your business processes
         • And ships with a lot of convience for testing

     • Demo

30
                                                             Pic from http://silverbackapp.com
• That didn‟t make it into the demo
     • But is just too cool not to share with you
         • Timers
         • Script support
         • Query API
         • Spring integration
         • Method expressions
         • JPA




31
• Work is often time constrained
     • A timer boundary event can be attached
       to the boundary of any task or subprocess




32
• When timer fires
        • Current execution(s) inside scope of event are
          destroyed and process continues following seq-flow
          going out the timer event




33
• Execute a script embedded in the process definition
     • Any JSR-223 compliant script language
     • Opens up powerful capabilities
        • Javascript, XPath, CMIS-script (?)

                  <scriptTask id="theScriptTask" name="Execute script" scriptFormat="groovy">
                   <script>
                    sum = 0
                    for (i in inputArray) {
                      sum += i
                    }
                  execution.setVariable(“myVar”, sum)
                   </script>
                  </scriptTask>




34
• No need to learn the intern data model
     • Powerful and uniform query API
        • Deployments and process definitions
           repositoryService.createProcessDefinitionQuery.keyLike(“%mortgage%”).latest();

        • Process instances and executions
           runtimeService.createProcessInstanceQuery
           .processDefinitionKey(“mortgage-process)”.orderByProcessInstanceId().desc();
        • History
           historyService.createHistoricActivityQuery().processDefinitionId(procDefId)
             .activityType(“userTask”).orderByDuration().asc();
        • Variables
           runtimeService.createProcessInstanceQuery()
             .variableValueGreaterThan(“amount”, 50000);
        • Tasks, jobs, users, groups, historic activities/process
          instances/variables, …
35
• First-class integration with Spring
         • Define and inject Activiti process engine and services
         • Leverage and integrate with Spring transaction
           management
         • Delegate to Spring beans in the process definition
         • Resource deployment and duplicate filtering for
           simplified development
         • Spring unit testing support




36
• ProcessEngine as a Spring bean




     • Delegate to Spring beans



                                        <bean id=“printer” …




37
• Besides the typical expressions that everyone
       supports, Activiti has
         • method expressions
         • method parameters
            • Variables, execution, …

     • First-class JPA support
         • Store JPA entity as process variable
             • Seamless integration of domain model with process
         • Only domain model reference is stored
             • Fetch/update is done in original data store

38
Update JPA entity                        Decision based on
                         Spring bean          JPA entity property




                                   Process variables


39
• Satisfy your Activiti itch

• One-stop-shop download:
   • http://www.activiti.org

• Demo: “The Activiti Experience”
   • Do you have an excuse for not
     trying out Activiti later today?
                               40

More Related Content

What's hot

jBPM Suite admin workshop
jBPM Suite admin workshopjBPM Suite admin workshop
jBPM Suite admin workshopJózsef Lenti
 
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)Serena Software
 
Monitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saasMonitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saasBizTalk360
 
Integrated Requirements Management with Serena Dimensions RM 02-2016
Integrated Requirements Management with Serena Dimensions RM 02-2016Integrated Requirements Management with Serena Dimensions RM 02-2016
Integrated Requirements Management with Serena Dimensions RM 02-2016Serena Software
 
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...Sébastien Levert
 
Exchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug JohnsonExchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug JohnsonAcumatica Cloud ERP
 
Oracle fusion initiative, BPEL
Oracle fusion initiative, BPELOracle fusion initiative, BPEL
Oracle fusion initiative, BPELsohail akhtar
 
Building a Utilities Portal with Magnolia 5 & SAP
Building a Utilities Portal with Magnolia 5 & SAPBuilding a Utilities Portal with Magnolia 5 & SAP
Building a Utilities Portal with Magnolia 5 & SAPMagnolia
 
Scribe online 02 event based integration
Scribe online 02   event based integrationScribe online 02   event based integration
Scribe online 02 event based integrationScribe Software Corp.
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Phil Leggetter
 
UiPath Task Capture training.pdf
UiPath Task Capture training.pdfUiPath Task Capture training.pdf
UiPath Task Capture training.pdfCristina Vidu
 
Webinar - Activiti: il Business Process Management di Alfresco
Webinar - Activiti: il Business Process Management di AlfrescoWebinar - Activiti: il Business Process Management di Alfresco
Webinar - Activiti: il Business Process Management di AlfrescoAlfresco Software
 
Simplify the complexity of your business processes
Simplify the complexity of your business processesSimplify the complexity of your business processes
Simplify the complexity of your business processesKris Verlaenen
 
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014Enea Gabriel
 

What's hot (19)

Activiti bpm
Activiti bpmActiviti bpm
Activiti bpm
 
jBPM Suite admin workshop
jBPM Suite admin workshopjBPM Suite admin workshop
jBPM Suite admin workshop
 
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
 
Monitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saasMonitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saas
 
What's new in SBM 11.1
What's new in SBM 11.1What's new in SBM 11.1
What's new in SBM 11.1
 
Integrated Requirements Management with Serena Dimensions RM 02-2016
Integrated Requirements Management with Serena Dimensions RM 02-2016Integrated Requirements Management with Serena Dimensions RM 02-2016
Integrated Requirements Management with Serena Dimensions RM 02-2016
 
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
 
OMG: Modeling the Business
OMG: Modeling the BusinessOMG: Modeling the Business
OMG: Modeling the Business
 
O365: Attack of the Clones
O365: Attack of the ClonesO365: Attack of the Clones
O365: Attack of the Clones
 
Exchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug JohnsonExchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug Johnson
 
Oracle fusion initiative, BPEL
Oracle fusion initiative, BPELOracle fusion initiative, BPEL
Oracle fusion initiative, BPEL
 
Building a Utilities Portal with Magnolia 5 & SAP
Building a Utilities Portal with Magnolia 5 & SAPBuilding a Utilities Portal with Magnolia 5 & SAP
Building a Utilities Portal with Magnolia 5 & SAP
 
Scribe online 02 event based integration
Scribe online 02   event based integrationScribe online 02   event based integration
Scribe online 02 event based integration
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014
 
UiPath Task Capture training.pdf
UiPath Task Capture training.pdfUiPath Task Capture training.pdf
UiPath Task Capture training.pdf
 
Webinar - Activiti: il Business Process Management di Alfresco
Webinar - Activiti: il Business Process Management di AlfrescoWebinar - Activiti: il Business Process Management di Alfresco
Webinar - Activiti: il Business Process Management di Alfresco
 
General 06 scribe online or insight
General 06   scribe online or insightGeneral 06   scribe online or insight
General 06 scribe online or insight
 
Simplify the complexity of your business processes
Simplify the complexity of your business processesSimplify the complexity of your business processes
Simplify the complexity of your business processes
 
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
 

Viewers also liked

Devoxx 2009 University session Jbpm4 In Action
Devoxx 2009 University session Jbpm4 In ActionDevoxx 2009 University session Jbpm4 In Action
Devoxx 2009 University session Jbpm4 In ActionJoram Barrez
 
Presentation Bejug March 2009
Presentation Bejug March 2009Presentation Bejug March 2009
Presentation Bejug March 2009Joram Barrez
 
Alfresco Day Amsterdam 2015, Technical Track - Doing more with Activiti
Alfresco Day Amsterdam 2015, Technical Track - Doing more with ActivitiAlfresco Day Amsterdam 2015, Technical Track - Doing more with Activiti
Alfresco Day Amsterdam 2015, Technical Track - Doing more with ActivitiAlfresco Software
 
Alfresco Day Barcelona 2016 - Activiti BPM
Alfresco Day Barcelona 2016 - Activiti BPMAlfresco Day Barcelona 2016 - Activiti BPM
Alfresco Day Barcelona 2016 - Activiti BPMAlfresco Software
 
Devoxx 2009 Conference session Jbpm4 In Action
Devoxx 2009 Conference session Jbpm4 In ActionDevoxx 2009 Conference session Jbpm4 In Action
Devoxx 2009 Conference session Jbpm4 In ActionJoram Barrez
 
Bejug - Activiti in Action (part 1)
Bejug - Activiti in Action (part 1)Bejug - Activiti in Action (part 1)
Bejug - Activiti in Action (part 1)Joram Barrez
 
JWT-To-Activiti
JWT-To-ActivitiJWT-To-Activiti
JWT-To-ActivitiE P
 
Alfresco Devcon 2010: Introduction to Activiti BPM
Alfresco Devcon 2010: Introduction to Activiti BPMAlfresco Devcon 2010: Introduction to Activiti BPM
Alfresco Devcon 2010: Introduction to Activiti BPMJoram Barrez
 
Index Activiti Data on Elasticsearch
Index Activiti Data on ElasticsearchIndex Activiti Data on Elasticsearch
Index Activiti Data on ElasticsearchMike Dias
 
Presentation jBPM Community Day 2009 - First steps with jBPM4
Presentation jBPM Community Day 2009 - First steps with jBPM4Presentation jBPM Community Day 2009 - First steps with jBPM4
Presentation jBPM Community Day 2009 - First steps with jBPM4Joram Barrez
 
JBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten LaureijsJBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten LaureijsJoram Barrez
 
Activiti in Action for BeJUG Part II
Activiti in Action for BeJUG Part IIActiviti in Action for BeJUG Part II
Activiti in Action for BeJUG Part IITom Baeyens
 
Introduction to Alfresco Activiti BPM
Introduction to Alfresco Activiti BPMIntroduction to Alfresco Activiti BPM
Introduction to Alfresco Activiti BPMPaul Hampton
 
Alfresco Day Milano 2016 - Alfresco Activiti
Alfresco Day Milano 2016 - Alfresco ActivitiAlfresco Day Milano 2016 - Alfresco Activiti
Alfresco Day Milano 2016 - Alfresco ActivitiAlfresco Software
 
Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...
Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...
Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...Alfresco Software
 
Alfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo DataAlfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo DataAlfresco Software
 

Viewers also liked (17)

Devoxx 2009 University session Jbpm4 In Action
Devoxx 2009 University session Jbpm4 In ActionDevoxx 2009 University session Jbpm4 In Action
Devoxx 2009 University session Jbpm4 In Action
 
Presentation Bejug March 2009
Presentation Bejug March 2009Presentation Bejug March 2009
Presentation Bejug March 2009
 
Alfresco Day Amsterdam 2015, Technical Track - Doing more with Activiti
Alfresco Day Amsterdam 2015, Technical Track - Doing more with ActivitiAlfresco Day Amsterdam 2015, Technical Track - Doing more with Activiti
Alfresco Day Amsterdam 2015, Technical Track - Doing more with Activiti
 
Alfresco Day Barcelona 2016 - Activiti BPM
Alfresco Day Barcelona 2016 - Activiti BPMAlfresco Day Barcelona 2016 - Activiti BPM
Alfresco Day Barcelona 2016 - Activiti BPM
 
Devoxx 2009 Conference session Jbpm4 In Action
Devoxx 2009 Conference session Jbpm4 In ActionDevoxx 2009 Conference session Jbpm4 In Action
Devoxx 2009 Conference session Jbpm4 In Action
 
Bejug - Activiti in Action (part 1)
Bejug - Activiti in Action (part 1)Bejug - Activiti in Action (part 1)
Bejug - Activiti in Action (part 1)
 
JWT-To-Activiti
JWT-To-ActivitiJWT-To-Activiti
JWT-To-Activiti
 
Alfresco Devcon 2010: Introduction to Activiti BPM
Alfresco Devcon 2010: Introduction to Activiti BPMAlfresco Devcon 2010: Introduction to Activiti BPM
Alfresco Devcon 2010: Introduction to Activiti BPM
 
Next Generation BPM
Next Generation BPMNext Generation BPM
Next Generation BPM
 
Index Activiti Data on Elasticsearch
Index Activiti Data on ElasticsearchIndex Activiti Data on Elasticsearch
Index Activiti Data on Elasticsearch
 
Presentation jBPM Community Day 2009 - First steps with jBPM4
Presentation jBPM Community Day 2009 - First steps with jBPM4Presentation jBPM Community Day 2009 - First steps with jBPM4
Presentation jBPM Community Day 2009 - First steps with jBPM4
 
JBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten LaureijsJBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten Laureijs
 
Activiti in Action for BeJUG Part II
Activiti in Action for BeJUG Part IIActiviti in Action for BeJUG Part II
Activiti in Action for BeJUG Part II
 
Introduction to Alfresco Activiti BPM
Introduction to Alfresco Activiti BPMIntroduction to Alfresco Activiti BPM
Introduction to Alfresco Activiti BPM
 
Alfresco Day Milano 2016 - Alfresco Activiti
Alfresco Day Milano 2016 - Alfresco ActivitiAlfresco Day Milano 2016 - Alfresco Activiti
Alfresco Day Milano 2016 - Alfresco Activiti
 
Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...
Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...
Alfresco Day Warsaw 2016: Next-Generation Business Process Management with Al...
 
Alfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo DataAlfresco Day Milano 2016 - Demo Data
Alfresco Day Milano 2016 - Demo Data
 

Similar to Alfresco Devcon 2010: A new kind of BPM with Activiti

Spring Batch Performance Tuning
Spring Batch Performance TuningSpring Batch Performance Tuning
Spring Batch Performance TuningGunnar Hillert
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentJeremy Thake
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersNCCOMMS
 
MobX: the way to simplicity
MobX: the way to simplicityMobX: the way to simplicity
MobX: the way to simplicityGrid Dynamics
 
Process Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootProcess Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootChavdar Baikov
 
Continuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyContinuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyRightScale
 
Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...
Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...
Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...Atlassian
 
Automate workflows with leading open-source BPM
Automate workflows with leading open-source BPMAutomate workflows with leading open-source BPM
Automate workflows with leading open-source BPMKris Verlaenen
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodologylaeshin park
 
GR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails WebflowGR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails WebflowGR8Conf
 
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoNCCOMMS
 
Dealing with and learning from the sandbox
Dealing with and learning from the sandboxDealing with and learning from the sandbox
Dealing with and learning from the sandboxElaine Van Bergen
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Igalia
 
Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!James Casey
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIOliver Busse
 
Operating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesOperating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesNoriaki Tatsumi
 
Chef Analytics (Chef NYC Meeting - July 2014)
Chef Analytics (Chef NYC Meeting - July 2014)Chef Analytics (Chef NYC Meeting - July 2014)
Chef Analytics (Chef NYC Meeting - July 2014)James Casey
 

Similar to Alfresco Devcon 2010: A new kind of BPM with Activiti (20)

JBUG.be jBPM4
JBUG.be jBPM4JBUG.be jBPM4
JBUG.be jBPM4
 
Spring Batch Performance Tuning
Spring Batch Performance TuningSpring Batch Performance Tuning
Spring Batch Performance Tuning
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online development
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
MobX: the way to simplicity
MobX: the way to simplicityMobX: the way to simplicity
MobX: the way to simplicity
 
Process Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootProcess Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring Boot
 
Continuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyContinuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases Weekly
 
Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...
Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...
Using Atlassian UAL and ActiveObjects for Rapid Plugin Development - AtlasCam...
 
Automate workflows with leading open-source BPM
Automate workflows with leading open-source BPMAutomate workflows with leading open-source BPM
Automate workflows with leading open-source BPM
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodology
 
jQuery On Rails
jQuery On RailsjQuery On Rails
jQuery On Rails
 
GR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails WebflowGR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails Webflow
 
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
 
Dealing with and learning from the sandbox
Dealing with and learning from the sandboxDealing with and learning from the sandbox
Dealing with and learning from the sandbox
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)
 
Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
 
Operating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesOperating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud Microservices
 
Chef Analytics (Chef NYC Meeting - July 2014)
Chef Analytics (Chef NYC Meeting - July 2014)Chef Analytics (Chef NYC Meeting - July 2014)
Chef Analytics (Chef NYC Meeting - July 2014)
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Alfresco Devcon 2010: A new kind of BPM with Activiti

  • 1. Tom Baeyens & Joram Barrez Alfresco twitter: @tombaeyens @jbarrez 2
  • 2. • Founder of Activiti & jBPM • Passionate about Java and BPM • http://processdevelopments.blogspot.com/ • Ex-core developer JBossjBPM • Core developer Activiti • http://www.jorambarrez.be/ 3
  • 3. • Process = Activities + Transitions • Activity = Execution step in your application • Configure out of the box activity types • User task • Email • Script • Web service • JMS • EJB • Delegate to Java & scripting where necessary • Timers 4
  • 4. • Essence: State machine • Persist state of an execution flow Execution EmplJohn Doe Date 5/10/2010 Doc vacation.xls State Approved 5
  • 5. • Start process instance • Create new execution • Pass initial data in (optional) • Take transition to “Fetch data from DB” • Execute “Fetch data from DB” • Take transition to “Wait 1” • Stop interpreting process • Persist state Execution • Return 6
  • 6. INSERT INTO ACT_RU_EXECUTION (…, ACTIVITY_ID_, …) values (…, „Wait‟, …) Execution 7
  • 7. • Signal • Load existing execution • Pass data in (optional) • Take transition to “Wait 2” • Stop interpreting process • Update runtime execution • Return Execution 8
  • 8. UPDATE ACT_RU_EXECUTION SET ACTIVITY_ID = „Wait 2‟ Execution 9
  • 9. • Signal • Load existing execution • Pass data in (optional) • Take transition to “Send email” • Execute “Send email” • Take transition to “end” • Stop interpreting process • Delete runtime execution Execution • Return 10
  • 10. DELETE FROM ACT_RU_EXECUTION WHERE ID_ = ? Execution 11
  • 11. • Examples • Task lists • JMS message send & receive • Web service send & receive • And… everything you can do in Java • Activity pluggability 12
  • 12. • Optional, default turned on • Log every process instance and activity instance • Activities at business level Statistics are valuable business intelligence For FREE 13
  • 13. • How to implement a process with Activiti • Showing you the nitty-gritty details • Making you an Activiti-ninja-developer-hero 14
  • 14. • Use case: banks shouldn‟t lend money to just anybody • Thorough analysis is needed • All steps needs to be recorded in official documents • Decisions are done based on Excel decision tables 15
  • 15. 16
  • 17. • Collection of resources Deployment deployment = repositoryService .createDeployment() .addClasspathResource(“mortgage-process.bpmn20.xml”) .addInputStream(“mortgage.png”) .addZipInputStream(“mortgage-docs.zip”) … Deployment 18
  • 18. • “Deploying” repositoryService .createDeployment() .addXXX() bytes … .deploy() Activiti engine Mortgage process bpmn Deployment deployers ProcessDefinition 19
  • 19. • Markets, customers, products, … change • Business processes change • Activiti supports versioned process definitions ProcessInstanceprocessInstanceA = runtimeService.startProcessInstanceByKey(“mortgage”); repositoryService.createDeployment() Process def .addClasspathResource(“mortgage-process.bpmn20.xml”) “mortgage”, ver sion = 1 .deploy(); ProcessInstanceprocessInstanceB = Process def runtimeService.startProcessInstanceByKey(“mortgage”); “mortgage”, ver sion = 2 20
  • 20. • But what about existingprocess instances? • They execute according the original process definition • “Phase-out” strategy • New process instances • Default: latest deployed process definition • Instance migration runtimeService.startProcessInstanceByKey(“process-key”); Latest deployed ProcessDefinitionprocDef = repositoryService.createProcessDefinitionQuery() .name(“myProcess”) .version(2) .singleResult(); runtimeService.startProcessInstanceById(procDef.getId()); 21 Specific version
  • 21. BPMN start event • Programmatically ProcessInstanceprocessInstanceA = runtimeService.startProcessInstanceByKey(“myProces”); 22
  • 22. • Processes often need data to run • Start event can have a start form to capture this data FormInstance form = repositoryService.getStartFormInstance(“mortgage”); • Activiti Explorer 23
  • 23. • Activiti Explorer • Supports easy-to-build-and-understand HTML forms 24
  • 24. • Wait state • Creates a Task entry in the DB 25
  • 25. • Call custom business logic • Support for • Delegation to class • Expressions (see later) 26
  • 26. • Soon • Webservice support 27
  • 27. • Control flow • Selects 1 (and only 1) outgoing seq-flow based on the expressions 28
  • 28. • Automatic step • Specific service task shipped with Activiti 29
  • 29. • With Activiti, your business processes are an integral part of your software project • So they should be tested just the same as your regular application code … • With unit tests ! • Activiti supports both JUnit 3 and JUnit4 style of testing your business processes • And ships with a lot of convience for testing • Demo 30 Pic from http://silverbackapp.com
  • 30. • That didn‟t make it into the demo • But is just too cool not to share with you • Timers • Script support • Query API • Spring integration • Method expressions • JPA 31
  • 31. • Work is often time constrained • A timer boundary event can be attached to the boundary of any task or subprocess 32
  • 32. • When timer fires • Current execution(s) inside scope of event are destroyed and process continues following seq-flow going out the timer event 33
  • 33. • Execute a script embedded in the process definition • Any JSR-223 compliant script language • Opens up powerful capabilities • Javascript, XPath, CMIS-script (?) <scriptTask id="theScriptTask" name="Execute script" scriptFormat="groovy"> <script> sum = 0 for (i in inputArray) { sum += i } execution.setVariable(“myVar”, sum) </script> </scriptTask> 34
  • 34. • No need to learn the intern data model • Powerful and uniform query API • Deployments and process definitions repositoryService.createProcessDefinitionQuery.keyLike(“%mortgage%”).latest(); • Process instances and executions runtimeService.createProcessInstanceQuery .processDefinitionKey(“mortgage-process)”.orderByProcessInstanceId().desc(); • History historyService.createHistoricActivityQuery().processDefinitionId(procDefId) .activityType(“userTask”).orderByDuration().asc(); • Variables runtimeService.createProcessInstanceQuery() .variableValueGreaterThan(“amount”, 50000); • Tasks, jobs, users, groups, historic activities/process instances/variables, … 35
  • 35. • First-class integration with Spring • Define and inject Activiti process engine and services • Leverage and integrate with Spring transaction management • Delegate to Spring beans in the process definition • Resource deployment and duplicate filtering for simplified development • Spring unit testing support 36
  • 36. • ProcessEngine as a Spring bean • Delegate to Spring beans <bean id=“printer” … 37
  • 37. • Besides the typical expressions that everyone supports, Activiti has • method expressions • method parameters • Variables, execution, … • First-class JPA support • Store JPA entity as process variable • Seamless integration of domain model with process • Only domain model reference is stored • Fetch/update is done in original data store 38
  • 38. Update JPA entity Decision based on Spring bean JPA entity property Process variables 39
  • 39. • Satisfy your Activiti itch • One-stop-shop download: • http://www.activiti.org • Demo: “The Activiti Experience” • Do you have an excuse for not trying out Activiti later today? 40