Vous êtes sur la page 1sur 13

ECOSOFT CO., LTD.

BPM Hub Application


Development Environment Installation Guide
Submitted to BIOTEC
by Ecosoft Co., Ltd.

This documentation will focus on explaining how to install all relevant software components necessary to building the BPM Hub Application within the scope of Development Environment.

Version History
Version 1.0 Date 19/11/2012 Editor Kitti U. Description of Change Initial Document

Overview
This documentation will focus on explaining how to install all relevant software components necessary to building the BPM Hub Application within the scope of Development Environment. The BPM Hub application in this document is the first release (aka: Software Prototype) of BPM Hub application which will be released at the end of this project. This document will cover following 4 software installation stacks

This document will guide you through the installation and basic configuration of each software component. 1. Foundation Stack In other words, this stack consists of base software that will be act like run time environment of the system. It is the most basic foundation that all other software will be running on, 1. JAVA JDK runtime environment for Activiti and Eclipse IDE
1|Page

2. Apache ANT build script engine for JAVA based application. Will be used to build Activiti on first use. 3. XAMPP this one package consist of 3 important runtime components. a. Apache Tomcat runtime environment for web application b. MySQL database environment to be used in this project c. PHP runtime environment for PHP based application like Yii framework Installing JAVA JDK Download JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html Choose version jdk-6u32-windows-x64.exe After download is completed, simply install to path C:\Java\ Set System Variables for JAVA_HOME o Go to > System > Advanced System Setting > Environment Variables > System Variables o Set new System Variable, JAVA_HOME = C:\Java\jdk1.6.0_32

For Path to System Variable, Path, adding - "%JAVA_HOME%\bin;" To test whether the java is properly installed, go to Command prompt and type o > java version o you should see current version, i.e., Java version 1.6.0_32

Installing Apache Ant Download software http://ant.apache.org/bindownload.cgi

2|Page

Choose version apache-ant-1.8.4-bin.zip Step: Simply extract the zip file and place into C:\apache-ant-1.8.4 Set System Variable, ANT_HOME = C:\apache-ant-1.8.4 For Path variable, adding - "%ANT_HOME%\bin;" To test whether the ant is properly installed, go to Command prompt and type o > ant version o you should see current version, i.e., Apache Ant(TM) version 1.8.4

Installing XAMPP Download XAMPP from http://www.apachefriends.org/en/xampp-windows.html Choose version, i.e., xampp-win32-1.8.1-VC9-installer.exe Simply install using wizard, but make sure that it is installed in C:\xampp Once installed, open XAMPP Control Panel

Start the server, Apache and MySQL. By default, Apache will default to port 80 and MySQL to port 3306. Once started, you will see the PID and they will be labeled in green color. To test the Apache Tomcat go to, http://localhost/xampp To test the MySQL go to, http://localhost/phpmyadmin

2. Framework Stack

3|Page

As foundation stack is installed, we are now ready to setup our application. We can actually starting writing program in Java, PHP and using MySQL as database. But in this project, we will not build an application from scratch, but by the helping of Frameworks. This section will focus on installing necessary frameworks in order to build BPM Hub application. 1. Yii Framework The PHP framework to help building web application with MVC pattern. 2. Activiti BPM Engine The workflow engine that will be called by PHP web application, for task / queue business flow. 3. Apache DS LDAP sever The LDAP server that will simulate the use of LDAP for authentication (in final deliverable, we will replace this with NSTDA owned LDAP server). Installing Activiti BPM

Download XAMPP from http://activiti.org/download.html Choose version, i.e., activiti-5.10.zip Simply extract the zip file and place into c:\activiti-5.10 To build activiti for the first time, type following command, o > cd c:\activiti-5.10\setup o > ant demo.start This command will install "activiti-explorer" and "activiti-rest" and then start the tomcat server Note: At this point, activiti engine will be running on its own Tomcat and a temporary database called H2. We will change them to our XAMPP instance later in this document. To test Access Activiti Explorer by go to http://localhost:8080/activiti-explorer Test login using --> user: kermit, pass: kermit

4|Page

Installing ApacheDS (LDAP Server)


Download ApacheDS from http://directory.apache.org/apacheds/2.0/download/download-windows.html Choose version, i.e., Software: apacheds-2.0.0-M8.exe Simply install using wizard This will install server as service, you can check that it is running as "Apache DS default" in windows' Service.

As of now, we have setup LDAP Server. In previous step, you notice that we have user login kermit as example user in the system. We now want to move those users into LDAP Server instead, so that future authentication will be done against LDAP instead of against a database. In the following step, we want to install optional ApacheDS Studio, so that we have way to communicate with our LDAP server, and to create new groups and users there. Installing ApacheDS Studio (IDE)

Download ApacheDS Studio from http://directory.apache.org/studio/2.0/download/ Depend on your client machine, choose to download your package, i.e., for windows: ApacheDirectoryStudio-win32-x86_64-2.0.0.v20120224.exe Simply install using wizard. To connect to the DS Server, do the following

5|Page

Open ApacheDS Studio, and create new connection using default setting, excepts o Connection name: LocalLDAP o Port: 10389 o Hostname: localhost o Bind DN or user: uid=admin,ou=system o Bind password: secret We are now connected to our ApacheDS server.
o

Using the ApacheDS Studio to create example groups/users as following, o management kermit fozzie o manager kermit o sales fozzie Note: all user's password is "password"

InstallingYii Framework Here comes the most important component for our application, the Yii Framework. This is the framework that we will be programming most, the rest are mostly services to be called.
6|Page

The framework are nothing than the prebuilt PHP libraries and PHP pages, packaged to be used to build MVC styled web application. Installation of Yii mainly involves easy steps:

Download Yii Framework from http://www.yiiframework.com Choose version, i.e., yii-1.1.12.b600af.tar.gz Just Simply unzip the file as yii-1.1.12.b600af.tar.gz, rename it to "yii" and move it to Web Accessible folder, i.e., C:\xampp\htdoc\yii Any application will refer to this "yii" framework from its /bpmhub/index.php

7|Page

3. Development Stack In this stack we will be installing the development tools to be used within this project. Although come from different technology, all of them are using Eclipse as development environment. So, we will be installing eclipse first, then install required plugins. Download Eclipse from http://www.eclipse.org/downloads/ Choose Eclipse IDE for Java Developer with latest version, i.e., eclipse-java-juno-SR1win32-x86_64.zip To install, simply extract the zip file and place it to C:\eclipse To start program, double click on eclipse.exe, the program will start. Select a workspace or create new once, i.e., C:\eclipse\workspace

Next steps are to installed the required plugins. Install Activiti Designer component o From menu, go to Help -> Install New Software. o In the following panel, click on Add button and fill in the following fields: o Name: Activiti BPMN 2.0 designer o Location: http://activiti.org/designer/update/ o Make sure the "Contact all updates sites.." checkbox is checked, because all the necessary plugins will then be downloaded by Eclipse. o Click Next button, and accept the license to install.

8|Page

Install PHP component o Open Help -> Install New Software. o Select the Indigo update site. o When the list of existing features is populated - select 'PHP Development Tools'. o Make sure 'Contact all update sites...' is checked. o Note: http://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_P DT_3.0
Install Mercurial HG component (for Source Code Repository)

o Note: We need this component because after this, we will download our BPM Hub Project from repository o Go to Help -> Install New Software. In the following panel, click on Add button and fill in the following fields: o Name: Mercurial HG o Location: HG - http://cbes.javaforge.com/update o When install, select MercurialEclipse and all sub-components. o Click Next button, and accept the license to install. 4. Application Stack
9|Page

In this step, we will be deploying the version 1 of BPM Hub application. The step here will be a little bit more confused comparing to the previous components. All the code and libraries being deployed will not be explained yet as the intention of this document is merely to make the demo application working on the newly setup environment. Installing BPM Hub Application (version 1)
There are 2 projects that will consist of bpmhub. The main one is bpmhub (Yii/PHP). The second one, which is the bpmhub_activiti (Activiti/Java). Setup 2 Eclipse project for Development Clone 2 projects, o Yii's bpmhub --> hg clone http://kittiu@bitbucket.org/kittiu/bpmhub (clone to C:\xampp\htdoc\bpmhub, as it needs to run in Apache) o Acitviti's bpmhub_activiti --> hg clone http://kittiu@bitbucket.org/kittiu/bpmhub_activiti (clone to current workspace)

Enable LDAP Support By default, our software component, i.e., Activit and Yii do not yet support LDAP. This section, we will enable the support for LDAP.
LDAP Support for Activiti Provide necessary JARs for Activiti to support LDAP authentication via REST call, From Eclipse's bpmhub_activiti project, copy all jars from "lib" folder, o commons-collections-3.2.1.jar o customldap.jar o ldap-client-api-0.1.jar o mina-core-2.0.0-RC1.jar o shared-asn1-0.9.18.jar o shared-cursor-0.9.18.jar

10 | P a g e

o shared-i18n-0.9.18.jar o shared-ldap-constants-0.9.18.jar o shared-ldap-schema-0.9.18.jar o shared-ldap-schema-loader-0.9.18.jar o shared-ldap-schema-manager-0.9.18.jar o shared-ldif-0.9.18.jar o shared-i18n-0.9.18.jar Copy these jars into lib folder of Activit REST application C:\activiti5.10\apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\lib Configure application-context.xml, so that this application (activiti-rest) will be using the new LDAP Authentication. Please note the LDAP part of this file as following,

........ <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"> <property name="dataSource" ref="dataSource" /> <property name="transactionManager" ref="transactionManager" /> <property name="databaseSchemaUpdate" value="true" /> <property name="mailServerHost" value="localhost" /> <property name="mailServerPort" value="5025" /> <property name="jobExecutorActivate" value="true" /> <!-- LDAP START --> <property name="customSessionFactories"> <list> <bean class="org.ecosoft.activiti.ldap.LDAPUserManagerFactory"> <constructor-arg ref="ldapConnectionParams" /> </bean> <bean class="org.ecosoft.activiti.ldap.LDAPGroupManagerFactory"> <constructor-arg ref="ldapConnectionParams" /> </bean> </list> </property> <!-- LDAP END --> </bean> <!-- LDAP START --> <bean id="ldapConnectionParams" class="org.ecosoft.activiti.ldap.LDAPConnectionParams"> <property name="ldapServer" value="localhost" /> <property name="ldapPort" value="10389" /> <property name="ldapUser" value="uid=admin,ou=system" /> <property name="ldapPassword" value="secret" /> </bean> <!-- LDAP END --> ....... Restart Activiti Server. Now, Activiti should understand LDAP authenticationnder LDAP Support for Activiti Edit file C:\xampp\php\php.ini Comment out line --> extension=php_ldap.dll In case of error about libsasl.dll, copy this file from C:\xampp\php\ and place to C:\windows\system Restart Apache

11 | P a g e

Enable REST Support for PHP


Edit file C:\xampp\php\php.ini Comment out line --> extension=php_curl.dll Restart Apache

ENDS.

12 | P a g e

Vous aimerez peut-être aussi