How to use Environment Variables in WildFly Docker Containers

When setting up a Wildfly server, it is possible to use environment variables in the standalone.xml file by using the Bean Shell expression.

See the following example which sets up the database, user and password in a database configuration in the standalone.xml file by accessing environment variables:

<datasource jta="true" jndi-name="java:/jdbc/my_datasource" pool-name="my_pool" enabled="true" use-ccm="true">
    <connection-url>${env.POSTGRES_CONNECTION}</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <driver>postgresql</driver>
    <security>
      <user-name>${env.POSTGRES_USER}</user-name>
      <password>${env.POSTGRES_PASSWORD}</password>
    </security>
</datasource>

With the Bean Shell expression it is not necessary to turning parameters into System Properties: just use the expression:

${env.SYSTEM_ENVIRONMENT_VAR}

Especially when running wildfly in a docker container, this can be very helpful, because you can pass through environment variables to the container:

docker run --name="wildfly" -d -p 8080:8080 -p 9990:9990 \
    -e WILDFLY_PASS="admin_password" \
    -e POSTGRES_USER="my-postgres-user" \
    -e POSTGRES_PASSWORD="mypassword" \
    -e POSTGRES_CONNECTION="jdbc:postgresql://postgres/mydb" \
    imixs/wildfly

Also in combination with docker-compose environment variables can be set in the docker-compose.yml file. See the next example of a docker-compose.yml file, which sets up a postgres service and a wildfly service with a connection pool configuration as defined before in the standalone.xml:

postgres:
 image: postgres:9.6.1
 environment:
 POSTGRES_PASSWORD: mypassword
 POSTGRES_DB: mydb

mywildflyservice:
 image: imixs/mywildfly
 environment:
 POSTGRES_USER: "my-postgres-user"
 POSTGRES_PASSWORD: "mypassword"
 POSTGRES_CONNECTION: "jdbc:postgresql://postgres/mydb"
 ports:
 - "8080:8080"
 - "9990:9990"
 - "8787:8787"
 links: 
 - postgres:postgres

This is an example, which we use in combination with the wildfly docker container provided by the Imixs-Workflow project.

Don’t model Business Behavior in Objects!

During the past years I saw many projects where nearly any kind of business requirements was modeled into the technical object model, independent of the reason of the requirement. In many cases, modelling business requirements into a technical object model is quite ok and I agree with it in general. But also modelling business requirements into the affected business objects can lead into a ugly and complicated data structure. Let’s look into a short example to illustrate my thoughts: Continue reading “Don’t model Business Behavior in Objects!”

How to Integrate Imixs-Workflow with Single Sign On

Imixs-Workflow can now be easily combined with the Open Source Identity and Access Management solution Keycloak. Keycloak is an Open Source Identity and Access Management Server which can be used together with Wildfly to authenticate users with a modern authentication mechanism based on OpenID Connect SAML and OAuth. This is a short tutorial how to setup the Single Sign On Server Keycloak and configure the Imixs-Workflow to authenticate users. Continue reading “How to Integrate Imixs-Workflow with Single Sign On”

How to secure Business Objects

This post explains how you can secure your business objects in a model driven way, using the Imixs-Workflow engine.

Most applications deal with security in a functional way. This means that a business application typically defines different functional roles which are mapped to different users. For example let’s look on a simple Ordering System. In an Ordering System, we will have roles like

  • Order-Creator‘ – creating the order
  • Order-Approver‘ – validating and approving
  • Order-Executor‘ – execution

These roles are typical for such an business application and mostly tightly coupled to the corresponding business methods – e.g. createOrder(), approveOrder() and executeOrder(). This works well in a monolithic business application where you can control the security layers as also the business logic. But as more complex the business application becomes, also the enclosed security becomes more complicated. For modern application design, in addition, you often have to deal with external web services and business logic which need to be adapted easily to changing requirements. So this static security model leads into a hell of hard coded business rules or, what is worse, can no longer guarantee the security. Continue reading “How to secure Business Objects”

Imixs-Workflow 4.0 released!

These days, the open source project Imixs-Workflow has released the latest major version 4.0.1.

The new release includes a number of improvements concerning performance and stability. Version 4.0. is now based on Java 8 and can be run with any Java EE 7 application server. In addition to a long list of improvements, the Lucene search engine technology is now fully integrated into the Imixs-Workflow engine. Thus, the open source framework provides much more flexibility in data access and allows a faster integration into existing business solutions.

Imixs-BPMN

Also the BPMN modeling tool Imixs-BPMN has been improved in the wake of the new release. The Eclipse BPMN2 plug-in enables the process analyst to document and describe workflows based on the BPMN 2.0 standard. These kind of models can be executed by Imixs-Workflow immediately without the need of a redeployment or code changes. Also, business rules can be modeled as part of a workflow, so even complex business processes can be described in a model.

Imixs-Workflow 4.0

The Imixs Open Source Project is hosted on GitHub with a large number of extensions and tools to be used to integrate the workflow engine into individual business applications. Thus Imixs-Workflow offers an enormous potential for software companies and large software projects in terms of agility and cost reduction. With the support of the BPMN 2.0 standard the business processing an application can be changed easily at runtime and without extensive refactoring or code changes.

Open Source Workflow Engine on the IT & Business Trade Fair 2016

This year, the Imixs Software Solutions GmbH presents the latest major release of the open source workflow engine Imixs-Workflow 4.0.0 at the IT & Business Trade Fair.

ITB_15_W_027_gr-200x300
Bildnachweis Messe Stuttgart

Imixs-workflow is a so called “human-centric workflow engine”. Human-centric BPM means to support human skills and activities by a task orientated workflow-engine. The Imixs-Workflow project provides a powerful framework for the development of human-centric business applications. Imixs-Workflow can control, monitor and optimize any kind of business process between employees, customers and suppliers. This topic is currently also well known under the headline “Social Collaboration”. In contrast to a simple ad-hoc workflow approach, Imixs-Workflow allows the development of professional business applications and the integration of business process management into existing IT architectures. Imixs-Workflow also follows the approach of a microservice architecture and can for example be run easily in a docking container.

The new release includes significant improvements in performance and stability. Which a new database schema and the integration of the Lucene-search technology, the Imixs-Workflow engine is now much faster and can be easily integrated in custom software projects. With the Eclipse-based modelling tool ‘Imixs-BPMN‘ a business process can be developed according to a model-driven software development approach. Changes in the business logic or in the business process itself can be deployed at run time. This leads to a significant reduction of development cycles in an agile software development environment.

For software companies and larger projects, Imixs-Workflow shows a huge potential for improvements in the area of agility and cost reduction. With the support for BPMN 2.0, business logic can be changed easily and without costly re-factoring. The Imixs Software Solutions GmbH supports companies in the development and implementation of workflow solutions and offers also training and individual workshops.

The new version is expected to be released finally in September 2016. The open source project is available on GitHub, and provides a lot of examples and modules. Visitors of the IT & Business Trade Fair can inform themselves between Oct. 04.-06. in Stuttgart. Discussions about Imixs-Workflow can be made together with workflow experts at booth 1G33.2.

6064633_29_08_16-300x250IT & Business, DMS EXPO and CRM-Expo are merging to form a single event: the new IT & Business. Under one brand and under the roof of the largest hall at the Stuttgart Trade Fair, exhibitors will show how companies can work more efficiently, simply, safely and economically by means of optimising their operational processes.

Version 4.0.0 anounced!

The next major release of Imixs-Workflow 4.0.0 is already under development and will be released soon. The new version represents a significant improvement in performance and stability. One of the major improvements is the new database schema as well as the integration of the Lucene Search Technology. At the same time, we will also re-factor the service layer which will simplify the usage of Imixs-Workflow for most projects.

For software companies and larger projects, Imixs-Workflow can be a huge improvement in changeability and cost reduction for the development of enterprise business applications. The BPMN 2.0 standard and the Imixs-BPMN modeler allows to change business logic during runtime and simplifies the way to maintain complex business applications.

The new release which is now in a test stage will be released in September 2016. You can join the project on GitHub.

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.

Imixs-Workflow 3.8.4 – Final Release

The last week the Imixs-Workflow project released the new Imixs-Workflow release 3.8.4. The new release includes a lot of improvements and enhancements:

  • ResultPlugin – provide method to parse item attributes enhancement testing
  • ReportService – getReportList returning sorted result set
  • Rest API – Report Service provide new converter tag
  • Rest API – Report supporting dynamic date values
  • Rest API – remove duplicated mediatype methods
  • Rest API – provide new RESTfull uri for getEvents()
  • Rest API – added new post workitem URI
  • Testsupport – refactor AbstractWorkflowServiceTest
  • WorkflowService – added new method getEvents
  • WorkflowService – refactoring, remove getWorklist
  • WorkflowService keyDebugLevel deprecated/removed
  • WorkflowSevice – standard queries – remove useless joins
  • ReportService – provide child item structures #169

Also some bugfixes are included in release 3.8

  • WorkflowService – namLastEditor updated only if user changed
  • EntityService – remove deprecated indexValues
  • ResultPlugin – Regex matcher failed in case of newline

You can download the latest version from the Maven repository or GitHub.

Next Release 3.9

The work on the next release 3.9.0 has already started. The upcoming new version of Imixs-Workflow will include a redesign of the Model Service Interfaces. The Model Management will be handled In-Memory which gives the workflow engine a impressive performance boost.

Imixs-BPMN Modelling Tool 1.4.4 Released!

With the latest version 1.4.4. of the BPMN modelling Tool Imixs-BPMN, the open source project ‘Imixs-Workflow‘ provides several enhancements in modelling human centric workflows. Among other new features it is now possible to model scheduled events on a working day basis. This allows scheduling events in individual time frames ignoring weekends. Another enhancement is the visualisation of custom task properties. ACL settings or custom editor settings are now visualized by info icons. Also the Process-ID of a Imixs-Task element is now displayed in the graphical representation of a BPMN model.

bpmn2-customtask

Some bug fixes align the new release with the latest version of Eclipse BPMN2 for the Mars Release. The new version can be downloaded and installed from the Eclipse Marketplace. Further information about the BPMN modelling tool can be found on the project homepage www.imixs.org.  Take also a look into the tutorial “How to Create a Workflow Model“.