0
votes

I am using the KIE Drools Workbench (with Tomcat7). This is part of the process for evaluation of Drools for an upcoming project.

I have the following doubts:

  1. In the Data Modeler option here, I want to know if I can add methods to my Java Objects.

  2. The Drools workbench stores all the project work to a GIT Repository. Can I cut this GIT connectivity and have all project work saved to my files directly.

Thanks in advance for the help.

1
Yes, you should be able to disconnect and work locally. Just clone the repository and work on it,Abhishek
Looks like this does not work for me. I did a "git clone" and things do not get saved.Anwar Khan
To get latest code you have to clone again-and-again. Can you share the process how did you cloned it?Abhishek
Exactly. I know that I have to clone again and again. But that does not look like the right way. Ideally cloning again is not the right way. I did try a GIT PULL, but this does not update my code base. However, GIT PULL shows me changes in the GIT LOGAnwar Khan
I don't think without being connected GIT you can get latest code. My suggestion would be to get stable version and then work on it offline.Abhishek

1 Answers

0
votes

1- Yes, in community version 6.2 it's possible to add your own methods both in drools-wb and kie-wb. In order to do that you have basically 2 options.

1.1: use the source tab.

 (note: unless you have admin or developer role, the source tab will work in read only mode)


1.2: clone the git repository where your project is, modify the given files and push the chages to the server again. (see below)

2- The workbench works on top of a VFS, and current versions and future ones are delivered with a Git based VFS implementation. So basically what you see is that the workbench works with a git repository. Even if it's theoretically possible to provide some other VFS implementations it's not an easy task. Said that, you can't cut this GIT connectivity. But given that the workbench internally starts a GIT service you can allways clone a given git repository in the workbench and have access to the needed files. In fact you can excecute the most common git commands.

Here's an example of how you can clone a git repository in the workbench.

git clone ssh://admin@localhost:8001/uf-playground

Finally it's worth to say that Data Objects are tipically POJOs (with some annotations) intended to be used in the context of rules and processes for carrying data. We should avoid to add methods like "sendAnEmail()", "doComplexLogic(), etc.