So let’s start with short recap on how the deployment model look like in jBPM 6. In version 5.x procedures were stored in so called packages made by Guvnor and then downloaded by jbpm console for execution using KnowledgeAgent. Alternatively one could drop their process data files (bpmn2 data files) into a predefined directory that was scanned on the jbpm system start. That enforces users to use Guvnor when dynamic deployment was needed always.
Although there is certainly nothing incorrect with it, actually that was suggested approach however, not everyone was happy with that setup. Version 6, on the other hands goes from proprietary packages and only away, well known and mature, Apache Maven centered product packaging – known as knowledge archives – kjar. Exactly what does that mean?
First of most, processes, guidelines etc (aka business assets) are now part of a straightforward jar document built and maintained by Maven. Along the business assets, java classes and other file types are stored in the jar file too. Moreover, as any other maven artifact, kjar can have described dependencies on other artifacts including other kjars. Why is the kjar special when compared with regular jars?
- A manager should have a limited roster of clients and not be spread too thin
- Hotel or Motel Manager
- Political Science
- Move applications to cloud-based services
- Manage your business as if you experienced expected it to live forever
- Contact information for your business
It is an individual descriptor file held inside META-INF directory website of the kjar – kmodule.xml. By default, this descriptor is unfilled (just kmodule root element) and is recognized as marker file. Whenever a runtime component (such as jbpm system) is approximately to process kjar it looks up kmodule.xml to construct its runtime representation. See documents for additional information about kmodule.xml and kjars. Alright, now we know bit more about what is placed on runtime environment – kjar actually. So how we can deploy into running jbpm console kjar?
The simplest way is to actually use jbpm system to completely build the kjar. For this purpose there is certainly whole perspective available – Authoring perspective – that contain quite big set of editors customized for various asset types. First, you have to have repository created where your projects (once they are built they become kjars) will be stored. When operating the demo set up of jbpm console (installed by jbpm installer), you will have two repositories available – jbpm-playground and uf-playground already.
You can use any of these or create new repository. Once you have repository available, create new item – a project – you need to specify GAV (GroupId, ArtifactId, Version) to name your project. After that you create business possessions in it, like business procedures, guidelines, data model, forms, etc. And today we are in the main point where we should build and deploy our task into runtime.
Nothing simpler than that – just press “Build & Deploy” button and you’re ready to rock! Is that basically that simple? In the majority of the cases, yes, it is that simple really. But you have to be aware of several rules (convention over configuration) that drive the build and deploy. First guideline is that everything must be properly designed – processes, rules, etc – that is the build phase that catches any compilation or validation errors and provides feedback to the user via Problems Panel.