How to generate .bpel programmatically ??

Showing 1-3 of 3 messages
How to generate .bpel programmatically ?? Farida Sabry 3/4/13 1:08 AM
Have anyone managed to do this task .. I am trying to do the same to dynamically create a bpel process and deploy based on some inputs.. I tried the code mentioned
here (after importing a lot of jar files from eclipse plugins folder) but
with :
.put("bpel", new BPELResourceFactoryImpl());
instead of "xml" .....
and I am receiving the following exception:
java.lang.IllegalStateException: INamespaceMap cannot be attached to an eObject
at org.eclipse.bpel.model.util.BPELUtils.getNamespaceMap(
at org.eclipse.bpel.model.resource.BPELResourceImpl.doSave(
at BPELCreator.createBPEL(

Do you know how to solve this problem?? And if in the first sense, the org.eclipse.bpel.model API can be used programmatically to generate .bpel files??
Re: How to generate .bpel programmatically ?? Areeg Samir 5/8/13 8:07 PM
Check this answers may it help you:

Also you can try this code by Rajesh :
                 File bpelFile = new File("C:/temp_videos/echo_1.bpel");
                 URI bpelURI = new URI("file:///C:/temp_videos/echo_1.bpel");
                 FileInputStream fis = new FileInputStream(bpelFile);
                 javax.swing.text.Document myDocument=myloadSwingDocument(fis);
                 Lookup lookup = Lookups.fixed(new Object[]{bpelFile, myDocument,
                 ModelSource source = new ModelSource(lookup,true);

                BpelModelFactory factory =
                BpelModel model = factory.getModel (source);
                Process myProcess = model.getProcess();
                 myProcess.setName("NewProcess") ;
Please tell me if this help you.
Re: How to generate .bpel programmatically ?? Touhami Ben Aissa 4/8/14 10:42 AM
I'm looking for a solution to generate Java class from a BPEL process and I read that I can use BPEL2JAVA but I don't know how to use it , so if any one can help me I'll be gratefull.