Activiti 5.16.4 Workflow Engine User Guide
Total Page:16
File Type:pdf, Size:1020Kb
Activiti 5.16.4 User Guide Table of Contents 1. Introduction License Download Sources Required software JDK 6+ Eclipse Indigo and Juno Reporting problems Experimental features Internal implementation classes 2. Getting Started One minute version Activiti setup Activiti database setup Include the Activiti jar and its dependencies Next steps 3. Configuration Creating a ProcessEngine ProcessEngineConfiguration bean Database configuration JNDI Datasource Configuration Usage Configuration Supported databases Creating the database tables Database table names explained Database upgrade Job executor activation Mail server configuration History configuration Exposing configuration beans in expressions and scripts Deployment cache configuration Logging Mapped Diagnostic Contexts Event handlers Event listener implementation Configuration and setup Adding listeners at runtime Adding listeners to process definitions Dispatching events through API Supported event types Additional remarks 4. The Activiti API The Process Engine API and services Exception strategy Working with the Activiti services Deploying the process Starting a process instance Completing tasks Suspending and activating a process Further reading Query API Expressions Unit testing Debugging unit tests The process engine in a web application 5. Spring integration ProcessEngineFactoryBean Transactions Expressions Automatic resource deployment Unit testing Annotation-based configuration JPA with Hibernate 4.2.x 6. Deployment Business archives Deploying programmatically Deploying with Activiti Explorer External resources Java classes Using Spring beans from a process Creating a single app Versioning of process definitions Providing a process diagram Generating a process diagram Category 7. BPMN 2.0 Introduction What is BPMN? Defining a process Getting started: 10 minute tutorial Prerequisites Goal Use case Process diagram XML representation Starting a process instance Task lists Claiming the task Completing the task Ending the process Code overview Future enhancements 8. BPMN 2.0 Constructs Custom extensions Events Event Definitions Timer Event Definitions Error Event Definitions Signal Event Definitions Message Event Definitions Start Events None Start Event Timer Start Event Message Start Event Signal Start Event Error Start Event End Events None End Event Error End Event Cancel End Event Boundary Events Timer Boundary Event Error Boundary Event Signal Boundary Event Message Boundary Event Cancel Boundary Event Compensation Boundary Event Intermediate Catching Events Timer Intermediate Catching Event Signal Intermediate Catching Event Message Intermediate Catching Event Intermediate Throwing Event Intermediate Throwing None Event Signal Intermediate Throwing Event Compensation Intermediate Throwing Event Sequence Flow Description Graphical notation XML representation Conditional sequence flow Default sequence flow Gateways Exclusive Gateway Parallel Gateway Inclusive Gateway Event-based Gateway Tasks User Task Script Task Java Service Task Web Service Task Business Rule Task Email Task Mule Task Camel Task Manual Task Java Receive Task Shell Task Execution listener Task listener Multi-instance (for each) Compensation Handlers Sub-Processes and Call Activities Sub-Process Event Sub-Process Transaction subprocess Call activity (subprocess) Transactions and Concurrency Asynchronous Continuations Fail Retry Exclusive Jobs Process Initiation Authorization Data objects 9. Forms Form properties External form rendering 10. JPA Requirements Configuration Usage Simple Example Query JPA process variables Advanced example using Spring beans and JPA 11. History Querying history HistoricProcessInstanceQuery HistoricVariableInstanceQuery HistoricActivityInstanceQuery HistoricDetailQuery HistoricTaskInstanceQuery History configuration History for audit purposes 12. Eclipse Designer Installation Activiti Designer editor features Activiti Designer BPMN features Activiti Designer deployment features Extending Activiti Designer Customizing the palette Validating diagrams and exporting to custom output formats 13. Activiti Explorer Process diagram Tasks Start process instances My instances Administration Reporting Report data JSON Example process Report start forms Example processes Changing the database 14. Activiti Modeler Model editing Importing existing models Convert deployed definitions to a editeable model Export model to BPMN XML Deploy model to the Activiti Engine 15. REST API General Activiti REST principles Installation and Authentication Deployment Process Definitions Models Process Instances Executions Tasks History Forms Database tables Engine Runtime Jobs Users Groups 16. CDI integration Setting up activiti-cdi Looking up a Process Engine Configuring the Process Engine Deploying Processes Contextual Process Execution with CDI Associating a Conversation with a Process Instance Declaratively controlling the Process Referencing Beans from the Process Working with @BusinessProcessScoped beans Injecting Process Variables Receiving Process Events Additional Features Known Limitations 17. LDAP integration Usage Use cases Configuration Properties Integrate LDAP in Explorer 18. Advanced Hooking into process parsing UUID id generator for high concurrency Multitenancy Execute custom SQL Advanced Process Engine configuration with a ProcessEngineConfigurator Advanced query API: seamless switching between runtime and historic task querying Custom identity management by overriding standard SessionFactory Enable safe BPMN 2.0 xml Event logging (Experimental) 19. Simulation with Activiti-Crystalball (Experimental) Introduction Short overview CrystalBall is unique CrystalBall inside History analysis Events from the history. PlayBack Process engine debugger Replay List of Tables 2.1. The demo users 2.2. The webapp tools 3.1. Supported databases 3.2. Supported events 6.1. 6.2. 6.3. 8.1. Mail server configuration 8.2. Mail task configuration 8.3. Mule server configuration 8.4. Endpoint URL parts: 8.5. Existing camel behaviours: 8.6. Existing camel behaviours: 8.7. Shell task parameter configuration 15.1. HTTP-methods and corresponding operations 15.2. HTTP-methods response codes 15.3. URL query parameter types 15.4. JSON parameter types 15.5. Variable query JSON parameters 15.6. Variable query JSON parameters 15.7. Default query JSON types 15.8. Variable JSON attributes 15.9. Variable Types 15.10. URL query parameters 15.11. REST Response codes 15.12. Get a deployment - URL parameters 15.13. Get a deployment - Response codes 15.14. Create a new deployment - Response codes 15.15. Delete a deployment - URL parameters 15.16. Delete a deployment - Response codes 15.17. List resources in a deployment - URL parameters 15.18. List resources in a deployment - Response codes 15.19. Get a deployment resource - URL parameters 15.20. Get a deployment resource - Response codes 15.21. Get a deployment resource content - URL parameters 15.22. Get a deployment resource content - Response codes 15.23. List of process definitions - URL parameters 15.24. List of process definitions - Response codes 15.25. Get a process definition - URL parameters 15.26. Get a process definition - Response codes 15.27. Update category for a process definition - Response codes 15.28. Get a process definition resource content - URL parameters 15.29. Get a process definition BPMN model - URL parameters 15.30. Get a process definition BPMN model - Response codes 15.31. Suspend a process definition - JSON Body parameters 15.32. Suspend a process definition - Response codes 15.33. Activate a process definition - Response codes 15.34. Get all candidate starters for a process-definition - URL parameters 15.35. Get all candidate starters for a process-definition - Response codes 15.36. Add a candidate starter to a process definition - URL parameters 15.37. Add a candidate starter to a process definition - Response codes 15.38. Delete a candidate starter from a process definition - URL parameters 15.39. Delete a candidate starter from a process definition - Response codes 15.40. Get a candidate starter from a process definition - URL parameters 15.41. Get a candidate starter from a process definition - Response codes 15.42. Get a list of models - URL query parameters 15.43. Get a list of models - Response codes 15.44. Get a model - URL parameters 15.45. Get a model - Response codes 15.46. Update a model - Response codes 15.47. Create a model - Response codes 15.48. Delete a model - URL parameters 15.49. Delete a model - Response codes 15.50. Get the editor source for a model - URL parameters 15.51. Get the editor source for a model - Response codes 15.52. Set the editor source for a model - URL parameters 15.53. Set the editor source for a model - Response codes 15.54. Get the extra editor source for a model - URL parameters 15.55. Get the extra editor source for a model - Response codes 15.56. Set the extra editor source for a model - URL parameters 15.57. Set the extra editor source for a model - Response codes 15.58. Get a process instance - URL parameters 15.59. Get a process instance - Response codes 15.60. Delete a process instance - URL parameters 15.61. Delete a process instance - Response codes 15.62. Activate or suspend a process instance - URL parameters 15.63. Activate or suspend a process instance - Response codes 15.64. Start a process instance - Response codes 15.65. List of process instances - URL query parameters 15.66. List of process instances - Response codes 15.67. Query process instances - Response codes 15.68. Get diagram