Does the GPL of Imixs-Workflow Affect my own Application?

Once again I was asked if the GPL of Imixs-Workflow does affect the development of a proprietary application which is distributed under a non-gpl licence? The answer splits into two different aspects:

Running a Separate Process

Since the Imixs-Workflow engine runs as a separate process which is called from a closed-source program, the FSF presents the legal opinion that the proprietary application would probably be a separate work. And this is the typical usage of the Imixs-Workflow engine. This is also valid if you develop a library or a plugin linking to the Imixs-Workflow engine used from a non-free program. The copyleft of the GPL library causes your plugin or library to be covered by the GPL, but not the main application, which is probably a separate work. As long as the workflow engine runs as a separate process there is no violation of the GPL in your main application.

Distributing Software

The second part of the answer is about the question of distributing software. In these days we all mostly develop software running on servers in the internet or the ‘cloud’. In this case it does not matter if your server uses a GPL library or software like MySQL or Imixs-Workflow. As long as you did not distribute the source code of your software you are not affected by the GPL or violating it. You are totally free to use GPL software.

Conclusion

Does the GPL of Imixs-Workflow affect your application development? The answer is “no” for the cases discussed above. Feel free to use free software, but avoid to prevent others from using free software.

How to Run a Custom Build of Imixs-Office-Workflow Using Docker

The Imixs-Workflow project supports Docker and provides also a Docker image for the workflow management suite ‘Imixs-Office-Workflow‘. Imixs-Office-Workflow provides a full featured business process management suite and can also be used to be extended in various ways. With Docker it becomes easy to setup a custom build for development, test and productive environments.

Setup a New Custom Build

To setup a new custom build of Imixs-Office-Workflow you can use the Imixs-Office-Archetype maven project, which provides a simple starting point for custom development. To run you custom build using Docker you should add a docker folder into your project with the following structure:

-/.data
-/.deployments
-/configuration
 |-standalone.xml
-docker-compose.yml
-Dockerfile

Customize Wildfly standalone.xml

First you can use the standalone.xml file located in the /configuration folder to configure your wildfly server to your project needs. Typically this will be a data-pool configuration and a security realm. This is an example of a custom database pool configuration which can be run in a docker container to access a postgres database running in another Docker container:

...
  <datasource jta="true" jndi-name="java:/jdbc/office-test" pool-name="office-test" enabled="true" use-ccm="true">
 <connection-url>jdbc:postgresql://postgres/office-test</connection-url>
 <driver-class>org.postgresql.Driver</driver-class>
 <driver>postgresql-9.3-1102.jdbc41.jar</driver>
 <security>
 <user-name>postgres</user-name>
 <password>adminadmin</password>
 </security>
 <validation>
 <validate-on-match>false</validate-on-match>
 <background-validation>false</background-validation>
 </validation>
 <timeout>
 <set-tx-query-timeout>false</set-tx-query-timeout>
 <blocking-timeout-millis>0</blocking-timeout-millis>
 <idle-timeout-minutes>0</idle-timeout-minutes>
 <query-timeout>0</query-timeout>
 <use-try-lock>0</use-try-lock>
 <allocation-retry>0</allocation-retry>
 <allocation-retry-wait-millis>0</allocation-retry-wait-millis>
 </timeout>
 <statement>
 <share-prepared-statements>false</share-prepared-statements>
 </statement>
 </datasource>
 ...

Note that the connection-url points to the host ‘postgres’ which need to be linked later to this container.

The Dockerfile

Next you can create a custom Dockerfile to describe you Imixs-Office-Workflow container for your custom build:

FROM imixs/office-workflow:latest
# add custom standalone.xml file
ADD configuration/standalone.xml /opt/wildfly/standalone/configuration/

The Dockerfile is quite simple. It extends the office imixs/office-workflow container and adds the new custom configuration file standalone.xml into the container

Docker-Compose

We use now docker-compose to describe the environment where we run a PostgreSQL Server, a WildFly Application Server and our custom build of Imixs-Office-Workflow.

 postgresloml:
  image: postgres:9.4.6
  environment:
    POSTGRES_PASSWORD: adminadmin
    POSTGRES_DB: office-test
  volumes:
    - ./.data/db:/var/lib/postgresql/data

 officetest:
  build: .
  environment:
    WILDFLY_PASS: adminadmin
  ports:
    - "8080:8080"
    - "9990:9990"
  links: 
    - postgresloml:postgres
  volumes:
   - "./.deployments:/opt/wildfly/standalone/deployments"

The docker-compose.yml file describes the PostgreSQL container with a custom database named ‘office-test’ (see the standalone.xml file), and a new imixs/ofifce-workflow container running our custom build of Imixs-Office-Workflow. The volumes parameter binds the local ./deployments/ folder which is used for autodeployments our application artifacts and also to configure hot-deployment during the development phase.

To start the environment simply run:

docker-compose up

That’s it! Now you can deploy your application aretfact of Imixs-Office-Workflow together with ah postgresql-jdbc.jar file into the local ./deploymetns folder.

After you access Imixs-Office-Workflow from your web browser (http://localhost:8080/office-test) the default user account ‘admin’ with the default password ‘adminadmin’ will be created and can be changed from the Admin section

 

Docker-Compose – How To Install

The Imixs-Workflow project supports Docker and provides several Docker containers to run business applications like Imixs-Office-Workflow on a Docker host. A business application like Imixs-Office-Workflow requires to start different containers to separate the database form the application/web server. With the help of the Docker Tool ‘Docker-Compose’ the  definition of multi-container Docker applications is quite simple. The Imixs project provides different Docker-Compose definitions stored in a docker-compose.yml file.

The Installation

The following installation guide is written for linux users. For other plattforms see the installation guide here.

Fist download docker-compose sources from GitHub and change mod with the following command:

curl -L https://github.com/docker/compose/releases/download/1.7.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
 chmod +x /usr/local/bin/docker-compose

After installation you should verify the installation with the following command::

docker-compose --version

this should result in something like:

docker-compose version 1.7.0, build 0d7bf73

How to downgrade the docker-compose

Depending on you docker installation it can be result in a version conflict between Docker and Docker-Compose after a manual installation. You will see an errer message when starting docker-compose like the following:

client and server don't have same version (client : 1.18, server: 1.17)

In this case you can easily install a lower version of docker-compose with the curl command as shown above.

Run Docker-Compose

After you have installed Docker-Compose successfully you can start a multi-container Docker application with the following command:

docker-compose up

You can run the containers in background:

docker-compose up -d

to stop all containers run:

docker-compose stop

 

 

Imixs Provides New Maven Repository

The Imixs-Workflow project now provides a new public Maven Repositoy on GitHub. The repository is part of the Imixs-Workflow subprojects which are hosted under GitHub/imixs.

The artefacts deployed into the imixs-mvn-repo are mainly used for the open source workflow platform ‘Imixs-Office-Workflow‘. All new artefacts which are not available on the maven central repository will be deployed into the public repository. Artefacts will be available from the current version 2.5 and future versions.

The public repository can be configured into a maven project as follows:

<repositories>
    <repository>
        <id>imixs-mvn-repo</id>
        <url>https://raw.githubusercontent.com/imixs/imixs-mvn-repo/master/</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
    </repository>
</repositories>

 

Running Imixs-Workflow in a Docker Container

For the development of a business application, which meets the needs of a human-centric workflow, it is a good choice to use the Imixs-Workflow Engine to separate the business and workflow logic. On the other hand the separation of services is one of the core concepts of a modern microservice architecture. With the new Imixs-Microservice project, Imixs-Workflow provides a Docker image, which is containing the Imixs-Workflow Engine running in a WildFly Java EE server. This Docker image can act as a black box for any modern business application. In this architecture, the Imixs-Workflow is responding to RESTful API calls from any core business application.

The Docker Image

The Docker image, provided by the Imixs-Microservice project, can be used out of the box for testing purpose or as a template for a custom docker image to be used in a productive environment. Once the container is started from this image, a custom business process model can be developed and deployed into the workflow engine via the Rest Service API. The project provides a example workflow. This BPMN 2.0 model was designed with the Imixs-BPMN Modeller:

imixs-microservice-ticket

This workflow is a simple example how to track tickets by a support team in a call-centre or a customer-support. After a new ticket was created it is assigned to a support team. Each member of a support team can accept the ticket for further processing. The ticket can be reassigned to the team or closed by solving the ticket.

The following JSON request object shows how a new process instance for the ticket workflow looks like when using the RESTful API :

{"item":[
     {"name":"$modelversion","value":{"@type":"xs:string","$":"my-model-definition-0.0.2"}},
     {"name":"$processid","value":{"@type":"xs:int","$":"2000"}}, 
     {"name":"$activityid","value":{"@type":"xs:int","$":"1"}}, 
     {"name":"namteam","value":[
                {"@type":"xs:string","$":"admin"},
                {"@type":"xs:string","$":"eddy"},
                {"@type":"xs:string","$":"anna"}
                   ]},
     {"name":"_subject","value":{"@type":"xs:string","$":"Some usefull data.."}}
   ]}  

After this JSON object was send to the Rest Service by a POST request, the Imixs-Workflow engine creates a new process instance assigned to the task ‘New Ticket’ and triggers the Event ‘Submit’ to assign the ticket to the support team. The process instance is stored into a Postgres Database.

Each member of the team can now request a task list with all open tickets assigned to himself.

curl --user admin:adminadmin http://localhost:8080/imixs-microservice/workflow/worklist

Each workitem included in the result provides a set of attributes managed by the Imixs-Workflow engine. This information can be used to track the status of each ticket.

Using the Imixs-BPMN modelling tool each event can be modelled with a custom behaviour. For example using the Imixs Mail Plug-In a e-mail notification can be send automatically to the support team after a new ticket arrived. Imixs-Workflow provides a set of plug-ins to fit the needs of typical human-centric business tasks.

Access Control and User Management

One of the core features of a human-centric-workflow engine is the routing and user management of process instances. Each process instance running in the Imixs-Workflow engine is assigned to a dedicated list of owners and a read- and write-access-list.

Using this access control list (ACL), it is possible to manage also complex business tasks by managing the visibility of a process instance within an organisation. The ACL of a running process instance maps to the role- and user management provided by the Java EE Application server. The Imixs-Microservice provides a integrated user service which can be used to add new users or changing there access level within the workflow engine.

Conclusion

Running Imixs-Workflow as a black box workflow server is an exciting approach which can bring a new point of view to a modern microservice architecture. Providing a Docker file the Imixs-Microservice can be deployed and started easily, thus the configuration of a own server environment is no longer necessary. This is also a good starting point to develop a Docker container for productive environments.

Read more about the Imixs-Microservice on the project documentation.

BPMN Modeller not Loading Correctly

After an update of the Eclipse-BPMN Plugin or the Imixs-BPMN Plugin in some cases it can happen, that an existing process model is no longer loaded correctly into the BPMN editor. In this case it is recommanded to remove the file

org.eclipse.bpmn2.modeler.core.prefs

which is located in the Eclipse workspace under the folder .settings/

After restarting Eclipse the BPMN Plugin is working again correctly.

E-Mail validation with Imixs-Workflow

With the help of the Imixs RulePlugin the validation of a E-Mail address entered by the user is very simple.

Just add the following JavaScript in the corresponding Workflow Activity:

 var isValid=true;
 var errorCode="VALIDATION_ERROR",errorMessage;

 // E-Mail validierung
 if (!validateEmail("_contact")) {
   isValid=false; 
   var errorMessage='Bitte geben Sie eine gültige E-Mail Adresse ein';
 }

function validateEmail(fieldName) {
 var email = workitem.get(fieldName);
 if (email == null ) 
    return false;  
 var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
 return re.test(email[0]);
}

 

BPMN Versioning

Running BPMN models in a BPM system often requires to take care about the internal version of a BPMN model. This occurs, for example, in scenarios where you run multiple instances of an active process in a live system with different versions of the same BPMN model.

The Imixs-Workflow Engine provides a nice mechanism to manage different versions of a BPMN 2.0 model. This allows to setup complex production environments with different models and different model versions at the same time. A model version, which is placed as an extension element of a BPMN 2.0 model can be evaluated by the Imixs-Workflow engine:
imixs-bpmn-versioning
Continue reading “BPMN Versioning”

How to use latest Imixs-Workflow-Engine in Imixs-Office-Workflow

This short tutorial explains how the latest version of Imixs-Workflow can be used in a custom build of Imixs-Office-Workflow.

In some cases it is necessary to use a newer version of the Imixs-Workflow engine event if the custom build of Imixs-Office-Workflow forces to use an older version because of the maven dependencies. To solve this problem you can do this:

1.) Update the imixs-workflow version in the parent pom.xml

First change the version number of the imixs-workflow engine in the parent pom.xml by changing the property ‘org.imixs.workflow.version’

For example:

 <org.imixs.workflow.version>3.4.0-SNAPSHOT</org.imixs.workflow.version>

2.) Remove the ‘imixs-office-workflow-ejb’ dependency

The dependency of the artefact ‘imixs-office-workflow-ejb’ is not necessaray in a custom build. You can remove this dependency form the parent pom.xml and the ear module of the custom build. In the ear pom.xml also remove the imixs-office-workflow-ejb module from the application module configuration.

3.) Change the overlay of the web module

Finally you need to change the overly setting in the web moudle of the custom build. Per default all elements form the overlay war-module (in this case imixs-office-workflow-web’ will be copied into the target web module. This includes also artifacts form the Imixs-Workflow faces and jax-rs dependencies. To avoid this overlay of libs you can add the following plugin configuration into the web module of the custom build:

 <build>
 <plugins>
 <plugin>
 <artifactId>maven-war-plugin</artifactId>
 <version>2.6</version>

 <configuration>
 <workDirectory>target/overlay-war-folder</workDirectory>

 <!-- We exclude libs form the parent WAR artifact -->
 <overlays>
 <overlay>
 <groupId>com.imixs.workflow</groupId>
 <artifactId>imixs-office-workflow-web</artifactId>
 <excludes>
 <exclude>WEB-INF/lib/*.jar</exclude>
 </excludes>
 </overlay>
 </overlays>

 </configuration>

 </plugin>
 </plugins>
 </build>

That’s it! Now only the latest version of Imixs-Workflow will be included into the custom build of Imixs-Office-Workflow.