Error importing Rule Design Project in IBM ODM - ibm-odm

I am trying to import a rule design project into Eclipse, but Eclipse is importing the BOM, XOM and Rules folders as three different projects. Please help

It is typical for an IBM ODM implementation to consist of separate Eclipse projects for the BOM, XOM, and rules. Typically, the XOM project is a Java project, containing the Java classes that make up the execution object model; the BOM project is a 'Rule' project, containing the business object model; and the rules folder is a 'Rule' project, containing the business rules, rule flows, and other rule elements. All three projects work together to form a Decision Service or Rule App that can be deployed to the rule server.
So, I would say there are no problems with what you describe and that you are off to a good start!

Related

What all do i need for using drools with spark for managing rules?

I have to set some filtering conditions base on business given values. I am thinking of using drools for this but the documentation is very complex and has too many components. Which components do i need to use drools as rules engine. My understanding is that i need drools engine which is the core part and drools workbench which is a GUI to set rules I also have KIE execution server deployed on tomcat server but do i need this?. Is this correct do i need anything else?
If you can define your business rules as part of the source code then you can simply embed the Drools engine in one of the jars included with your Spark job. You'll simply need to include drools-core, drools-compiler, kie-api, and kie-internal in your dependencies.
If you need your business people to author these rules, or the rules need to be able to be redeployed without rebuilding/redeploying the application, then you will need the workbench.
I installed kie-server and kie-workbench.
kie-workbench is a UI and allows following
1. Creation of a project/container
2. creation of rule or guided rule
3. creation of data objects which are like POJO objects.
4. deploy created project/container to kie-server
5. and also lot of other things which i did not explore.
kie-server is component which
1. accepts REST requests to manage or execute containers
I created required rules in kie-wb and deployed them onto kie-server and then made rest requests to kie-server from my program and received xml response after all rules are executed.
I followed the following links
http://www.mastertheboss.com/jboss-jbpm/jbpm6/running-rules-on-wildfly-with-kie-server
http://mswiderski.blogspot.in/2015/10/installing-kie-server-and-workbench-on.html

JHipster, Customization of generated code

i'm newbie in JHipster and i'm trying to figure this, when i create a new entity JHipster generates several files, angular, html and java classes, now if i want a common code for all this generated code i must edit each time that i use the yeoman generator? what i want is:
Custom Index template, and pages, is secure to edit them?.
Customize the entity tables, entity forms using angular, maybe extending yeoman generators
Customize generate java classes, maybe i think using AOP
So i need to edit each time for each generated code? and is a good practice this or what i want? for clarify more i want to use a Custom Bootstrap/angular Dashboard template like Minovate, i see how to customize bootstrap in the documentation but not about what i'm asking for, Thanks.
JHipster is just a code generator, once generated the code is yours.
For angular screens I would say do as much as you can in CSS/SASS.
But it's very likely that you will need to build some screen mixing several entities and change the structure of entity screens.
So you should rather consider them as a starting point and do your own stuff in another folder so that it does not get overwritten by next re-generations.
This way you can still update your entity definitions in .jhipster folder and re-run yo jhispter:entity <entity name> on the entities you modified.
Customising java Entities is usually much simpler and you can easiliy achieve this by merging generated code with git and defining your service classes.
AOP seems overkill here.
Extending a yeoman generator is a lot of work.
I suggest to use some VSC (git, subversion or whatever you like) have a branch dedicated to plain jhipster generated code and another one where you make customization.
Eventually regenerate on jhipster branch and merge back on yours.
You should at least reduce manual intervention.

Entity Framework 6 Code First Migrations using Identity user models in a separate project

Is it possible using EF6 Code First and MVC5 to put all the models, views, and controllers that involve ASP.Identity into its own class library project. So that over multiple web applications you could use that same DLL and already have all the views / controllers / models and be using the same security database for multiple applications?
We have several web applications with separate databases and one security database that handles all of them, and we weren't sure how to keep this model now that we're moving to EF6 Code First and MVC5.
If it is possible could someone point me to a tutorial of something similar or give me a basic outline of steps to go through?
Or if there is a better way to achieve my goal, of having one set of code to handle ASP.NET-Identity security that I can plug that dll into multiple web applications and get the same logic and databases?
Or is this not a good idea in general?
Very open to suggestion and advice. I appreciate it.
Yes it is. We do this with every project that we have. The structure is very simple. Just create a class library project to your solution, add EF to the project, then reference the class library from your main project.
If using Code First Migrations be sure to select the class library project as the default project in the Package Manager console when running migrations or adding migrations.
Here is a pseudo solution structure for your solution
MySolution
- MyWebApp
reference: MyDAL
-MyDAL
reference: EF6
The advantage that I find to this is that you can then reference the "DAL" class library from say a companion console application or windows form application, or a companion website, even in a different solution, and they will use the same code base.
For example:
MySolution
- MyWebApp
reference: MyDAL
- MyDAL
reference: EF6
- MyOtherWebApp
reference: MyDAL
NOTE: Your data context will look for its connection string in the Web.config or App.config in the startup project. NOT the class library. This can be confusing at first... But once you think about how .NET compiles the application together into the final package, it makes sense.
If you're talking about creating one class library for an entire data layer shared between multiple projects, then that's easy enough. You can move all your models, your context, etc. into a class library and run migrations using the class library project. The other projects will just reference that class library and not have migrations of their own.
However, if you're talking about multiple databases and associated data layers, where project Foo has its own models, context and migrations and project Bar has its own models, context and migrations, while the class library has just the IdentityUser and IdentityDbContext, things get a little more complicated. You won't be able to combine any of these contexts. So in your Foo project you'd have to instantiate your context for Foo and your Identity context if you need to work with both. It's not a problem, per se, but it's something to be aware of.

Why would the RIAServices.EntityFramework NuGet Package break context class code generation?

I have an existing project using RIAServices with Entity Framework. The project builds correctly and generates the AmsiWeb.g.cs file with all the context classes for my services.
I am converting my designer based entities and ObjectContext with Code First entities and DbContext. I installed the RIAServices.EntityFramework NuGet package to the web application that contains my services. However, now when I build the AmsiWeb.g.cs file only contains the WebContext class. It doesn't contain any generated services.
I have only at this point converted a single EDMX model to Code First and DbContext and made the requisite changes to the services that use that model to inherit from DbDomainService.
I am using EF 5.0... not sure if that matters cause I'm not sure how adding a DLL to the AmsiWeb application project would break code generation.
What would cause this to no longer work and how can I fix it?
Maybe it's a problem within the msbuild task that generates the proxy code (I mean the *.g.cs file). Probably it's looking for the wrong version of a entity framework. Have a look at this blog post http://mcasamento.blogspot.it/2012/10/entity-framework-5-code-first-and-wcf.html in the final part I wrote an assembly redirect statement that did the trick
It turns out that their needs to be a redirect for Entity Framework 5.0 (4.4.0.0 since I was using .Net 4.0) in the web.config. But, since my RIA Services were in a web application project that was not my root project the code wasn't generating.
Once I added the redirect to the web.config of the web application with the RIA services in it, the context code was correctly generated.

Multiple wsdl and xsd files... into a single wsdl

Probably is a straight-forward question: do you know any tools for combining multiple wsdl + xsd files into a single wsdl?
Thank you.
Edit1:
The service is a WCF service, and I want to have a single wsdl for PHP (as client).
Edit2:
Too bad I need to use .Net 4.0 and not 4.5 where this would be possible. Maybe I could borrow then one of the new MS tools? Do you know which one? Is the svcutil.exe the responsible tool? If yes, what are his dependencies? Because I don't want to jump to .Net 4.5 just yet.
You can build a small application that can generate a flat wsdl. We do generate flat wsdl programatically in C# for building interoperable WCF services. Refer to the link on how to generate flat wsdl.
Hopefully seeing the code you can build a tool that does it for you.
Else you can manually do it using Altova Xml Spy and replacing the xsd import attributes by the xsd schema definition.
For sure, I can recommend a tool that can combine multiple XSD files into the minimum set possible (I am biased here, since I wrote it). This in itself can be a heavy task, if you have a large number of files, many namespaces, or both. The things might get trickier for multiple WSDLs into one, depending on some parameters you may have configure; for example, is it logically one WSDL authored over three layers that maintains separation of messages - portTypes - services, or multiple WSDLs, period? One thing you must ensure is that all share the same types subsystem, there's no conflict for operations, etc. But even this is a task that could be achieved, I could easily put an addon out... If this is refactoring of XML Schemas and WSDLs you see doing often, let me know.
We wanted one wsdl file to make use of some tools to automatically generate soap proxy on PHP side. But we ended up writing the DTO layer manually.
If you have wcf service in .NET 4.5 you can get easily only one wsdl file (inbuilt feature of WCF framework).

Resources