Tuesday, July 29, 2014

Alfresco 5.0 Community edition features:


Its very exciting to learn that Alfresco made a big leap by releasing 5.0 community edition :) :) The Enterprise edition may be out in another two months!!!  Below are the key features that I learnt from Alfresco personnel through their posts:

1. Filtered search is available. Now we can search any word or title from the entire system just by searching in the search bar. Oh wait!!! we did already have a search feature in Alfresco 4 editions.. Isn't it?Yep we do have.. This new feature enables us to look for documents along with the filters. It really makes easy for the users to apply multiple filters and look for a more specific search results.


2. Instant Search Results feature (Live Search) provide near real-time search results for Documents, Sites and People immediately as the user is typing in the search box. This is a great interactive way to explore search results and find items from any screen in Share.


3. Alfresco Share has a good preview feature to view various types of documents. However, for more complex document types, it required the 3rd party Flash plugin. To overcome this, a pure HTML5 based document previewer has been added which provides better browser support, faster performance and no reliance on 3rd party plugins.

Below are the notable changes in the previewer:

1. Multiple pages can be displayed on screen
2. Mini summary view
3. Search button
4. Link button
5. Download button





4.The inline HTML editor used to edit .html content, comments, wiki, blog and discussion pages in Alfresco has been upgraded to TinyMCE4. This provides a more modern looking editing experience with various minor improvements. TinyMCE4 features an improved interface and a nice full screen editing mode.


5. The new Sites Manager feature in Share Admin Tools enables an Administrator to control access and delete sites from a single admin screen.


These are the notable changes in Alfresco 5.0 Community edition apart from the cool looking UI... Hope to see many more such wonderful features from Alfresco!!!




Wednesday, July 23, 2014

Acceptance Test Driven Development

ATDD is a social form of software development which requires members of a development team (including testers, developers and users) to fully understand the acceptance criteria that have to be fulfilled by the system early on in the development process.



This ensures that all stakeholders understand the main objectives of each requirement in terms of the functionality it provides to the end-user. The acceptance criteria are often developed from a user’s perspective and in this case user personas and user stories can come in handy.
In ATDD, acceptance criteria for each requirement are written before coding starts. These criteria are best described by business representatives such as the requirements analyst.
When the acceptance criteria are developed and run on the system, any failures are noted and the developers refactor those components by adding the minimum code needed to help them pass the test at the next attempt.
This process is carried out iteratively, usually at the end of each sprint, until the final product is ready for deployment.
As you can see, ATDD is practically identical to TDD in the later stages, the main difference being that the actual testing is preceded by a joint effort between different team members to mutually agree upon the acceptance criteria to be fulfilled.
This gives further direction to the team and helps them keep in mind the bigger picture that is the ultimate purpose of the finished product, rather than be absorbed in the nitty-gritty of code tweaking.
The motto for ATDD would be: Show me where I need to be and I’ll get there eventually.

Monday, July 14, 2014

jBPM and Activiti- An Analysis

Business Process Management is an essential part of every web application. These web applications can be anything like Portal, CMS, CRM or ERP. In the open source world, organizations are mostly selecting either Activiti BPM or jBPM. Here are the glimpse of features and comparison.

Let us start with Google trends, which show us popularity of both the products. jBoss jBPM is one of the oldest product available in the market while Activiti BPM has launched somewhere in the year 2010. However, if we can look at below chart, we can see that the interests of people change from time to time. 



As per Google Trends


jBoss jBPM is one of the popular BPM 2.0 tool in its category. While on other side, Activiti BPM Engine is one such light weight and easy to use for Java developers. In that respect, both have a stiff competition on its success. The success claim comes with big difference between Activiti BPM and jBoss jBPM will not be in the process engine, but which will be the more sophisticated tool that we'll be able to build on top. Activiti is new but on its track to attract market and on path to success as jBPM did once upon a time.

jBPM 6

jBPM 6 is the latest community version of the jBPM project.  It is based on the BPMN 2.0 specification and supports the entire life cycle of the business process (from authoring through execution to monitoring and management).
It offers open-source business process execution and management, including
  • Embeddable, lightweight Java process engine, supporting native BPMN 2.0 execution
  • human interaction using an independent WS-HT task service
  • BPMN 2.0 process modeling in Eclipse (developers) and the web (business users)
  • web tooling to model, deploy, execute and monitor your processes, including for example a data and form modeler, simulation, deployment, task lists, etc.
  • web-based business activity monitoring and reporting that allows you to define your own reports
  • managing and deploying your processes using technologies underneath like Git and Maven
  • an execution server that you can remotely connect to (REST, JMS) and can be deployed in a clustered environment for load balancing and high availability
  • tight, powerful integration with business rules and event processing

Activiti

Activiti 5.15.0 is the latest community version of the Activiti project. It's a Java process engine that runs BPMN 2 processes natively.  It will have the following key properties:
  • Allows user updates to be combined with process updates in a single transaction
  • Runs on any Java environment like Spring, JTA, standalone with any form of transaction demarcation.
  • Easy to get up and running with the setup utility
  • Built to support the cloud scalability from the ground up
  • Very simple to add new custom activity types and complete dedicated process languages
  • Rock solid
  • Extremely fast
  • Transactional timers
  • Asynchronous continuations
  • Hidden event listeners for decoupling software technical details from business level diagram
  • Ability to test process executions in isolation in a plain unit test
I have referred few articles and given below are the differences between jBPM and Activiti:
  
Description
Activiti
jBPM
Community members
Activiti has a base team consisting of
Alfresco employees. In addition,
companies like SpringSource,
FuseSource and MuleSoft provide
resources on specific components. And of course, there are individual open source developers committing to the Activiti project.

jBPM has a base team of JBoss
employees. In addition there are individual committers.
Spring support
Activiti has native Spring support, which makes it very easy use Spring beans in your processes and use Spring for JPA and transaction management.

jBPM has no native Spring
support, but you can use Spring
with additional development effort.
Business rules support
Activiti provides a basic integration with the Drools rule engine to support the BPMN 2.0 business rule task.
jBPM and Drools are integrated on a project level and therefore there’s native integration with Drools on various levels.

Additional tools
Activiti provides a modeler (Oryx) and designer (Eclipse) tool to model new process definitions. But the main differentiator is the Activiti Explorer, which provides an easy-to-use web interface to start new processes, work with tasks and forms and manage the running processes. In addition it provides ad-hoc task support and collaboration functionality.

jBPM also provides a modeler
based on the Oryx project and a Eclipse designer. With a web
application you can start new
process instances and work with tasks. The form support is
limited
Project
Activiti has a strong developer and user community with a solid release schedule of 2 months. Its main components are the Engine, Designer, Explorer and REST application
jBPM has a strong developer and user community. The release schedule is not crystal clear and  some releases have been postponed a couple of times. The Designer application is (at the moment of writing) still based on Drools Flow and the promised new Eclipse plug-in keeps getting postponed


Conclusion:


From the above comparison, You can choose jBPM or Activiti, both will teach you and let you implement the BPM discipline main stages. Both are Open Source and ASL licensed.


Monday, July 7, 2014

Alfresco Activiti Workflows


Introduction to Workflows
The automation of a business process, in whole or part, during which documents, information or tasks are passed from one participant to another for action, according to a set of procedural rules.
Examples:
•   When you submit an insurance claim, you are initiating a workflow.
•   When you check on the status of your loan application, you are asking for metadata    about a running workflow.
   When you give the final approval for a piece of web content to be published, it is likely you are completing a workflow. 

Real-time results:

The Toyota car company adopted Ford’s assembly line in the 1950s to develop their own production system. Over the following years, the benefits of their system resulted in:
•   Productivity increases between 300% to 400%.
•   Labour productivity increased an average of 25% a year.
•   Defect rates reduced from over 2000 to less than 50 parts per million, and in many  to less than 10 parts per million.
•   Cost of quality cut by over 60%.
•   Work-in-process inventory cut by more than 80%.

Why Workflows?!



What is Alfresco Activiti?

  • Activiti is an open source, standalone workflow engine supported by Alfresco.
  • Another advantage is that Activiti can be used anywhere, any project!!!
  • Some popular workflow engines are- Orchestra, jBPM
  • All it needs Java !
  • Developing Alfresco Activiti workflow                                                                   – Eclipse Activiti plugin                                                                                         – Alfresco Activiti web editor (http://activiti.alfresco.com)

Why two workflow engines in Alfresco?! 
    Starting with Alfresco 4, Alfresco has two embedded Advanced Workflow engines to choose from: JBoss jBPM and Activiti.
     The JBoss jBPM engine is the original Advanced Workflow engine included with Alfresco. Desiring to have an Apache-licensed workflow engine, Alfresco hired jBPM creator, Tom Baeyens, and some of his team to start a new open source project aimed at building an Apache-licensed, BPMN 2.0 compliant workflow engine. The result is Activiti.
     Both jBPM and Activiti are open source and both can be used as standalone workflow engines in solutions completely unrelated to Alfresco and document management.

Types of Alfresco Workflows
  •     Alfresco basic workflows
  •     Alfresco advanced workflows

Alfresco Basic Workflow
  •      Are configurable by non-technical end-users
  •      Leverage rules, folders, and actions

Below is the typical basic workflow

                  

Assigning the user for user task


Another example:


Alfresco Advanced Workflow
  •      Are defined by business analysts and developers using a graphic tool or by writing xml.
  •       Leverage rules, folders, and actions
Below is the sample advanced workflow created by OMG:


Steps to deploy the activiti workflow:


 Below are the steps to deploy the workflow process created by Alfresco Editor:
1. Once the workflow is created, save it.
2. No error message is thrown if the created workflow is the correct one.
3. Export the workflow as xml file with the extension--> .bpmn20.xml
4. Note down the process id from the xml
5. Navigate to the shareconfig.xml file and rename the below:
     config condition= activiti$<Process-ID>
6. Restart the Tomcat server
7. Login to Activiti Explorer:
   localhost:8080/alfresco/activiti-admin
8. Upload the xml file that was created.


9. If the xml is uploaded without any error, it is clear that the file does not contain any faults in it.
10. Login to Alfresco Share
11. In the user dashboard, click on 'Start Workflow' from the 'My Tasks' dashlet

12. The page is navigated to Start Workflow.
13. From the dropdown list, select the workflow that we deployed.
14. The page is loaded with the workflow details.

BPMN


Introduction:

Business Process Model and Notation (BPMN) is a standard for business process modeling that provides a graphical notation for specifying business processes in a Business Process Diagram (BPD), based on a flowcharting technique.The objective of BPMN is to support business process management, for both technical users and business users, by providing a notation that is intuitive to business users, yet able to represent complex process semantics.

The primary goal of BPMN is to provide a standard notation readily understandable by all business stakeholders. These include the business analysts who create and refine the processes, the technical developers responsible for implementing them, and the business managers who monitor and manage them. Consequently, BPMN serves as a common language, bridging the communication gap that frequently occurs between business process design and implementation.


Elements of BPMN

  • Flow Objects
  • Connecting Objetcs
  • Swim Lanes
  • Artifacts

Flow Objects:
  • Events
  • Activities
  • Gateways
  • Connections
   Events
An Event is represented with a circle and denotes something that happens. Icons within the circle denote the type of event (e.g., an envelope representing a message, or a clock representing time).  Events are also classified as Catching (for example, if catching an incoming message starts a process) or Throwing (such as throwing a completion message when a process ends).
Start event
Acts as a process trigger; indicated by a single narrow border, and can only be Catch, so is shown with an open (outline) icon.
Intermediate event
Represents something that happens between the start and end events; is indicated by a double border, and can Throw or Catch (using solid or open icons as appropriate). For example, a task could flow to an event that throws a message across to another pool, where a subsequent event waits to catch the response before continuing.
End event
Represents the result of a process; indicated by a single thick or bold border, and can only Throw, so is shown with a solid icon.
   Activity
An activity is represented with a rounded-corner rectangle and describes the kind of work which must be done.



Task
A task represents a single unit of work that is not or cannot be broken down to a further level of business process detail without diagramming the steps in a procedure.
Sub-process
Used to hide or reveal additional levels of business process detail. When collapsed, a sub-process is indicated by a plus sign against the bottom line of the rectangle; when expanded, the rounded rectangle expands to show all flow objects, connecting objects, and artifacts.
Has its own self-contained start and end events; sequence flows from the parent process must not cross the boundary.
Transaction
A form of sub-process in which all contained activities must be treated as a whole; i.e., they must all be completed to meet an objective, and if any one of them fails, they must all be compensated (undone). Transactions are differentiated from expanded sub-processes by being surrounded by a double border.
Call Activity
A point in the process where a global process or a global Task is reused. A call activity is differentiated from other activity types by a bolded border around the activity area.

Gateway
A gateway is represented with a diamond shape and determines forking and merging of paths, depending on the conditions expressed.

Exclusive gateways

Exclusive gateway is a diversion point of a business process flow. For a given instance of the process, there is only one of the paths can be taken. See below business process diagram. If the order amount is greater than 1,000, we will request deposit from customer. If the order amount is 1,000 or less, we will deliver goods directly. There is only two possible path of the business process and these two possible paths will only execute one but not both
The suggested modeling of gateways is state the checking (question) in the gateway (diamond shape) and state the condition in the sequence flow. When the business process is executed (either by manual process or with automatic process), the condition will evaluate one by one and once the first condition is fulfilled, we still trigger the connected activity and stop evaluate other condition.
Inclusive gateways
Inclusive gateway is also a division point of the business process. Unlike the exclusive gateway, inclusive gateway may trigger more than 1 out-going paths. Since inclusive gateway may trigger more than 1 out-going paths, the condition checking process will have a little bit different then the exclusive gateway. All out-going conditions will be evaluated no matter has fulfilled out-going flow or not. Below business process diagram show a typical inclusive gateway usage.
Following are all possible paths of the business process
  1. Ship all goods by air
  2. Ship all goods by sea
  3. Ship some goods by air and others by sea.

Event-Based Gateway

Event-Based Gateway is similar to exclusive gateway but the trigger of gateway is base on event occur instead of evaluate condition. We can imagine when our process arrived to event-based gateway, we will wait until something is happen. The event usually trigged by third party (e.g. our customer send payment to us). Below is typical event-based gateway. We send a quotation to customer and waiting for customer to confirm the order. If customer sends confirmation, we will prepare goods for customer. If we don’t receive any confirmation from customer after 15 days, we will send reminder to customer.


           
        Parallel Gateway
           A parallel gateway is used to visualize concurrent execution of activities. When the process arrive to parallel gateway node, the work will split into multiple token and will merge when reach to the joining parallel gateway. Bellow is the typical example of parallel gateway.