SlideShare a Scribd company logo
1 of 37
Download to read offline
The Learning Pathway
Actions Rules
and Simple and Advanced
Workflow Integration Use
Cases
Jörg Sauer
The longest title ever


•  Actions, Rules and Simple and Advanced
 Workflow Integration Use Cases
 is about
  o    Actions to extend Alfresco functionality
  o    Rules to automate execution of Actions
  o    Use Simple Workflows to implement a Workflow
       without coding
        •  Add Rules to run certain Actions in Workflow steps
        •  Use a simple Advanced Workflow to leverage Tasks
           in Simple Workflows
Basic Example to be extended


•  Review Publish Workflow with 2 phase
   approval

           review               approve               publish

1 Drafts    reject   2 Review             3 Approve             4 Published


                     reject
Simple Workflow

              review               approve               publish

1 Drafts       reject   2 Review             3 Approve             4 Published


                        reject

•  Pros:
    o    User can build workflow
    o    Easy to understand
•  Cons:
    o    No State: Implicit state by location (folder)
    o    No Task: Implicit task by folder access
    o    No branching: Serial workflow only
Demo Simple Workflow
Adding Status


•  Content Model:
  o    Provide custom Aspect to hold workflow status
Amend Workflow with status


•  Set Status on each workflow folder
      o    Add Aspect: Workflow Status
      o    Set workflow status accordingly
                              reject

                    review                     approve                    publish

1 Drafts             reject   2 Review                   3 Approve                   4 Published
  • Status: draft              • Status: under review     • Status: pend. approval    • Status: published
After configuration
Transfer Status to incoming documents


•  JavaScript to copy status




•  Execute by Rule
Simple Workflow Status Demo
Alfresco Repository Actions

•  Action: Unit of work that is performed against a node
•  Examples:
   o    Move node
   o    Transform content of node
   o    Send email

•  Out of the Box Actions
•  Custom Actions
   o    Implement own Action class
   o    Deploy in Application Context
Implement Copy Workflow Status Action
Deploy Action (Application Context)

•  Beans: webinar-action-context.xml




•  Labels: webinar-action.properties
Simple Workflow: Implementation Details


•  Documents amended with properties for
  o    Approve step label, copy/move, destination
  o    Reject step label, copy/move, destination
       (all optional)
Intention: Create User Task

  o    Every time simple workflow is assigned, create
       advanced workflow task for specific user.
  o    User can
        •  access task in task list
        •  see task description
        •  access attached document
        •  approve or reject directly from within task
  o    Advantage
        •  No notification emails
        •  No need to check simple workflow folders
Simple Workflow Task Architecture


•  Required:
  o    Custom aspect for task description.
       (attached to simple workflow folder)
  o    Advanced workflow to be started by rule
        •  Configure user
        •  Provide task
        •  Implement simple workflow actions for
           –  Approve
           –  Reject
  o    Bug Fix for Alfresco StartWorkflowActionExecuter
  o    UI for Rule Config
Workflow Description Aspect
Simple Workflow Task Advanced Workflow
Content Model for Workflow

•  Aspects:
   o    simpleWorflow: Manage Action Labels
•  Content Types:
   o    simpleWfTaskStart: Properties for Start Task
          •  Assignee
          •  Task Description
          •  Simple Workflow Approve & Reject Action Labels
          •  All above become process variables!
   o    ApprovalOnlyTask: Task properties to approve document
   o    ApproveOrRejectTask: Properties for approving or rejecting the
        document
•  Simplicity: all in sample model
•  Best practice: own workflow model
Workflow Model (partial)
Simple Process Definition


•  Create Process Definition
  o    Graphically
  o    Change root tag:

  o    Add Swimlanes



  o    Add tasks to task node, will render UI
Workflow Deployment


•  Attention: No actions implemented yet!
•  But want to check if model is correct &
   workflow deploys
•  Context file:



•  Redeploy off on production systems!
Workflow Actions


•  User decides in task to
  o    Approve
  o    Reject
•  Workflow will transition to nodes
  o    approveDocument: code will approve simple
       workflow
  o    rejectDocument: code will reject simple workflow
•  Todo: Implement Event Handler
  o    for node-enter event (approve / reject)
Code (sneaking)


•  UI has actions for approve/reject
•  Look for action definition in web-client-
     config-actions.xml




•  Sample implementation can be found in
     DocumentDetailsDialog.approve() / reject() methods!
•    OpenSource Rules!
Review Alfresco implementation


•  DocumentDetailsDialog.approve()
Direct Code reuse


•  Problem:
  o    From Package org.alfresco.web.bean
  o    Workflow Event not within web context.
  o    DocNode not core object
•  Solution:
  o    Reprogram but use native Foundation Services API
  o    Should be fool proof ;-)
Lets get the event


•  Define in Process Definition


•  Derive from JBPMSpringActionHandler
What to Implement Where


•  initializeHandler():
  o    Get all services needed from the factory
        •  ServiceRegistry   (in case you need something)
        •  NodeService       to deal with the node
        •  CopyService       to copy/move the document
•  execute():
  o    Get the process variables through executionContext
  o    Implement the approve / reject action
Hiding Reject Transition if Not Set


•  Hide reject transition accordingly
  o    task-assign event (has to be this event!)
  o    use bpm:hiddenTransitions (bpm_hiddenTransitions)
Testing First Version


•  Redeploy
•  Manually start Simple Workflow Task workflow
•  Fill in all details in the start form
•  Test both scenarios:
  o    Approval only (reject transition hidden?)
  o    Approve or Reject
•  Task should show up in task list
•  Open Task and pick Action
•  Check if document has been moved / copied
  according to Simple Workflow configuration.
What’s Missing


•  Action to start Simple Workflow Task
 Workflow
  o    Repository Action
•  UI to fill in Assignee in Rules Configuration
  o    Action Handler

•  Simple approach:
  o    Use JavaScript to start Workflow
        •  Either fixed assignee or
        •  assignee is property of folder
Life Code Review in IDE


•  JavaScript to start workflow
•  Action Executer
•  Action Handler
•  Event Implementation
Final Demo


•  Configured Simple Workflow
•  Add Rule to kick off Simple Workflow Task
     Workflow
•    Push Document into folder with simple workflow.
     o    Review document status
     o    Search for documents with status
     o    Review task list
           •  Manage tasks
     o    See documents transition through simple workflow by using
          advanced workflows functionality
Resume


•  Actions extend Alfresco
•  Simple workflows can be configured easily
•  Rules are the binding glue
•  Small advanced workflows can be leveraged in
     actions and simple workflows.
•    Your imagination is the border
•    Alfresco OpenSource helps you to code and
     find solutions to your problems.
Resources

•  Training
   o    Alfresco API Development Course (3 days)
   o    Alfresco Workflow Course (2 days)
•  Alfresco (API) Documentation
   o    http://docs.alfresco.com/3.4/index.jsp
•  Wiki Resources
   o    http://wiki.alfresco.com/wiki/Data_Dictionary_Guide
   o    http://wiki.alfresco.com/wiki/Custom_Actions
   o    http://wiki.alfresco.com/wiki/Custom_Action_UI
   o    http://wiki.alfresco.com/wiki/Workflow
   o    http://wiki.alfresco.com/wiki/WorkflowAdministration
•  Books
   o    Alfresco Developer Guide (Packt Publishing)
   o    Professional Alfresco (Wrox Press)
Questions?



Email:       joerg.sauer@averi.de
Twitter:     joergsauer
In Person:   DevCon 2011 London
Have you got your ticket yet?

                 DevCon Americas 2011

      26-27th October at the Hard Rock Hotel, San Diego, CA

       Get some preconference training in on 25th October
         choose from Jump Start or Advanced Alfresco

                          ∞∞∞∞∞∞∞∞∞


              DevCon EMEA & APAC 2011
      9-10th November at Prospero House, Central London, UK

       Get some preconference training in on 8th November
         choose from Jump Start or Advanced Alfresco

More Related Content

What's hot

Alfresco search services: Now and Then
Alfresco search services: Now and ThenAlfresco search services: Now and Then
Alfresco search services: Now and Then
Angel Borroy López
 

What's hot (20)

Alfresco Backup and Disaster Recovery White Paper
Alfresco Backup and Disaster Recovery White PaperAlfresco Backup and Disaster Recovery White Paper
Alfresco Backup and Disaster Recovery White Paper
 
Upgrading to Alfresco 6
Upgrading to Alfresco 6Upgrading to Alfresco 6
Upgrading to Alfresco 6
 
Moving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryMoving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco Repository
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
Alfresco DevCon 2019 - Alfresco Identity Services in Action
Alfresco DevCon 2019 - Alfresco Identity Services in ActionAlfresco DevCon 2019 - Alfresco Identity Services in Action
Alfresco DevCon 2019 - Alfresco Identity Services in Action
 
Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform Training
 
Grafana optimization for Prometheus
Grafana optimization for PrometheusGrafana optimization for Prometheus
Grafana optimization for Prometheus
 
Alfresco search services: Now and Then
Alfresco search services: Now and ThenAlfresco search services: Now and Then
Alfresco search services: Now and Then
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Collaborative Editing Tools for Alfresco
Collaborative Editing Tools for AlfrescoCollaborative Editing Tools for Alfresco
Collaborative Editing Tools for Alfresco
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Introduction à Angular
Introduction à AngularIntroduction à Angular
Introduction à Angular
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring boot
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
 
Alfresco in an hour
Alfresco in an hourAlfresco in an hour
Alfresco in an hour
 
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterpriseHow to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
 
Decoupling your application using Symfony Messenger and events
Decoupling your application using Symfony Messenger and eventsDecoupling your application using Symfony Messenger and events
Decoupling your application using Symfony Messenger and events
 
Scale your Alfresco Solutions
Scale your Alfresco Solutions Scale your Alfresco Solutions
Scale your Alfresco Solutions
 
Container security
Container securityContainer security
Container security
 

Viewers also liked

Alfresco REST API of the future ... is closer than you think
Alfresco REST API of the future ... is closer than you thinkAlfresco REST API of the future ... is closer than you think
Alfresco REST API of the future ... is closer than you think
J V
 

Viewers also liked (16)

Metadata Extraction and Content Transformation
Metadata Extraction and Content TransformationMetadata Extraction and Content Transformation
Metadata Extraction and Content Transformation
 
Alfresco In An Hour - Document Management, Web Content Management, and Collab...
Alfresco In An Hour - Document Management, Web Content Management, and Collab...Alfresco In An Hour - Document Management, Web Content Management, and Collab...
Alfresco In An Hour - Document Management, Web Content Management, and Collab...
 
Alfresco Day Warsaw 2016: Podpis elektroniczny - BMS
Alfresco Day Warsaw 2016: Podpis elektroniczny - BMSAlfresco Day Warsaw 2016: Podpis elektroniczny - BMS
Alfresco Day Warsaw 2016: Podpis elektroniczny - BMS
 
Alfresco Tech Talk Live - REST API of the Future
Alfresco Tech Talk Live - REST API of the Future Alfresco Tech Talk Live - REST API of the Future
Alfresco Tech Talk Live - REST API of the Future
 
Tech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIsTech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIs
 
Alfresco content model
Alfresco content modelAlfresco content model
Alfresco content model
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
 
Alfresco Tech Talk Live #92 - Model Management
Alfresco Tech Talk Live #92 - Model ManagementAlfresco Tech Talk Live #92 - Model Management
Alfresco Tech Talk Live #92 - Model Management
 
Alfresco 4.0 - A Complete Introduction
 Alfresco 4.0 - A Complete Introduction Alfresco 4.0 - A Complete Introduction
Alfresco 4.0 - A Complete Introduction
 
Alfresco tuning part2
Alfresco tuning part2Alfresco tuning part2
Alfresco tuning part2
 
Really Simple Document Management with Alfresco
Really Simple Document Management with AlfrescoReally Simple Document Management with Alfresco
Really Simple Document Management with Alfresco
 
Alfresco REST API of the future ... is closer than you think
Alfresco REST API of the future ... is closer than you thinkAlfresco REST API of the future ... is closer than you think
Alfresco REST API of the future ... is closer than you think
 
Getting Started with CMIS
Getting Started with CMISGetting Started with CMIS
Getting Started with CMIS
 
Intro To Alfresco Part 1
Intro To Alfresco Part 1Intro To Alfresco Part 1
Intro To Alfresco Part 1
 
Sii prezentacja PL
Sii prezentacja PLSii prezentacja PL
Sii prezentacja PL
 
Alfresco 5.0 features
Alfresco 5.0 featuresAlfresco 5.0 features
Alfresco 5.0 features
 

Similar to Actions rules and workflow in alfresco

Similar to Actions rules and workflow in alfresco (20)

The Learning Pathway: Actions, Rules and Simple and Advanced Workflow Integra...
The Learning Pathway: Actions, Rules and Simple and Advanced Workflow Integra...The Learning Pathway: Actions, Rules and Simple and Advanced Workflow Integra...
The Learning Pathway: Actions, Rules and Simple and Advanced Workflow Integra...
 
Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012
 
Introducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes OperatorIntroducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes Operator
 
Build, Test and Extend Integrated Workflows 3.7
Build, Test and Extend Integrated Workflows 3.7Build, Test and Extend Integrated Workflows 3.7
Build, Test and Extend Integrated Workflows 3.7
 
BPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to ActivitiBPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to Activiti
 
Cucumber Tool
Cucumber ToolCucumber Tool
Cucumber Tool
 
Si fa presto a dire serverless
Si fa presto a dire serverlessSi fa presto a dire serverless
Si fa presto a dire serverless
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Scaling Kanban in the Enterprise with GreenHopper
Scaling Kanban in the Enterprise with GreenHopperScaling Kanban in the Enterprise with GreenHopper
Scaling Kanban in the Enterprise with GreenHopper
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
Hybernat and structs, spring classes in mumbai
Hybernat and structs, spring classes in mumbaiHybernat and structs, spring classes in mumbai
Hybernat and structs, spring classes in mumbai
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Using The Right Tool For The Job
Using The Right Tool For The JobUsing The Right Tool For The Job
Using The Right Tool For The Job
 
Advantages of Rails Framework
Advantages of Rails FrameworkAdvantages of Rails Framework
Advantages of Rails Framework
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
APEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfAPEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdf
 
Spring Roo Add-On Development & Distribution
Spring Roo Add-On Development & DistributionSpring Roo Add-On Development & Distribution
Spring Roo Add-On Development & Distribution
 
Alfresco tech talk live share extensibility metadata and actions for 4.1
Alfresco tech talk live share extensibility metadata and actions for 4.1Alfresco tech talk live share extensibility metadata and actions for 4.1
Alfresco tech talk live share extensibility metadata and actions for 4.1
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 

More from Alfresco Software

More from Alfresco Software (20)

Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossier
 
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management application
 
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
 
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
 
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of Alfresco
 
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
 
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
 
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
 
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
 
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest API
 
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
 
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
 
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
 
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
 
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
 
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
 
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
 
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
 
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
 
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 

Actions rules and workflow in alfresco

  • 1. The Learning Pathway Actions Rules and Simple and Advanced Workflow Integration Use Cases Jörg Sauer
  • 2. The longest title ever •  Actions, Rules and Simple and Advanced Workflow Integration Use Cases is about o  Actions to extend Alfresco functionality o  Rules to automate execution of Actions o  Use Simple Workflows to implement a Workflow without coding •  Add Rules to run certain Actions in Workflow steps •  Use a simple Advanced Workflow to leverage Tasks in Simple Workflows
  • 3. Basic Example to be extended •  Review Publish Workflow with 2 phase approval review approve publish 1 Drafts reject 2 Review 3 Approve 4 Published reject
  • 4. Simple Workflow review approve publish 1 Drafts reject 2 Review 3 Approve 4 Published reject •  Pros: o  User can build workflow o  Easy to understand •  Cons: o  No State: Implicit state by location (folder) o  No Task: Implicit task by folder access o  No branching: Serial workflow only
  • 6. Adding Status •  Content Model: o  Provide custom Aspect to hold workflow status
  • 7. Amend Workflow with status •  Set Status on each workflow folder o  Add Aspect: Workflow Status o  Set workflow status accordingly reject review approve publish 1 Drafts reject 2 Review 3 Approve 4 Published • Status: draft • Status: under review • Status: pend. approval • Status: published
  • 9. Transfer Status to incoming documents •  JavaScript to copy status •  Execute by Rule
  • 11. Alfresco Repository Actions •  Action: Unit of work that is performed against a node •  Examples: o  Move node o  Transform content of node o  Send email •  Out of the Box Actions •  Custom Actions o  Implement own Action class o  Deploy in Application Context
  • 12. Implement Copy Workflow Status Action
  • 13. Deploy Action (Application Context) •  Beans: webinar-action-context.xml •  Labels: webinar-action.properties
  • 14. Simple Workflow: Implementation Details •  Documents amended with properties for o  Approve step label, copy/move, destination o  Reject step label, copy/move, destination (all optional)
  • 15. Intention: Create User Task o  Every time simple workflow is assigned, create advanced workflow task for specific user. o  User can •  access task in task list •  see task description •  access attached document •  approve or reject directly from within task o  Advantage •  No notification emails •  No need to check simple workflow folders
  • 16. Simple Workflow Task Architecture •  Required: o  Custom aspect for task description. (attached to simple workflow folder) o  Advanced workflow to be started by rule •  Configure user •  Provide task •  Implement simple workflow actions for –  Approve –  Reject o  Bug Fix for Alfresco StartWorkflowActionExecuter o  UI for Rule Config
  • 18. Simple Workflow Task Advanced Workflow
  • 19. Content Model for Workflow •  Aspects: o  simpleWorflow: Manage Action Labels •  Content Types: o  simpleWfTaskStart: Properties for Start Task •  Assignee •  Task Description •  Simple Workflow Approve & Reject Action Labels •  All above become process variables! o  ApprovalOnlyTask: Task properties to approve document o  ApproveOrRejectTask: Properties for approving or rejecting the document •  Simplicity: all in sample model •  Best practice: own workflow model
  • 21. Simple Process Definition •  Create Process Definition o  Graphically o  Change root tag: o  Add Swimlanes o  Add tasks to task node, will render UI
  • 22. Workflow Deployment •  Attention: No actions implemented yet! •  But want to check if model is correct & workflow deploys •  Context file: •  Redeploy off on production systems!
  • 23. Workflow Actions •  User decides in task to o  Approve o  Reject •  Workflow will transition to nodes o  approveDocument: code will approve simple workflow o  rejectDocument: code will reject simple workflow •  Todo: Implement Event Handler o  for node-enter event (approve / reject)
  • 24. Code (sneaking) •  UI has actions for approve/reject •  Look for action definition in web-client- config-actions.xml •  Sample implementation can be found in DocumentDetailsDialog.approve() / reject() methods! •  OpenSource Rules!
  • 25. Review Alfresco implementation •  DocumentDetailsDialog.approve()
  • 26. Direct Code reuse •  Problem: o  From Package org.alfresco.web.bean o  Workflow Event not within web context. o  DocNode not core object •  Solution: o  Reprogram but use native Foundation Services API o  Should be fool proof ;-)
  • 27. Lets get the event •  Define in Process Definition •  Derive from JBPMSpringActionHandler
  • 28. What to Implement Where •  initializeHandler(): o  Get all services needed from the factory •  ServiceRegistry (in case you need something) •  NodeService to deal with the node •  CopyService to copy/move the document •  execute(): o  Get the process variables through executionContext o  Implement the approve / reject action
  • 29. Hiding Reject Transition if Not Set •  Hide reject transition accordingly o  task-assign event (has to be this event!) o  use bpm:hiddenTransitions (bpm_hiddenTransitions)
  • 30. Testing First Version •  Redeploy •  Manually start Simple Workflow Task workflow •  Fill in all details in the start form •  Test both scenarios: o  Approval only (reject transition hidden?) o  Approve or Reject •  Task should show up in task list •  Open Task and pick Action •  Check if document has been moved / copied according to Simple Workflow configuration.
  • 31. What’s Missing •  Action to start Simple Workflow Task Workflow o  Repository Action •  UI to fill in Assignee in Rules Configuration o  Action Handler •  Simple approach: o  Use JavaScript to start Workflow •  Either fixed assignee or •  assignee is property of folder
  • 32. Life Code Review in IDE •  JavaScript to start workflow •  Action Executer •  Action Handler •  Event Implementation
  • 33. Final Demo •  Configured Simple Workflow •  Add Rule to kick off Simple Workflow Task Workflow •  Push Document into folder with simple workflow. o  Review document status o  Search for documents with status o  Review task list •  Manage tasks o  See documents transition through simple workflow by using advanced workflows functionality
  • 34. Resume •  Actions extend Alfresco •  Simple workflows can be configured easily •  Rules are the binding glue •  Small advanced workflows can be leveraged in actions and simple workflows. •  Your imagination is the border •  Alfresco OpenSource helps you to code and find solutions to your problems.
  • 35. Resources •  Training o  Alfresco API Development Course (3 days) o  Alfresco Workflow Course (2 days) •  Alfresco (API) Documentation o  http://docs.alfresco.com/3.4/index.jsp •  Wiki Resources o  http://wiki.alfresco.com/wiki/Data_Dictionary_Guide o  http://wiki.alfresco.com/wiki/Custom_Actions o  http://wiki.alfresco.com/wiki/Custom_Action_UI o  http://wiki.alfresco.com/wiki/Workflow o  http://wiki.alfresco.com/wiki/WorkflowAdministration •  Books o  Alfresco Developer Guide (Packt Publishing) o  Professional Alfresco (Wrox Press)
  • 36. Questions? Email: joerg.sauer@averi.de Twitter: joergsauer In Person: DevCon 2011 London
  • 37. Have you got your ticket yet? DevCon Americas 2011 26-27th October at the Hard Rock Hotel, San Diego, CA Get some preconference training in on 25th October choose from Jump Start or Advanced Alfresco ∞∞∞∞∞∞∞∞∞ DevCon EMEA & APAC 2011 9-10th November at Prospero House, Central London, UK Get some preconference training in on 8th November choose from Jump Start or Advanced Alfresco