2018/07/19

Easy Workitem installation (jBPM WorkItem Repository)

We added the ability to install workitems hosted by the  jBPM Workitem Repository on any running KIE Worbench instance directly from the repository. itself This lifts some limitations of installing workitems which was so far only possible from within process editors inside each running workbench. It also allows for future integrations with other runtime systems that can take advantage of the hosted workitems.

When browsing workitems inside the repository you will now find the "Install" column:

Install column - Repository homepage

Selecting "Kie Workbench" will trigger the installation modal:

Workitem installation modal

Here you can enter specific information about the running KIE Workbench instance such as URL, Username, Password, Space name, and Project info where this workitem should be installed in.

Clicking the Install button will install all workitem handlers from the selected workitem group to your workbench instance. Upon successful installation you should be able to see the installed workitem handlers inside the selected workbench project.

Install success message

Archive workitem installed in "myproject"


Once installed you can start using your workitems when modeling your business processes:

Start using the installed workitem!

Note that this feature is available only if you are running the workitem repository in "hosted" mode, so by hosting it via the repository-springboot, or the repository-wildfly modules. When serving the repository content from the file system the Install column will not be displayed. 

Another thing to note is that since in almost all cases your hosted repository will have a different origin(domain) than the running workbench instances you are installing workitems to we need to enable CORS on the servers the workbench is running on. If you are running on Wildfly, this can simply be done inside your standalone.xml config:

Wildfly CORS config

Don't forget to change the value of the "Access-Control-Allow-Origin" header to the domain where you are hosting your workitem repository. In this case we use the default http://localhost:8090 which is used when running spring-boot repository setup. 

Last thing to mention is that currently the KIE Workbench servlet filters do not handle CORS preflight requests unfortunately (hopefully this will be changed in the future). Because of this by default the workitem repository is not able to issue CORS requests to the workbench intances. To lift this limitation add this filter definition to your workbench web.xml and restart the server:

Filter definition within KIE workbench


As always feel free to leave any comments and suggestions. Enjoy!





No comments:

Post a Comment