How to test business logic

Testing the business logic of an enterprise application is mostly a little be tricky. In different to simple UI tests which can be performed with typical test-frameworks like HtmlUnit or Selenium, testing the business logic from the view of multiple test users can get very complicated very quickly. For example, if you test several steps in a comprehensive workflow for different users, you need to test if these users are allowed to perform specific tasks in the workflow. In such a scenario you need a group of test users to verify the different situations of access levels and you need to login and logout these users several times during your test case.

With the new release of Imixs Workflow the open source project provides now a powerful test framework which can be easily used in a JUnit Test. The Framework makes use of the Imixs REST API and simplifies the way to test complex workflow scenarios. To build your test case can setup a new WorkflowTestSuite and register a list of users which will be affected from the test case:

@Before
 public void setup() {
 testSuite = WorkflowTestSuite.getInstance();
 testSuite.setHost("http://localhost:8080/minutes-rest/");
 testSuite.joinParty("admin", "password");
 testSuite.joinParty("anna", "password");
 testSuite.joinParty("ronny", "password");
 testSuite.joinParty("eddy", "password");
 testSuite.joinParty("Anonymous", null);
 }

With this setup you can now easily test different scenarios and also create a new process instance or process specific workflow steps.

The following example shows how to test if a user currently has more than one task in his task list:

@Test
 public void worklistTest() throws Exception {
   Assert.assertNotNull(testSuite.getClient("anna"));
   List<ItemCollection> result = testSuite.getWorklist("anna");
   Assert.assertTrue(result.size() > 1);
}

Also the creation and the processing of a single workitem can be performed easily:

@Test
 public void processWorkitemTest() throws Exception {
   ItemCollection workitem=new ItemCollection();
    workitem.replaceItemValue("type", "profile");
    workitem.replaceItemValue("$ModelVersion", "1.0.1"); 
    workitem.replaceItemValue("$processid", 200);
    workitem.replaceItemValue("$activityid", 10);
    workitem.replaceItemValue("txtName","some test");
    workitem=testSuite.processWorkitem(workitem, "anna");
    Assert.assertNotNull(workitem);
    String uid= workitem.getItemValueString("$UniqueID");
    WorkflowTestSuite.log(Level.INFO,"UID=" +uid);
    Assert.assertFalse(uid.isEmpty());
 }

The important aspect of the WorkflowTestSuite is, that each test will be performed through the REST API of the Imxis Workflow Engine. So the test framework guaranties that during a test case the user will be authenticated against the back-end and the specific access level of each users joining the test case can be tested. This simplifies the way to test complex workflows and will improve your enterprise software development.

The Imixs WorkflowTestSuite is part of the upcoming release 3.1.7 of Imxis Workflow. Read more details here.

New Workflow Engine 3.1.6 released

Today we released our latest version 3.1.6 of the Imixs workflow engine. Imixs Workflow is a java framework for a human and adaptive process management. These kinds of software frameworks are typically used for business applications with flexible interactive user interfaces. Examples of these are approval workflows or  workflows in project management software.

The Imixs Workflow Engine is based on the Java Enterprise Specification JEE and provides a transactional and scalable BPM engine with an easy to use modelling tool.

The new release includes different improvements and bug fixes. A major change included in this release is the new project structure. The project is based on Maven and all submodules ‘core’, ‘engine’, ‘web-tools’ and ‘rest-api’ are now managed in a maven multi-module structure. This simplifies the integration and will lead to more and shorter release cycles. According to the new release the Imixs Workflow project has been migrated from Oracles Java.net platform to GitHub. This is an important step towards a more simplified access for developers and IT companies.

Read more on http://www.imixs.org

Imixs migrates to GitHub

We have now started the migration of the Imixs Workflow sources from Subversion to Git. In the past all sources of the Imixs Workflow Project were available on java.net. But now we started the migration to GitHub. This will make it easier for the community to join the project.

In addition we also plan to reorganize the Maven Project structure from a single project structure to a multi-module structure. The reasons for this step are a new deployment plan for the maven artifacts. With the multi-module structure we can simultaneity release all parts of Imixs Workflow. This was also made in the past. But with the new structure we can simplify the maven release process.

Join us on GitHub!

Imixs Workflow 3.1.4 Released

With the latest version of the Open Source Workflow Engine Imixs Workflow the project published a stable and scalable framework for the Java Enterprise architecture. The new release includes several bug fixes and provides new features and functionality.
With the new Business-Rule Plug-in it is now possible to add custom business rules into a workflow model. Business rules can extend the capabilities of a business process in various kinds. Imixs Workflow allows to write a business rule in any script language – like JavaScript Groovy Scala, JRuby, or Clojure.

In addition, the new version of Imixs Workflow is now offering a new calendar based version of the Imixs Workflow Scheduler. With this module, workflows can be triggered time-controlled. A new configuration interface allows to provide timer events in a calendar based format. This method is already known from the chron-jobs of Linux and provides a more flexible way to control event based business processes.
Addition to various minor improvements the exception handling has been extended and adapted. This now allows to implement business processes faster and adapt business logic more flexible way.
Read more on http://www.imixs.org

RELEASE 3.1.2 NOW AVAILABLE

Today we deployed the next release 3.1.2. This release includes bug fixes concerning the follow-up issue from the WorkflowKernel. In addition the WorkflowKernel now supports also a new feature to unregister plug-ins. The ItemCollection supports additional type-save getter methods and provides additional type check methods. This makes the ItemCollection more flexible to use when converting property types.

See the change log for more details: Imixs Change Log

VERSION 3.1.1 NOW RELEASED

Today we released the new version 3.1.1 of the Imixs Workflow engine. This release includes several bug fixes and enhancements to the plug-in API. The new version now supports full HTML Mails. The Mail Plug-In API was extended and provides more flexibility also in adapting the Mail functionality. The size of a search result provided by the Lucene Plug-In can now be limited.

In addition this new release now provides CDI Support for all workflow plug-ins. This extension simplifies the way to write custom workflow plug-ins or extend existing plug-ins.

The Imixs REST Service API was extended and supports a new post-method to receive processed form data in JSON format. This can be used in conjunction with jQuery used in the Imixs Script module.

CDI Support in EAR

There are currently some restriction in using CDI beans provided in different jars contained in one EAR. So see also the following discussions:

https://issues.jboss.org/browse/WELD-1367
http://java.net/jira/browse/GLASSFISH-17396
http://stackoverflow.com/questions/7610003/injecting-a-bean-from-a-different-jar-in-weld

NEW WORKFLOW ENGINE VERSION 3.1.0. NOW RELEASED

The new release of Imixs Workflow includes now full JEE6 support and also CDI integration. This considerably simplifies the integration of the Imixs Workflow components in any kind of java enterprise business application.
Web developers will benefit from the new version of Imixs Workflow Faces in a special way. The new release 3.1.1 provides a JSF integration based on jQuery. Developers can use the possibilities of JSF and Facletes while leveraging the full power of jQuery and jQuery-UI.
The imixs-workflow-jax-rs component provides a RESTservice API for exchanging workflow data with other applications – e.g Eclipse BIRT. On the other hand it is possible to integrate the Imixs Workflow using Ajax.

Released components:

  • imixs-workflow-core-3.1.0
  • imixs-workflow-engine-3.1.0
  • imixs-workflow-jax-rs-3.1.0
  • imixs-workflow-faces-3.1.1

IMIXS WORKFLOW 3.0.3 RELEASED

Imixs Workflow is a powerful BPM framework to build robust and scalable business applications on top of the Java Enterprise platform.
The latest release 3.0.3 provides a new Plug-In to integrate business rules in long running business processes. This Plug-In provides a new way to implement complex business workflows even faster.
The release includes also an update of the Workflow Admin Client to manage running process instances. The Imixs Workflow engine, which is based on the Java EE specification, provides a lot of enhancements concerning optimistic locking, exception handling and the introduction of additional remote interfaces.
Also the Imixs REST service API includes different enhancements which can be used togehter with workflow clients based on JavaScript frameworks like jQuery.

IMIXS WORKFLOW ENGINE 3.0.2 FINAL RELEASE

Today we released the latest version of Imixs Workflow 3.0.2.

This release includes a lot of minor updates, bugfixes, and new features. It provides a new logging and exception API that makes a integration easier.
With a new security interceptor model, application-based dynamic user roles can be now bound directly into a process instance. The Imixs REStfull API offers now full support of JSON objects. It is now possible to exchange all business data in JSON format from a JavaScript-based client included in the Imixs-Script library. Also the management of multi workflow model versions is now improved.

Why is Imixs Workflow distributed under GPL?

Since the early beginning of the Imixs Workflow project all results are subject to the general public license (GPL). This license grants the broadest freedoms for users. There are many software systems available with this license. The most popular is the operating system Linux or the database server MySQL. So we are all using this kind of software license. Remember, you can not go into the Internet without the help of Linux.

But when you take a closer look on the smaller parts of software systems – the frameworks – a lot of these frameworks are subject to a lesser general public license like the LGPL, the Apache or Eclipse license. The argument of the software vendors behind those software license is to encourage widespread usage and adoption. But this means also to enable adopters to restrict the usage of there software build on thus a framework. This all is common practice and I think there is no need to discuss the pros and cons. So why is Imixs Workflow distributed under GPL?

The idea behind the Imixs Workflow project is to provide organizations, companies and users with a flexible software solution, to manage their business processes. Business processes are subject to constant change. And a workflow management system must provide the opportunity to follow this change. Therefore, we think that the user of Imixs Workflow must be able to adapt their software solution to meet their own needs.
From this point of view there no reason to restrict the usage of the software in any way. And as the objective group of Imixs Workflow is the final user rather than the software developer we believe that the GPL is a better solution to achieve this goal.
We do not want to discourage ISVs to use the Imixs Workflow for there own software project. Every person including software developers are free to use the Imixs Workflow for there own project. But remember that it is your commitment to pass that freedom also to other users.