cmds.add(CommandFactory.newSetGlobal("myGlobalObj", new MyObject("myglobalObj")));
MyObject myObject = new MyObject("obj1");
cmds.add(CommandFactory.newInsert(myObject));
cmds.add(CommandFactory.newFireAllRules());
AsyncBatchExecutionCommandImpl batch = new AsyncBatchExecutionCommandImpl(cmds);
ExecutionResults results = ksession.execute(batch);