I have an Application which is Based on Spring+ Hibernate + Drools. It has static *.drl files. My Question is
1 ) How can i wrap the rules with Guvnor UI ?
2) Is it possible that if a user changes any rule, without redeployment we can use it or fire it. If yes than from what path should i pick my rule ?
My main aim is to keep Rule+ Guvnor in a single module , and the Application which uses and fires rule as different module. So on the fly i can change the rule in Guvnor and it get reflected in the Application ?
1) You can import the rules into Guvnor. Create a new package, select that you want to import from a DRL file. This expects just one file. If you want to import in separate files, pick one and you can add the rest of the DRL rules as technical rules later. Or you can merge the DRL files before importing.
2) Check the documentation for KnowledgeAgent. KnowledgeAgent polls Guvnor for changes in the knowledge packages and helps you update the rules in the module that you want to use for firing the rules. You still need to compile the packages in Guvnor.
Related
I am using gradle 6.8 and MarkLogic version is 10.0-5.2,
My XQuery code is in directory \ml-gradle\src\main\common. When I run the command mlLoadModules to load XQuery into the modules database it loads with default URI /common/test.xqy.
I want to add some prefix to the URIs e.g. /rsc/common/test.xqy. How can I achieve that?
Note: I don't want to create an extra folder in my source for prefix "rsc".
It's not supported, though you could write a custom Gradle task to change the URI to whatever you like.
Why do you not want to create an "rsc" folder above "common"? I think other developers would find it much more intuitive that "rsc/common/test.xqy" becomes "/rsc/common/test.xqy" when loaded, rather than "common/test.xqy" becomes "rsc/common/test.xqy", which begs the question - where is "rsc" coming from? And then that developer would need to understand what property / custom code is adding that "rsc".
I want to add customized java rules in sonarqube. I have googled it and found that we need to make a pluggin for that. But can't find any proper link describing to make the rule. Any help would be appreciable.
You can follow "Writing Custom Java Rules 101", which describes how to make a sonar-packaging-maven-plugin artifact.
When implementing a rule, there is always a minimum of 3 distinct files to create:
A test file, which contains Java code used as input data for testing the rule
A test class, which contains the rule's unit test
A rule class, which contains the implementation of the rule.
As mentioned in "Custom Rules for Java", To go further, you can explore a sample plugin containing other custom rules.
This project can be browsed or downloaded.
Is there any package like CodeSleeve/asset-pipeline for laravel 4 where you have:
-concatenation
-minification
-add resources at runtime from Views/Controllers
-adding on a file by file basis
Asset-pipeline is great for the most part, but the only way to add specific files is using a manifest.
You can listen for the asset.pipeline.boot event and add whole folders for the pipeline to auto load but this is not what i need.
Event::listen('asset.pipeline.boot', function($pipeline) {
$config = $pipeline->getConfig();
$config['paths'][] = 'some/special/javascripts'; // this must be a folder
$config['paths'][] = 'some/special/stylesheets'; // this must be a folder
I've also seen a previous topic very similar to this one Laravel replacement for Asset::add but they don't have concatenation of resources, are no longer maintained or have external dependencies like node/ruby and can't be used on runtime anyway.
I'm currently following the Laravel Package documentation, which uses the workbench tool to create a standard package tree consisting of controller, config, views, etc. folders. Basically, most folders you would get in a standard Laravel app tree.
However, I had a couple of questions:
Why is the models folder absent here? (though the same goes for tests and commands)
Should I just create the folder myself and add it to the composer.json autoload classmap?
What classes should live inside src/<Namespace>/<PackageName>? I have noticed that a ServiceProvider is automatically created here, but I can imagine most other files just existing in the standard package directories.
Wockbench represents just a tool for creating other tools, that is triggered through CLI. Workbench is very abstract concept.
Model folder is absent simply because you don't need model in every new package. For example, if you are creating middleware package or you own filter package.
Every new class can be added to package dependent on its purpose and responsibility. It can be done in more then one way.
Classes that are general enough to go into every package are:
Package Service Provider
Facade
Basic Class
But it is not a black box. Consider for example request class - it is bound very early in the application life cycle, so no provider is needed.
I am looking at zfmodules to get a datatable module, and have found the perfect one :
https://github.com/dudapiotr/ZfTable
..however there is very little explanation of how to configure it into an existing project, change the data source etc.
Does anyone have any experience of this module, or is successfully using it in production?
The thing that i understood from Question is " You want to inject this
Module in your current Application ", well i have checked the link [https://github.com/dudapiotr/ZfTable][1] and the module seems perfect to inject to your Application. *The only thing which seems unfitting is the 'data' folder, you should compile
'customer.sql' onto your database, and then remove the folder 'data', since it does not matches to the framework structure
**Try these steps **
*
create your sql database exactly as mentioned in customer.sql
copy this module to your application, with other residing modules (if any).
Add the module name to application.config.php in Application/config/autoload directory ( since you are adding module manually, you must add your module name there by yourself)
And last, Routing configuration of your module in Application/config/module.config.php
if you need any help in routing of step 4, go here [Zend framework not able to route the translated child routes
*