BPEL apache ODe deploy - bpel

Could anyone point me how to deploy a BPEL in Apache Ode from java? Is there any convenient way to create the deploy.xml file and then deploy it? Creating it with plain XML and then saving to the process directory doesn't look nice.

For the deployment you can use the deployment API provided via Web service or the hot deployment (by copying the deployable to the processes directory).
There is no generator for the deploy.xml, however, the schema is straight-forward. ODE has a XMLBeans-based java object model in the bpel-schemas module (see org.apache.ode.bpel.dd.DeployDocument). The Eclipse BPEL designer also contains a EMF-based metamodel for the same schema and tries to guess some smart defaults based on the WSDLs used.

Related

ODM Command Line Build For Classic Rule Projects

I am using ODM 8.10 and want to automate building rule app files. The code is currently configured in the old Classic Rule Project, and we are trying to avoid migrating to Decision Services at this time. I have found build jars for Decision Services but nothing so far for Classic Rule Projects. There must be a way to do this as the rule app jar files are created in the eclipse IDE when you deploy/export a ruleApp. I am trying to find out the jar files the IDE uses and the commands it calls to execute the rule app builds.
Re: "There must be a way to do this"
But you will not necessarily have access to it. The ODM product developers have experience, source code, documentation, and other tools that you do not have access to.
Having said that, there is an build/deploy API that you may be able to access via ANT. I haven't used it since switching to Decision Services when that became feasible in ODM 8.7. Standard practice before that time was to automate deployments via Ant and a "headless" version of Eclipse. If the latest online docs don't describe it, you might try the older docs.
WARNING: Classic Rule Projects are a dead end! Not only will all your effort building them in a non-standard way be wasted, I believe that it will likely be more trouble than just migrating to Decision Services (which is not usually that difficult).

jHipster - simplify generation of the new APP if the DB already exists

does any tool exist that can simplify generation of the new APP if the DB already exists? I can create JDL file for new app manually base on existing DB - but I prefer to automate the process. This DB is part of old Spring Roo app.
Thank you.
The spring Roo 1.x version provides the "Database Reverse Engineering" functionality. This add-on allows you to create an application tier of JPA 2.0 entities based on the tables in your database. DBRE will also incrementally maintain your application tier if you add or remove tables and columns.
After generate the entities, you could execute the necessary web mvc commands to generate the complete application.
However, remember that the Spring Roo 1.x is not beeing maintained, because uses old technologies.
See more about the DBRE process here:
http://docs.spring.io/spring-roo/reference/html/base-dbre.html
Hope it helps,
There's a JHipster module that is being developed for this purpose: https://github.com/bastienmichaux/generator-jhipster-db-helper
It is probably not ready yet but could be a good start.

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).

Apache ODE example

Any good apache ODE example available?
I am trying to evaluate Apache ODE for an project. Please provide any references for learning
Apache ODE through samples/tutorials/guide.
Thanks.
You can try the examples shipped with ODE. Also, http://ode.apache.org/resource-services.html provides a list of tutorials that may help you.
I am working on Indus framework which makes it easy to use Apache ODE.
"Indus is a build system that integrates Apache ODE and brings together various
SOA components. It has a maven plugin that wraps the bpelc compiler - allowing
you to compile bpel files prior to their deployment. Furthermore, it creates a
process sub-directory that contains all the necessary artifacts for the
process's deployment (including deploy.xml - which is auto generated).
Additionally, all the dependent jars are placed a lib sub-directory and may be
deployed to ODE's WEB-INF/lib."
https://github.com/sarithi/indus/blob/master/examples/workflow/HelloWorldWorkflowService/mainline/src/main/process/SayHello.bpel

Resources