Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpel-dev] BPEL model with Teneo/Hibernate

Hi all, first of all thanks Bob, I'm able to solve this step, in practice it was enough to override the MappingContext class and register it through the Teneo extension manager:

 

...

final ExtensionManager extensionManager = hbds.getExtensionManager();

extensionManager.registerExtension(MappingContext.class.getName(), CustomMappingContext.class.getName());

...

 

...

public class CustomMappingContext extends MappingContext {

                @Override

                protected String getInstanceClassName(EClass eClass) {

                               String instanceClassName = super.getInstanceClassName(eClass);

                               if (eClass.getName().equalsIgnoreCase("Property"))

                                               instanceClassName = "org.eclipse.bpel.model.proxy.PropertyProxy";

                               if (eClass.getName().equalsIgnoreCase("PropertyAlias"))

                                               instanceClassName = "org.eclipse.bpel.model.proxy.PropertyProxy";

                               ...

                               ...

...

 

I now have virtually the entire model completely persisted to the database. The next step I need to develop is to open the BPEL editor to edit the process resource contained in the main model. I quickly tried to add a BPEL file and open it with these instructions:

 

IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();

IWorkspace ws = ResourcesPlugin.getWorkspace();

IProject project = ws.getRoot().getProject("EmptyBPELProject");

IFile file = project.getFile("/bpelContent/HelloWorld.bpel");

IFileEditorInput input = new FileEditorInput(file);

IDE.openEditor(page, input, IBPELUIConstants.BPEL_EDITOR_ID);

 

and it works perfectly. Is there a straight way to open the editor from the Process object contained in my model? The only solution is to create fictitious resource and then pass them to the editor?

 

Thanks again.

Giovanni

 

Da: bpel-dev-bounces@xxxxxxxxxxx [mailto:bpel-dev-bounces@xxxxxxxxxxx]
Inviato: venerdì 16 settembre 2011 17:00
A: BPEL Designer project developer discussions.
Oggetto: Re: [bpel-dev] BPEL model with Teneo/Hibernate

 

Hi Giovani,

I'm not familiar with Teneo at all, but you may want to look at org.eclipse.bpel.validator.EmfModelQuery as an example of how those proxies are used.

HTH!

________________________
Robert ("Bob") Brodt
Senior Software Engineer
JBoss by Red Hat


Hi all,

 

I'm creating an application based on EMF technology I'm trying to integrate with BPEL ecore model. In particular, I declared in my model a reference to the BPEL Process. After setting all the correct references and imported their referenced genmodels are perfectly able to generate the portion of the model code that I needed. Now I'm implementing the persistence layer through the use of Teneo and Hibernate and I have some difficulty. In practice the DataStore object fails because Teneo raise an exception when accessing to the "PropertyImpl" class. Most likely the error is due to the fact that in the “org.eclipse.bpel.model_0.5.0.jar” there are two restrictions in "org.eclipse.bpel.model.messageproperties.impl" and "org.eclipse.bpel.model.partnerlinktype.impl" subpackages. Analyzing the source code I realized that access to such classes is guaranteed by the presence of some objects that serve as proxies to these portions. How do I inform Teneo of this presence? Or should I use a different approach? Someone else has already had to do with architecture similar to mine?

 

Thanks a lot.

Giovanni


_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev

 


Back to the top