How to create KJar locally without using business central kie containers - drools

Do we have any documentation / suggestion available on how to generate/build Redhat Drools rules Kjar locally without using Business Central Kie-Containers ?
Any advice/help would be greatly appreciated.

To build kjars locally, use the kie-maven-plugin
See https://docs.jboss.org/drools/release/latest/drools-docs/html_single/index.html#_buildingwithmaven

Related

KIE Drool Workbench: Unable to get to workbench UI due to "Forbidden" screen

I have been trying follow the links and details available to set up a KIE Drools workbench for Drools like https://www.intertech.com/simple-setup-of-drools-kie-workbench-and-kie-server-in-one-wildfly-instance/.
From what I could analyze and read up KIE Drools Workbench will let me configure a rule engine through a front end and that Guvnor used to handle this aspect prior to workbench. These configured rules can be blended into my Spring Boot application to drive my loan application requirement. I hope that this understanding of usage of KIE Drools workbench is correct. Please confirm.
Below are the things I tried.
Set up KIE Workbench in Wildfly
Set up KIE Server in Wildfly
Getting them deployed I had to go through many issues which I was able to resolve like updating the jboss-deployment-structure.xml and executing using standalone-full.xml.
This is the UI I see now.
But for the workbench I am only seeing FORBIDDEN on screen.
Can you please suggest what can be done so that I can have the UI to create my custom rules.
Just thought of updating that I was able to resolve the issue I faced. The only thing to be done is to follow the link I shared word by word :) . The users were created as stated and the exact version of war files were used and I am now able to access the workbench. Now on I will be exploring the usage.

JBPM Workflow deployment

I am very new to JBPM and KieWorkbench ,infact from .net background.
I've installed JBPM 6 on my machine and have developed some guided rules and workflows using KieWorkbench.
On local I can easily create,run and Test workflows and Rules, because as I do ant start.demo all setup is done.
Moving forward now I've to deploy this on production environment and share the source code with team members.
Limitation is I cannot use Git.
Now I've 2 questions :-
1.How to deploy this on production?
2.How can I share code/project with my teammates.
Any help will be much appreciated.
Thanks in advance.
There was a similar question about using KIE Workbench in production environment. Look at my answer here. If you do not need GUI, I would recommend to use KIE Server for process execution. Unfortunately, it is not described in jBPM documentation but you can find it in the Drools one.
When it comes to sharing projects created in KIE Workbench, you can do one of these two things:
Clone a Git repository from KIE Workbench. It should be available on address git://localhost:9418/repository_name.
Deploy a project in KIE Workbench and find the artifact with your process and rule definitions in your ~/.m2/repository.
It may also be a good idea to have your development version of KIE Workbench deployed somewhere where others can access it and see your process definitions directly in this application.

Standalone example on jberet (jsr352)

Is there anyway to use jberet as standalone module to execute Batch Jobs?
All the time getting samples on using along with WildFly.
Surprised to see it looks for container to load implementations while trying some samples.
Any insights on why/why not would be helpful
Here is a tutorial how to use jberet in a standalone application:
http://www.mastertheboss.com/batch-api/running-batch-jobs-in-j2se-applications
You'll need to include various jboss dependencies for it to work.
Furthermore you need to configure jberet with a separate jberet.properties.
I've build a (hopefully) minimal example application according to the tutorial.
You can find it here: https://github.com/kaape/jberet-standalone-example
More information can be found in the jberet github repository:
https://github.com/jberet
I created a similar example but uses JDBC chunk oriented processing. https://github.com/lbtc-xxx/jberet-se-example
JBeret project test-apps sub-module (https://github.com/jberet/jsr352/tree/master/test-apps) contains various test apps that are structured as standalone Java SE applications (except restAPI where WildFly appserver is needed).
For JBeret + WildFly samples, please check out JBeret project wildfly-jberet-samples module:
https://github.com/jberet/jsr352/tree/master/wildfly-jberet-samples

Automated deploys JBoss/Tomcat

i'm looking for a tool to make remote automatic deployments in JBoss/Tomcat(under linux/unix) where a component is updated and version is incremented in my Artifactory.
For example.
I have an instance called 'A' under tomcat/jboss with the deployed component "my-plugin-1.0.jar" . Then I upload the component "my-plugin-1.1.jar" in artifactory, and after that, i need the automatic update of this new component in my application server.
Does anyone know any tool that can do this?
Thanks in advance
Kind regards
If you are into serious DevOps development, Chef or Puppet are your tools.
If you don't feel like writing Ruby scripts, ZeroTurnaround's LiveRebel is a way to go.

How to deploy rules from Drools Guvnor

I want to execute Drools rules via REST or SOAP.
I'm already using Drools Guvnor as facts, rules designer/repository. And it works just fine, but I haven't found any clear guidance on how to deploy these rules for execution.
I would be grateful if anyone points to tutorial.
Is it achievable without Eclipse?
If you're looking to execute Drools rules via REST or SOAP, look into Drools Server.
http://www.plugtree.com/drools-server-overview/
In this setup, your rules are actually executed on the remote server.
If you just want to use the built rule package from Guvnor in a standalone Java application, there is plenty of information in the Guvnor documentation that will show you how to use the URL where guvnor exposes your compiled package. See Chapter 9 for Knowledge Agent configuration.
http://docs.jboss.org/drools/release/6.0.0.CR5/drools-guvnor-docs/pdf/drools-wb-docs.pdf