Git notes: Do not use "git push --force", ever
                                
                                
                                
                                    
                                        by Geoffrey De Smet
                                    
                                
                                
                                        The command "git push --force" is really bad (commits get lost) unless 
you exactly know what you're doing.
So if you ever have the option in your Eclipse/intelliJ to "force" a 
push, don't do it.
-- 
With kind regards,
Geoffrey De Smet
                                
                         
                        
                                
                                14 years, 10 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Drools -- How to integrate the rules written in java to the drools.
                                
                                
                                
                                    
                                        by bhargavi uppu
                                    
                                
                                
                                        
I have set of bussiness rules for a page. I have written 4 java classes for
the bussiness rules. My question here is how to make these rules run using
the drools tool. In the sense, after adding the drools plugins in eclipse
IDE I need to make the changes in ruleflow.rf? How exactly to do?
 For example in the ruleflow.rf I can see start --->Hello --> End flow
chart. After that if I want to execute the scenario like after starting I
have to run rule1 and rule2 java classes one after the other and then the
process should end. 
Could you please help on the same as I am new to drools.
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-How-to-integra...
Sent from the Drools - Dev mailing list archive at Nabble.com.
                                
                         
                        
                                
                                14 years, 10 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Getting started with git on drools for svn guys
                                
                                
                                
                                    
                                        by Geoffrey De Smet
                                    
                                
                                
                                        
      Purpose
This document shows you how to use Git, just as you were using SVN in 
the past. It is to get you guys up and running with git as soon as 
possibleby relying on your SVN knowledge and it is focuses on what you 
want to do in drools.
This document does not reallyteach you Git.Git is not just SVN++, it is 
much more and you should take some time to learn that too.
      Terminology
SVN trunk is renamed to Git master. A branch is still a branch. A tag is 
still a tag.
Translation note: trunk == master
The SVN central repository is now the referencerepository on github, see 
https://github.com:droolsjbpm/droolsjbpm 
<https://docs.google.com/document/d/1xfC_R61ASX12zfgmarR_3leTjG8paUmO9q5qN...>.
    Part 1: Need to know
      Preparation
If:
    * you’ve done the preparation in the dev list mail
          o and the correction too, skip to section Getting the source
            code locally.
          o haven’t done the correction yet, do this first (and the skip
            to that section):
                + Step 4 stated:
                      # $ git config --global user.name myUsername  // WRONG
                + Correct that by running:
                      # $ git config --global user.name "My Name"
                      # $ git config --global -l
    * you haven’t done the preparation yet, do it now, as stated below.
Full preparation:
    * 1) Install git for your OS
          o 1a) Linux: Install the package git (and optionally gitk)
                + $ sudo apt-get install git
                + $ sudo apt-get install gitk
          o 1b) Windows: Use the icon on the right
            on<http://git-scm.com/>http://git-scm.com<http://git-scm.com/>
          o 1c) Mac OSX: Use the icon on the right onhttp://git-scm.com
            <http://git-scm.com/>
                + Optionally install gitx fromhttp://gitx.frim.nl/
    * 2) Install git in your IDE
          o 2b) Eclipse: Install the EGit plugin.
                + Menu Help, menu item Install new software.
                + Work with update site Helios, open Tree item
                  Collaboration, tree item Eclipse EGit.
          o 2c) IntelliJ: Enable the git plugin (if not enabled):
                + Menu file, menu item Other Settings, menu item
                  Configure plugins.
    * 3) Get a Github
      account:<https://github.com/signup/free>https://github.com/signup/free<https://github.com/signup/free>
    * 4 <https://github.com/signup/free>) Configure git correctly
      (Github also tells you this):
          o $ git --version
          o git version 1.7.1
          o $ git config --global user.name "My Full Name"
          o $ git config --global user.email myAccount(a)gmail.com
            <mailto:myAccount@gmail.com>
          o $ git config --global -l
          o user.name=Geoffrey De Smet
          o user.email=ge0ffrey.spam@...
    * 6) Push your public key to github:
          o Follow the instructions
            onhttp://github.com/guides/providing-your-ssh-key
      Getting the source code locally
First move your old SVN working directory aside, so you’re not confused 
that you shouldn’t work there any more:
$ cd projects
$ mv drools drools-oldsvn
Now you’re ready to get the sources with git. In SVN this is a svn 
checkout, but in Git this is called a git clone. Prefer the faster, 
stabler git protocol over the slower https protocol:
$ git clone git@github.com:droolsjbpm/droolsjbpm.git droolsjbpm
Next go into that directory
$ cd droolsjbpm
So what’s the command git checkoutfor? To switch to another branch, but 
in the same working directory. In SVN you also use svn checkoutfor that.
Translation note: svn checkout == git clone (new repository) OR git 
checkout (change branch)
Follow the instructions in the README.txt to set up your Eclipse or 
IntelliJ again.
      Getting changes from others
So Mark and Edson changed something in drools-core in the reference 
repository. How do I get those changes? In SVN this is svn update, but 
in Git this is a git pull.
$ git pull
Translation note: svn update == git pull
      Making changes
While making your changes, do the same as in SVN: git add, git 
rm(instead of svn delete), git status.
Translation note: svn delete = git rm
After making your changes, you ‘ll want to do a git commit(when you’re 
done with a changeset) and a git push(to share those changes with the 
rest of the team). To recap: doing a git commitdoes not push your 
changes to the remote repository yet, you also need to do a git push.
$ git commit -m “JBRULES-123 fix testcase”
$ git push
Translation note: svn commit == git commit + git push
    Part 2: Tell me more
      Extra terminology
What is rebasing? A rebaseis an alternative manner of merging: instead 
of merging your changes with the incoming changes, it takes the incoming 
changes and applies your changes on top of that. For example:
$ git pull --rebase
What is origin? Because git can work with multiple remote repositories 
(usually forks of the same project), the default remote repository is 
known as origin. If you’ve cloned the reference repository, then 
originis the reference repository. If you’ve forked the reference 
repository as A and cloned A, then originis A.
      Branching
Usually we’ll have 2 types of branches: release branches and topic branches.
To switch to another branch, just use git checkout:
$ git checkout 5.1.x
To create a branch do:
$ git checkout -b 5.2.x
      Release branching
A release branches is copied from the master branch and only receives 
bug-fixes. It is separated from the master branch so no unstable 
features or improvements (pushed by other developers) leak in.
For example: $ git checkout 5.1.x
Cherry pickingis very interesting to pick bug-fixes from the master 
branch into the release branch.
      Topic branching
A topic branch is copied from the master branch and is eventually merged 
back into the master branch. Its changes are to disruptive to other team 
members to be committed to the master immediately.
For example: $ git checkout trueModify
Rebasingis very interesting when you’re working on an experimental 
feature in a topicbranch for the last few weeks and you want to have the 
latest changes of master(=trunk) in there too (= sync up with master):
// on my the myTopic branch
$ git rebase master
After your topic branch is stable, you’ll merge it into the master branch:
$ git checkout master
$ git merge trueModify
    Learn more
Do you want to reallylearn Git?
Read the Pro Git book (freely available online):http://progit.org/book/
You’ll easily gain the time you spend reading that book, because Git is 
more than SVN++.
Read that book, especially if you’re going to do branching and merging!
Other references: Hibernate git tricks 
<http://in.relation.to/Bloggers/HibernateMovesToGitGitTipsAndTricks>, 
SVN crash course <http://git-scm.com/course/svn.html>, Git for Gnome 
developers <http://live.gnome.org/Git/Developers>, ...
-- 
With kind regards,
Geoffrey De Smet
                                
                         
                        
                                
                                14 years, 10 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Fire specific rules
                                
                                
                                
                                    
                                        by Benson Fung
                                    
                                
                                
                                        Hi,
I would like to file specific rules in Drools 5.1.  However, the
RuleNameEndsWithAgendaFilter no longer works in FireAllRules of Drools 5.1.
Please help
Thanks
                                
                         
                        
                                
                                14 years, 10 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Git migration update: Do not commit to subversion after 15:00 GMT Saturday 18-DEC-2010
                                
                                
                                
                                    
                                        by Geoffrey De Smet
                                    
                                
                                
                                        Hi guys,
I'm halfway through the migration at this point (r18000) after about 24 
hours of work.
So it will probably be around Sunday until the gates of git open if all 
goes well.
I 'll send instructions on how to use git asap after that. Be patient :)
Meanwhile I can officially postpone the last possible commit time on 
Subversion until 15:00 GMT (a couple of hours later than this mail), so
*Do NOT commit changes to subversion after 15:00 GMT Saturday 18-DEC-2010.*
-- 
With kind regards,
Geoffrey De Smet
                                
                         
                        
                                
                                14 years, 10 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Declared Fact integration with Java Application
                                
                                
                                
                                    
                                        by Benson Fung
                                    
                                
                                
                                        Hi,
I crated a declared Fact Model in the BRMS system(GUVNOR) and some rules.
And then I deployed in the GUVNOR.  Can anyone tell me how I can an object
of the fact model in the Java client application?  Please help
Thanks
                                
                         
                        
                                
                                14 years, 10 months