ProcessMaker Integration

Scope

This document is intended to be a preliminary guide for inetgrating Processmaker BPM into opentaps. This document disscuess the technical details and steps needed for inegrating and running a simple case inside opentaps. For the business fesibility of processmaker, please refer to Processmaker site.

Purpose

Opentaps system dose benifits from having business process management incorporated into it. Opentaps components has inbuilt rules that governs them. However, if we were to add additional layer of process management over these components, then we can get a flexible business process which can be added, manged and executed over the existing components. As these rules are managed by the BPM itself, we would get the benifits offerd by BPM govering the business rules.

ProcessMaker is an Open Source business process management (BPM) and workflow system designed to optimize the business operations and workflow management for small to medium sized businesses and organizations [1]. Processmaker BPM is one of the many open source BPM solutions. For the purpose of integration we have choosen processmaker as the BPM tool to integrate and test against opentaps.

Pre-requisites

Before we can integrate the processmaker into opentaps, we would have to do some preparatory work.

  • Installation: There is simple installation procedure given in the processmaker wiki. For the purpose of this documentation we are going to install and integrate processmaker in a Linux(Ubuntu) enviournment. For details plese refer the processmaker installation wiki
  • Apache virtual-host : After we have completed the installtion as per the instructions given in processmaker wiki, it’s a good idea to make the processmaker domain in apache so that we can refer to processmaker installation through a domain name rather than localhost.
#processmaker virtual host
<VirtualHost *:80>
ServerName 			processmaker.amiconcrm.com
ServerAlias 			www.processmaker.amiconcrm.com
DocumentRoot 			/opt/processmaker/workflow/public_html
DirectoryIndex index.html 			index.php
<Directory 			"/opt/processmaker/workflow/public_html">
.
.
</VirtualHost>
  • Making a Processmaker component: It is a good idea to have the processmaker as a seperate component in the opentaps. We can use the opentaps create component command to make the skeleton for the processmaker component.
{OT_HOME}$ant create-component
  • WSDL: ProcessMaker’s WSDL Web Services provide an programming interface to remotely control and integrate ProcessMaker with external systems. WSDL Web Services allow ProcessMaker’s functionality to be accessed remotely over the internet using the W3C’s Simple Object Access Protocol (SOAP) 1.2 and Web Services Description Language (WSDL) 1.1[2]. We can generate the WSDL file from the recently installed processmaker itself. We can update the build file of the opentaps component to download the WSDL file from the installation itself.Edit the build.xml from the processmaker component.
    <target 	name="wsdl">
    <get 	src="http://processmaker.amiconcrm.com/sysworkflow/en/green/services/wsdl2" 	dest="wsdl/processmaker.wsdl"/>
    </target>
    


After editing the build.xml, we can run the ant code to generate the WSDL.

{OT_HOME}/opentaps/processmaker$ ant wsdl
  • Stubs: Similarly we can generate the stubs from the .wsdl file using the ant tool. Using these stubs we can interact with processmaker APIs. Edit the build.xml file from processmaker component.
<target name="stubs" depends="prepare">
<taskdef name="wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask" classpathref="local.class.path"/>
<wsdl2java output="src" verbose="Y" url="wsdl/processmaker.wsdl">
<mapping namespace="http://www.processmaker.com" package="com.processmaker"></mapping>
</wsdl2java>
</target>

Integration Process

Architecture

For the purpose of this integration we are running processmaker on a Apache installation and communicating with processmaker using processmaker APIs over SOAP.

Diagram 1

Using Processmaker API in Opentaps.

Processmaker provides APIs over SOAP for external system to interact with processmaker. These API faciliates us to handle Login, processmaker users, case management, and document management. We use the sendVariable() and getVariable() APIs to set and retrive the case variables form the processmaker. Using these APIs we can communicate with processmaker inside the opentaps code. Please refer to wiki for futher details.

Login
To log into processmaker we need to call the login() from the processmaker APIs. The Object should be available after installing the stubs. we would be hooking the login API in the Opentaps Login itself, so that when the User Logs into opentaps, he is automatically logged in processmaker. Just make sure that the opentaps user has an equivalent login in processmaker.

ProcessMakerServiceSoap 	soap = new ProcessMakerServiceLocator().getProcessMakerServiceSoap();
soap.login(userId, 	password, statusCode, message, version, timestamp);

CaseList
caseList returns a list of cases for the logged-in user.

ProcessMakerServiceSoap 	lm = new ProcessMakerServiceLocator().getProcessMakerServiceSoap();
CaseListStruct[] 	caseList = lm.caseList(sessionId);

sendVariable

lm.sendVariables(sessionId, 	caseStruct.getGuid(),varListStruct,statusCode1,message1, timestamp1 	);

getVariable

lm.getVariables(sessionId, 	caseStruct.getGuid(),variables,statusCode,message,timestamp, 	variableListStructArrayHolder );

Cookies
Processmaker requires sessionId to be provided with each API call. While integrating the processmaker component into opentaps, we have make sure that we are using the same sessionId which was used for the login API. This way the processmaker recognizes the session of the logged user.

ScreenShots

Process Maker casesProcessMaker DashBoard CaseProcessMaker  Processes

References

[1] Processmaker wiki: (2010, October 18). FL: ProcessMaker Features Summary. Retrieved November 26, 2010, from http://wiki.processmaker.com/index.php/ProcessMaker_Features_Summary

[2] Processmaker wiki: (2010, October 18). FL: ProcessMaker WSDL Web Services. Retrieved November 26, 2010, from http://wiki.processmaker.com/index.php/ProcessMaker_WSDL_Web_Services


Share :
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • LinkedIn
  • StumbleUpon
  • Tumblr
  • TwitThis
  • E-mail this story to a friend!
  • MySpace
  • Print this article!
  • Reddit
This entry was posted in OFBiz, OFBiz and Opentaps, Opentaps, Processmaker. Bookmark the permalink.

3 Responses to ProcessMaker Integration

  1. Paul says:

    great project–hope to see this happen. the combination of OpenSource ERP + Amazon cloud hosting + an easy to use workflow tool would be fantastic, especially for developing world companies.

  2. Patty says:

    IMHO you’ve got the right ansewr!

Leave a Reply

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>