How ProcessMaker Uses the Zimbra API to Add Enterprise Class Workflow Functionality to Zimbra

By | August 9, 2013

Zimbra’s extensibility opens up opportunities for the community to build enhancements to its core functionality and bring new, custom features to Zimbra users. One of our latest examples comes to us from ProcessMaker. Take a look at how it uses the Zimbra API to add enterprise workflow to Zimbra.

ProcessMaker is a leading open source workflow and business process management software suite that allows users to design and automate form based approval driven business processes across the organization. The ProcessMaker Zimlet allows enterprises to solve their main communications needs in a single interface: email, calendaring, tasking, document manage and now…workflow.

How We Created our Zimlet

Our first step in creating the integration was to determine which of ProcessMaker’s three integration methods was most suitable for this type of extension. These include:

  • Triggers: Light integrations where we apply another system’s API to create predefined Triggers, or pieces of PHP code inserted into processes within ProcessMaker (this integration works only in the backend)
  • Extensions: Deeper integrations that incorporate more elements in both the backend and the frontend, such as Custom Menus and External Steps
  • Third Party Extensions: Integrations with ProcessMaker using our Webservices API, allowing any software to use our platform to execute multiple actions within processes and cases

Since our objective was to create an extension within Zimbra, we developed a Third Party Extension using a SOAP object pointing to ProcessMaker Webservices. Using JavaScript to create the architecture for the extension, we were able to conveniently register different methods within this architecture thanks to Zimbra’s API.

Thus, using the functions that Zimbra provides, we registered the application as a tab, and created and registered a Tree menu with ProcessMaker options:

com_processmaker_zimbra_overviewtree_app.prototype.init=function() {
              if(window.console){
               console.info(“********** ProcessMaker Zimlet Started (“+this.getServerHost()+”) **********”);
                            }

this.XMLNS = “http://processmaker.com”;
ApplicationName1 = this.createApp(‘ProcessMaker’, ‘PM-panelIcon’, ‘ProcessMaker’);
};


How the Zimlet Works

We’ve worked to make the ProcessMaker Zimlet simple to install and set up. Under the “Setup” tab, the user completes the one-time configuration of the Zimlet; during the first launch, users are prompted to configure their connection to their ProcessMaker Server, retaining their username, password, selected language and workspace. The Zimlet then uses this configuration to connect to their usual ProcessMaker session within the Zimbra interface, without ever being required to input a password again. The Zimlet is also available in several languages, including English, Spanish, French, Italian, and Chinese among others.

zimbra blog1

The Zimlet provides embedded ProcessMaker functionality within Zimbra, allowing users to access the ProcessMaker Workflow Software through their Zimbra email interface. Enabling users to manage and run their business processes directly from their Zimbra inbox provides convenience, practicality, and above all, enhanced efficiency.

zimbra blog2

ProcessMaker also has web service connections to the Zimbra Calendar, tasks, and even briefcase to enable ProcessMaker workflows to interact with Zimbra through each of these services.  So if your workflow needs to create an event or a task, or even upload a file, all of this can now interact directly with Zimbra.

Understanding the Code

To illustrate the code that the Zimlet uses, we will review how the Zimlet consumes ProcessMaker Webservices. For more information on the methods included in our webservices, please refer to our ProcessMaker Wiki Guide.

A basic method “makeEnvelope” is used within several other methods to get access to ProcessMaker via SOAP calls:

com_processmaker_zimbra_overviewtree_app.prototype._makeEnvelope=function(method){
var soap = AjxSoapDoc.create(method, this.XMLNS, null,“http://schemas.xmlsoap.org/soap/envelope/”);
var envEl = soap.getDoc().firstChild;
envEl.setAttribute(“xmlns:xsi”, “http://www.w3.org/2001/XMLSchema-instance”);
envEl.setAttribute(“xmlns:xsd”, “http://www.w3.org/2001/XMLSchema”);
if (this.sessionId) {
              var header = soap.ensureHeader();
              var sessionEl = soap.getDoc().createElement(“SessionHeader”);
              header.appendChild(sessionEl);
              sessionEl.setAttribute(“xmlns:ns1″,this.XMLNS);
       soap.set(“sessionId”,this.sessionId, sessionEl);
       }
       return soap;
};

How Customers use the ProcessMaker Zimlet

Large organizations (several hundred users upwards to thousands of users) have significant workflow needs.  Organizations want to be sure that their key processes are being performed the same way every time in order to deliver consistent and measurable results. 

Common use cases for ProcessMaker include automating workflows in every area of the enterprise. Here are some examples of our most common use cases:

Human Resources: Leave requests, Employee onboarding, Employee Hiring Requests

Finance: Expense Reports, Purchase Requests, Invoice Approval, Contract Approval and Onboarding, Credit Requests

Operations and Engineering: New Product Development Request, Engineering Change Request, Help Desk, Access Authorization Requests

Sales and Marketing: Marketing Funds Usage Request, New Client Onboarding, Special Pricing Requests


Comments

  • For those interested in more information, ProcessMaker is hosting a free webinar on Process-Maker-Zimbra integration, next Tuesday 27 August 10AM New York time. Free registration is here: https://www4.gotomeeting.com/register/874758695

    Here is the webinar description:

    “The leading open source workflow software suite ProcessMaker has an integration with Zimbra Messaging Suite which brings a powerful workflow zimlet and BPM zimlet inside Zimbra. With this integration, you are able to use Zimbra not only to write and send emails, but also to use a workflow Zimlet in which enterprise messaging suite users can launch a leave absence request, expense report, purchase request, or invoice approval directly from within Zimbra.”

    Commented on August 23, 2013 at 7:46 am
  • I want to to thank you for this good read!! I certainly enjoyed every little bit of
    it. I’ve got you bookmarked to check out new things you post…

    Commented on August 31, 2013 at 11:18 pm
  • Hi,

    Is there a demo environment availeble where I can see the Procesmaker zimlet active?

    Thanks.

    Commented on September 6, 2013 at 12:09 am
  • So it is only for large companies those have more then thousands users? Organizations want to be sure that their key processes are being performed the same way every time in order to deliver consistent and measurable results.

    Commented on February 4, 2014 at 7:24 am

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>