Re: [rules-users] Private message regarding: [drools-usage] Update data model in Drools Workbench
I don't know KIE Server very well. What is this "InstallRequest" of which you speak!?
I assume KIE Server's artifact resolution mechanism is vanilla Maven, in which case whether you want to install or deploy depends on whether KIE Server is running on the same host as your local Maven repository.
If it is; then install should be sufficient; as Maven (used by KIE Server) will first try to resolve artifacts against the local repository. If not; then Maven will fail to resolve locally and try the configured remotes.
I don't know the life-cycle of KIE Server's "container" so an answer for that needs to come from my colleagues.
Thanks for the reply. The jar file is already been installed into m2 repository on KIE server. Here is the folder structure of m2 repository after each install. I am using InstallRequest API to install the jar and pom artifact. Do I need to Deploy as well? I disposed the container and recreated it again... No new rules were applied...
Seems like you're using KIE Server? Is it KIE Server that is not "seeing" the revised Snapshots? What is the maven refresh policy for snapshots on the server running KIE Server? It'll only detect updates once a day by default.
I followed your solution to auto generate kjar. I added the dependency and install the jar using Install to KIE's maven repository. Each time new timestamp is added to pom.xml of the kjar. After install, the container is disposed and recreated as well. But it will only take effect after a restart. I am using latest JBPM 7 Beta8
I have uploaded a jar containing my data model to workbench through "Artifact repository" and set the version to "1.0-SNAPSHOT". Then I added the jar as a dependency to my project and I have built some rules with it ( no need to add the jar to "Config" because the class inside jar is in the same package ).
Now I want to update the data model. After I generate a new jar with the new data model (added a new property) and upload it again through "Artifact repository", I want to see the new field when I try to update a rule. ( I didn't add the jar to dependency list of the project again because the first time I have set the version to SNAPSHOT, so it should take the right one, and it does, but not the way I want it).
I don't see the new field added nor when I refresh the project or refresh the page ( CTRL+F5 ), but I do see the field if I close the running instance of Workbench + Server ( CTRL+C on command line ) and start it again. ( I use the workbench and server on the same PC and opened them with one command ).
I really need to do the refresh programmatically, without the need of restarting the running instance of workbench + server. Can you give me some guidance ?