How would you develop a workflow application in Java? - workflow

I want to develop an application that allows its users to define workflows and then executes them.
My environment is JBoss so naturally I'm considering jBPM.
I can NOT use the jBPM graphic workflow design tools since my workflows are very specific and I don't want to expose my users to all jBPM features.
Questions:
Is jBPM robust and scalable?
Is jBPM standard (i.e., used by enough people)?
How do I tie my own workflow GUI to the jBPM engine?
Is jBPM suitable for the job, should I consider a different platform or maybe do it (the workflow logic) myself?

Is jBPM robust and scalable?
Ans: Yes, Jbpm is robust and scalable. Need to configure/develop properly..
Is jBPM standard (i.e., used by enough people)?
Ans : You need to ask with jbpm forum.
How do I tie my own workflow GUI to the jBPM engine?
Ans : You need to develop processConfiguration file for each workflow, and deploy
these config file(xml file), this updates jbpm related tables and your
workflow related tables.
Is jBPM suitable for the job, should I consider a different platform or maybe do it
(the workflow logic) myself?
Ans : Its suitable for big workflows( where the stages/Nodes and logic are more).
And easy to Integrate with rule engine.

Not a direct answer to your question, but I think you should also take into consideration:
As you want your users to define workflows, are you sure you're not just referring to a finite state machine, rather than a workflow?
Can the user change existing workflows, and if so: if the workflow is changed, do you want running processes to continue using the old definition, or do you need to be able to migrate the running processes to use the new definition?

How do I tie my own workflow GUI to the jBPM engine?
Readed at jBPM main page:
JBoss jBPM provides a process-oriented programming model (jPDL) that blends the best of both Java and declarative programming techniques.
jBPM jPDL API docs overview

Is jBPM robust and scalable?
Yes, you have a wide range of options to scale your engine to a large number of process definitions, process instances and/or requests/second.
Is jBPM standard (i.e., used by enough people)?
Difficult to define standard ;) But it had for example several thousand downloads last week, and it uses standards as much as possible, like the BPMN 2.0 specification for process definitions, a standard that is currently being introduced by almost all BPM vendors.
How do I tie my own workflow GUI to the jBPM engine?
Depends what the GUI is for. Assuming you are referring to a GUI for defining the process definitions and you don't want to use the Eclipse-based or web-based editors that are offered by default, you can:
- use any GUI you like as long as it generates the BPMN2 XML, that can then be read in by the process engine
- your GUI uses the process fluent Java API to create processes using Java, which can then be loaded into the engine as well
Is jBPM suitable for the job, should I consider a different platform or maybe do it (the workflow logic) myself?
Trying to create a simple workflow engine yourself probably takes more effort than you might think, as you might start out simple, but usually end up adding features like persistence, monitoring, integration, dynamically loading new process definitions and process instance migration, etc. and end up with a home-grown workflow engine you have to maintain ;) You get these features out-of-the-box with jBPM.
Kris

Related

how to evaluate if a project qualifies for or can be retrofitted with JBPM6

I had used JBPM 3.2 few years back as workflow engine. Now being part of a team were they had recently started a project, i need to evaluate if it can be improved/benefited by retrofitting JBPM 6 on it.
I am new to JBPM 6 so i read and researched to find road map for the list of changes,
http://www.jboss.org/jbpm/roadmap
whats new,
http://www.slideshare.net/krisverlaenen/2013-0611-whats-new-in-j-bpm6
did installation, demo and examples using,
http://docs.jboss.org/jbpm/v6.0/userguide/jBPMEclipseJBPM.html
however i am still coming up to speed in terms of what JBPM was and what it has become in these years and its capabilities. It would be helpful if someone can guide me in terms of what all things in a project scope make is qualify for JBPM 6.
thanks in advance,
There are a lot of reasons / advantages to using business processes (in general):
dynamic and flexible: extracting business logic in business process
allows you to evolve it or make it more flexible
higher-level: business analysts and end users could (possibly) understand and/or author business processes
monitoring and management: get an overview of all (current and historic) work
long-running and/or human tasks: some features are sometimes difficult to code but easier to express using specific business process constructs
performance: high throughput and scalability
tooling: a lot of out-of-the-box features and tools you can use
[note you definitely don't need to check all of these]
There's more, but you should make sure your benefits outweigh your initial learning curve / added complexity.

Maintaining drl (technical) rules in Drools Guvnor

I'm new to the world of business rules, but I think I've understood the concepts of Drools Expert and Drools Guvnor, yet I'm still a bit confused how/when/why exactly use Guvnor in comparison to Expert. And also, whether they rule each other out or are capable or even prefered to work side-by-side. Below are some highlighted topics that puzzle and a bit of explanation behind my concerns, mainly concentrating in application maintainability.
Does Guvnor have all the functionality that is available in Expert plus more?
I know that Guvnor is Business Rule Management System (BRMS) that takes control of storing(including versioning) the rules and exposing services to use of other apps. Guvnor contains UIs (text and graphical) for generating the rules and an engine for running them, so in this sense I guess it contains all functionality of the Expert system. Based on my requirements, I'm quite sure Guvnor is what I need, but do I need Drools Expert for anything after that?
Or in other words, does Drools Expert offer something that is not present in Guvnor?
Testing rules in Guvnor
Many tutorials on Drools I've seen start with TDD example where the rules are tested with simple jUnit tests. Once a rule is imported to Guvnor (or just generated there), is there any way to use/write unit tests for it?
Should the testing be done via exposed interfaces (REST) only?
If the users of the system are to develop their own rules, I don't expect them to write any tests. Mainly interested in 'core' rules and their maintainability here.
In case of 'core' rules, should they be stored in a version controlling system and imported to Guvnor on scheduled updates for the complete system? In this case the unit tests could be written for these rules and automatically executed as part of build cycle.
Thanks in advance.
Based on one of your questions, there's something I should clear up first. In essence:
Expert is a rules engine runtime.
Guvnor is a tool for writing and storing rules, which will subsequently be executed in Expert.
Guvnor doesn't provide a runtime for your rules, other than what is required for the test harnesses. You will always need Expert for your runtime environment. Guvnor enables you to manage the rules and store them. It also provides some handy GUI tools such as the guided editor and web decision tables. However, you can also edit rules in an IDE such as Eclipse and push them to Guvnor using the Guvnor WebDav Eclipse plugins.
Typically, you will have a Guvnor web application on one server and your application(s) on elsewhere. You can download the compiled rules from Guvnor into your application build, and deploy them with your application. Alternatively, you can define a URL resource in your code to create your knowledge base, pointing at the Guvnor package URL. In that case, your application can load the knowledge base on start-up and reload it at runtime.
For example the following code will download a package snapshot called "Approved" as a resource for building a knowledge base.
UrlResource urlResource =
(UrlResource) ResourceFactory.newUrlResource(
"http://my.guvnor.local/.../package/mypackage/Approved");
urlResource.setBasicAuthentication("enabled");
urlResource.setUsername("myusername");
urlResource.setPassword("mypassword");
KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
builder.add(urlResource, resource.getType());
Edit - Take a look at KnowledgeAgent if you wish to have rules reloaded at runtime when they are changed in Guvnor.
My main reason for using Guvnor is to enable non-technical users to author rules using decision tables and DSL-based guided editors.
I like to edit technical rules in Eclipse, where I can easily write unit tests around them and evaluate that they are behaving as I expect. I find that much easier than the testing capabilities in Guvnor. And although Guvnor provides some version control, I much prefer Subversion/Git as version control for my technical rules.
I also write DSL in Eclipse, which I then deploy to Guvnor. This makes guided rules much simpler to work with for non-technical users.
Testing rules
With regards testing, there are a few options. There is testing functionality in Guvnor, which enables you to write expectations based on various inputs. However, I personally find that way too clunky and limiting to use. I far prefer to write tests in Java/JUnit.
First of all, you can write simple unit tests, which load one or two technical rules, written in DRL and evaluate that they are activating when you think they should, and generating inferred facts where appropriate.
For more complex testing, I write tests which create a knowledge base using a package in Guvnor, insert facts and fire rules, in order to evaluate that the package as a whole is working correctly, including those rules which have been built in guided editors or decision tables.
Other uses for Guvnor
It's worth noting that the Guvnor editor functionality is becoming much richer, and it is becoming an editor and repository for more than just rules. For instance, there is rich tooling for BPM processes, which should soon be better than what you can get in an IDE such as Eclipse.
Summary
If all your rules are written by yourself and other developers in DRL, then there is little benefit to using Guvnor. In fact I would find it a hindrance. However, if you wish to take advantage of the guided editors or decision tables, or you wish to have 'business' users manage some of the rules, then you should take a deeper look at Guvnor.

Process Engines for BPMN 2.0

I'm doing a comparison among all existing BPMN 2.0 Process Engines e.g. Activiti, jBPM etc.
I've prepared a list of 4 process engines which executes BPMN 2.0 given below;
Popular BPMN 2.0 compliant open-source engines:
Activiti: http://www.activiti.org/
jBPM: http://www.jboss.org/jbpm
Bonita: http://www.bonitasoft.com/
A commercial engine:
ActiveVOS: http://www.activevos.com/products
I would appreciate your help if you enhance my research by adding any existing Process Engines (for BPMN 2.0) in the above list along with the quick comparison among all.
I would prefer a very short comparison listing only important features (distinguishing features like what is possible for one and not for others, licensing, dependencies with other products like tomcat & JBoss and operating systems etc)
P.S: I've found much on Activiti vs jBPM but still your answers will be a favor.
I cannot offer you a full-fledged comparison but I can give you some pointers that might help you in your evaluation:
An "Activiti in Action" book has just been published (July
2012) and in it you will have a section reviewing other BPMN process
engines (Section 1.2.3 - Knowing the competitors).
For Activiti, there also exists since recently, a commercially-supported version called camunda fox BPM Platform. They also provide a comparison with the added-value they provide here.
I am disappointed with Activiti. It should be called Spring BPM because it doesn't work well without it. If you don't mind using Spring, then Activiti might be a better fit. If you are using JEE/CDI, then JBPM is a better fit.
I did such a research, too. Here are the key-points which were relevant for our concrete use case:
Bonita:
Bonita has a zero-coding approach which means that they provide an easy to use IDE to build your processes without the need for coding. To achieve that, Bonita has the concept of connectors. For example, if you want to consume a web service, they provide you with a graphical wizzard. The downside is that you have to write the plain XML SOAP-envelope manually and copy it in a graphical textbox. The problem with this approach is that you only can realize use cases which are intended by Bonita. If you want to integrate a system which Bonita did not developed a connector for, you have to code such a connector on your own which is very painful. For example, Bonita offers a SOAP connector for consuming SOAP web services. This connector only works with SOAP 1.2, but not for SOAP 1.1 (http://community.bonitasoft.com/answers/consume-soap-11-webservices-bonita-secure-web-service-connector). If you have a legacy application with SOAP 1.1, you cannot integrate this system easily in your process. The same is true for databases. There are only a few database connectors for dedicated database versions. If you have a version not matching to a connector, you have to code this on your own.
In addition, Bonita has no support for LDAP or Active Directory Sync in the free community edition which is quite a showstopper for a production environment. Another thing to consider is that Bonita is licensed under the GPL / LGPL license which could cause problems when you want to integrate Bonita in another enterprise application. In addition, the community support is very weak. There are several posts which are more than 2 years old and those posts are still not answered.
Another important thing is Business-IT-Alignment. Modelling processes is a collaborative discipline in which IT AND the business analysts are involed. That is why you need adequate tools for both user groups (e.g. an Eclipse Plugin for the developers and an easy to use web modeler for the business people). Bonita only offers Bonita Studio, which needs to be installed on your machine. This IDE is quite technical and not suitable for business users. Therefore, it is very hard to realize Business-IT-Alignment with Bonita.
Bonita is a BPM tool for very trivial and easy processes. Because of the zero-coding approach, the lerning curve is very low and you can start modelling very fast. You need less programming skills and you are able to realize your processes without the need of coding. But as soon as your processes become very complex, Bonita might not be the best solution because of the lack of flexibility. You only can realize use cases which are intended by Bonita.
jBPM:
jBPM is a very powerful Open Source BPM Engine which has a lot of features. The web modeler even supports prefabricated models of some van der Aalst workflow patterns (workflowpatterns.com). Business-IT-Alignment is realizable because jBPM offers an Eclipse integration as well as a web-based modeler. A bit tricky is that you only can define forms in the web modeler, but not in the Eclipse Plugin, as far as I know. To sum up, jBPM is a good candidate for using in a company. Our showstopper was the scalability. jBPM is based on the Rules-Engine Drools. This leads to the fact that whole process instances are persisted as BLOBS in the database. This is a critial showstopper when you consider searching and scalability.
In addition, the learning curve is very high because of the complexity. jBPM does not offer a Service Task like the BPMN-Standard suggests In contrast, you have to define your own Java Service tasks and you have to register them manually in the engine, which results in quite low level programming.
Activiti:
In the end, we went with Activiti because this is a very easy to use framework-based engine. It offers an Eclipse Plugin as well as a modern AngularJS Web-Modeler. In this way, you can realize Business-IT-Alignment. The REST-API is secured by Spring Security which means that you can extend the Engine very easily with Single Sign-on features. Because of the Apache License 2.0, there is no copyleft which means you are completely free in terms of usage and extensibility which is very important in a productive environment.
In addition, the BPMN-coverage is very good. Not all BPMN-elements are realized, but I do not know any engine which does that.
The Activiti Explorer is a demo frontend which demonstrates the usage of the Activiti APIs. Since this frontend is based on VAADIN, it can be extended very easily. The community is very active which means that you can get help very fast if you have any problems.
Activiti offers good integration points for external form-technologies which is very important for a productive usage. The form-technologies of all candidates are very restrictive. Therefore, it makes sense to use a standard form-technology like XForms in combination with the Engine. Even such more complex things are realizable via the formKey-Attribute.
Activiti does not follow the zero-coding approach which means that you will need a bit of coding if you want to orchestrate services. But even the communication with SOAP services can be achieved by using a Java Service Task and Apache CXF. The coding effort is low.
I hope that my key points can help by taking a decision. To be clear, this is no advertisment for Activiti. The right product choice depends on the concrete use cases. I only want to point out the most important points in our project.
Best regards Ben
Nommy, you should take a look at Roubroo - a process engine built to natively support BPMN 2.0. It does not have the legacy of an older process engine being retrofitted to support the new standard. It support BPMN 2.0 execution semantics including the IOR gateway, which I think is the key to way business processes are defined in a networked graph. jBPM and Activiti are based on the underlying PVM, which has great support for some workflow patterns but not for others. Take a look at this research paper : http://eprints.qut.edu.au/14320/1/14320.pdf
and http://www.workflowpatterns.com/evaluations/opensource/
In my opinion currently Camunda BPM Platform the leader in the open source field.
And you mentioned Open Source?
So try camunda if you like:
- Clean BPMN focused engine (Shared, Embedable or "remote")
- Clean and working REST API
- Out of the box Platform with basic administration tools, and development ready API's
- Biggest open-source community (my persnoal oppinion)
- Best of Breed approach in the java eco-system.
- If you like Java.
- If you want to that your Processes get accepted by your IT crowd.
http://www.camunda.com/fox/product/details/
jBPM5 is agnostic to the environment, it doesn't depend on JBoss, you can run it in every Application Server, Servlet Container or a SE environment. jBPM5 is licensed with the Apache Software License V2 which I believe that is a really good idea.
You can of course find more information in the official page.
Cheers
Regarding jBPM:
jBPM is an open-source workflow engine written in Java that can execute business processes described in BPMN 2.0 (or its own process definition language jPDL in earlier versions). It is released under the ASL (or LGPL in earlier versions) by the JBoss company
It includes,
Strong and powerful integration with business rules and event processing.
Process collaboration, monitoring and management through the Guvnor repository and the management consoles.
Human interaction using an independent WS-HT human task service.
In essence jBPM takes graphical process descriptions as input. A process is composed of tasks that are connected with sequence flows. Processes represent an execution flow. The graphical diagram (flow chart) of a process is used as the basis for the communication between non-technical users and developers.
Take also a look at Imixs-Workflow which is a human-centric workflow engine. Unlike the usual engines, Imixs workflow is characterised by strong support for user-centric.
Human-centric business process management means supporting human skills, activities and collaboration in a task-oriented manner. With such a Workflow engine you can protect and securely distribute business data within an event-driven BPM architecture based on the BPMN 2.0 standard.
The Imixs-Workflow engine is open source and can be integrated in Jakarta EE oder deployed out of the box with a Microservice running in a Docker container
Take a look at Zeebe.io - a modern, cloud-native workflow engine with first-class Node.js support.

Are there any workflow engines in existence that don't use BPMN and BPEL?

Our business is planning on building a rather large business application with about 2000 or so users.
Many objects in the system require a mildly complex series of approvals, notifications, etc.
For various reasons, our company has decided to reject formal use of BPMN or BPEL. What I am looking for is a workflow engine that I can pass these objects to as a means of facilitating, tracking, and managing the state of these objects. We are implementing this project using EJB 3.1 with a WebSphere AS.
Am I correct in my understanding of a workflow engine? Everything seems tied to BPMN or BPEL...am I just missing something here as to why most solutions seem to implement BPMN or BPEL? Some advice would be wonderful!
Workflow engines typically take an active role in an enterprise architecture. They execute a declarative process model, which is basically a directed graph consisting of nodes, which represent activities or tasks and edges, which represent the control flow between these edges. Such edges can be annotated with conditions to allow for expressing conditional branching/merging. There are several modelling languages around, like YAWL, XPDL, jPDL, BPEL and BPMN 2.0, which sit on top of these abstract concepts and some syntatic, visual and functional sugar, but only the latter are official industry standards. This is important to avoid vendor locks, make models interchangeable (at least to a certain extent), supportable by experts and different tools. During runtime, process instances are created based on a process model and are executed according to the control flow defined by the model. So the engine actively navigates from one activity to the next activity and thus "orchestrates" your business logic. The main difference between BPMN 2.0 and BPEL is that BPEL is tightly coupled to Web services, i.e. business functions to be invoked by activities are supposed to be rendered as Web service. So if you want to orchestrated WS-* services, it is still the best choice since BPMN 2.0 lacks well-defined and standardized bindings to concrete service implementations. In any case, I'd strongly recommend to use one of the standardized languages since they are both broadly accepted in industry and well supported by various vendors and open source communities.
I tried to explain that in more details because I was not entirely sure about what you mean by "facilitating, tracking, and managing the state of these objects". This sounds a little bit like you are more interested in passively monitoring an object's state change as opposed to actively controlling state changes using a workflow engine. If this assumption is right, then perhaps a abstract state machine would fit your needs better.
Take a look at jBPM5, it provides a very flexible core that allows you to build your own domain specific language on top of it. Right now the language provided is BPMN2, but you can easily add your own.
Cheers
We are building a product that has a migration path for BPMN 2.0 but does not - internally, use BPMN. We believe checklists are much easier to use in real-time workflows than flowcharts. Is still however, has rules/triggers/conditionals and more - so it's a tool that effectively models processes as "checklists on steroids":
Check it out at http://tallyfy.com

Is Windows Workflow Foundation compliance with WfMC Standard?

Is Windows Workflow Foundation compliance with WfMC Standard?
http://www.wfmc.org/wfmc-standards-framework.html
You are mixing different concepts and so your question doesn't make sense.
XPDL, just like BPEL, BPMN, among other standards, are no more than notations developed to represent workflows through text (usually XML) or graphically, using diagrams.
That being said, WF4 is an .NET API which sits below standards, allowing you to implement any chosen standard, such as WfMC Standard: XPDL.
WF4, also in comparison with WF3, is a highly flexible and extensible API which gives you the freedom, at least in theory, to implement every type of workflows you can imagine with more or less code, depending on the task you want to achieve, and supporting scenarios ranging from human workflow (this is a case-scenario where WF4 is really good, because with workflows that can take days, weeks or even months, its persistence implementation is almost transparent to the developer) to system centric workflows (for example small workflows that can be called as WebServices). Services like workflow monitoring are also easily implemented.
All this with a workflow designer which is implemented natively within VS-2010 and that can be rehosted on any .NET application just like any other UI-Control and which translates said workflows to XAML automatically.
I hope you have perceived the difference of the two concepts because you can't really expect WF4 to follow any Workflow Definition Standard when it is just an API.