All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

How to integrate Bizagi with Joomla!

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<keywords content="keywords"> Joomla!, Joomla, front-end, back-end, front end, back end, contact us, php, CMS, contact-us, contact </keywords>

Contents

How to integrate Bizagi with Joomla!

This article describes how to create a case in Bizagi from Joomla!. This way, Joomla! can be extended with a powerful BPM solution such as Bizagi. This integration how-to focuses on Joomla! as an entry point of your client's requests and Bizagi as the internal web application of BPM implementation.

The following architecture diagram represents this how-to's considered set-up and integration:

 

1 Clients access your web site and send a contact request through Joomla!.

2 The contact information is sent throughout the use of Bizagi's SOA layer.

3 A new case is created in Bizagi BPM project's web application.


The developed example will consider and describe publishing a "Contact us" form in your company's web site to delegate the information to your Bizagi process by creating one case for this contact us request.

To simplify this integration and example, the invocation of the web services published by Bizagi will not be done through PHP directly but through a component in a .Net web application.


Prerequisites

  • Installed Joomla! 1.5 or higher. Joomla! may be downloaded from its official web page.


Using components in Joomla!

In order to carry out this example for Joomla!, creation of the following files and folders is carried out with the structure shown below:

site/contactus.php - this is the entry point to our component

site/controller.php - this file contains our base controller

site/views/contactus/view.html.php - this file retrieves the necessary data and pushes it into the template

site/views/contactus/tmpl/default.php - this is the template for our output which contains the contact us form HTML

site/models/contactus.php - this is created in order to follow a proper MVC pattern.

contactus.xml - this is the XML (manifest) file that tells Joomla! how to install our component.


These files and folders are named according to the defined [conventions] and our component is called "contactus" (in Joomla! it will be installed as "com_contactus").


The Default.php file should be as shown:

Notice that the action set for our form references the http location in which we will find a .Net component to complete the integration with Bizagi's project. This will be throughly detailed later on 'Using a web application for the web service invocation'.

Download this Joomla!'s component ready to install here.


Having the bpm process to handle the "contact us" request

Since we have the entry point for these contact us requests as a webpage in Joomla!, it is required having a Bizagi process to receive these requests' information and the continue with the bpm approach to process the incoming information (for example: reviewing the request, contacting that person, etc,).

For this example, a simple Contact Us process was created in Bizagi, with the following characteristics:


1. The process is named 'ContactUsRequest', and the data model for this process has as a process entity an entity called 'ContactUsRequest' as well.


2. The entity 'ContactUsRequest' has mainly these attributes:

- ContactName (string)

- EmailAddress (string)

- Message (string)

- TelephoneNumber (string)


Notice you need to specify a length for the string type attributes. Ensure they are long enough to support the incoming information in Joomla!'s form. Suggested values are:

- ContactName Length:50

- EmailAddress Length:50

- Message Length:4000

- TelephoneNumber Length:20


3. The first activity's form renders the 4 attributes previously listed. The incoming request from the contact us page will create a new case and in this first activity's form we will be able to see the submitted information.

Summing up, the attributes: ContactName, EmailAddress, Message and TelephoneNumber are included in this form as non-editable.


Using a web application for the web service invocation (for this example in .Net)

In order to create a case with the corresponding submitted contact information, in this example a web application will be created so that it is in charge of sending out the information to invoke the createCases web service for Bizagi's process to start.
Remember that Bizagi offers through its SOA layer many more methods available for integration, that can be also used in Joomla! and for this scenario as well (for example to either update or consult the information of an existing case).

Since this how-to was worked with Microsoft Visual Studio 2008, the created web application solution will be addressed from now on as the "ContactUsApplication".


Create a new project in Visual Studio and for its type, select "ASP. Net Web Application". 


For the ContactUsApplication, a web reference in the visual studio project is required as:

http://[your_Bizagi_server]/[your_Bizagi_project]/webservices/workflowenginesoa.asmx


Therefore, create the corresponding web reference to your Bizagi project's published web services.  


Alert: Notice this is an example and that according to secure and best practices, the access to these web services should be restricted and controlled in the IIS configuration, according to your own-defined security policies.


Given that the Joomla!'s contact us form will pass on the information to the ContactUsApplication, we require retrieving these parameters in the Default.aspx.cs in its Page_Load method.


The Default.aspx.cs should be as shown:


The invocation of the web service is carried out in a different class, called WSController.cs. To create the WSController class, add a new item to your project as shown:

Image:Joomla VSAdd NewItem.jpg



The resulting WSController.cs should be as shown:


Download the complete Visual Studio example project here.


Finally, mount these files in the server's IIS as an application so that access from the link is possible (as http://[your_Bizagi_server]/[your_iis_application]/Default.aspx).


To achieve this, first copy the solution folder into the server's C:\inetpub\wwwroot\path. Then, open the IIS manager. You may do so from the run command as shown:

Right-click on the copied folder and select the convert to application option.


Notice that the resulting http location of this web application should correspond to that defined in the Default.php's form action.

At this point, you are set so that your clients can access your contact us form in Joomla! and send you contact requests through it and into your Bizagi process! To test this application, run your Joomla! site in a browser of your choice by typing (according to your Apache Server's port installation):

http:[your_server]:[apache_port]/Joomla_1.5.22-Stable-Full_Package/index.php?option=com_contactus

<comments />