Matthieu,

Comments inline....

Matthieu Riou wrote:
Hi guys,

I've done a few additional stuff on the BPEL implementation allowing a BPEL
file to be compiled by ODE upon deployment. The implementation is therefore
created and initialized with most of what would be needed by the runtime.
However there's still a couple of problems with resolution and finding my
way inside Tuscany code isn't that easy.

To resolve the WSDL implemented by the process I've been trying to go
through the resolution mechanism and declare the implementation I return in
the read() method of the processor as unresolved.

I've done the Spring implementation type which has some characteristics similar to that of your BPEL implementation type.

Take a look at the implementation-spring module in Tuscany SCA. The relevant file is SpringArtifactProcessor...

There read() is called and a SpringImplementation returned which is unresolved (see line 139) and then resolve() is called later, resulting in the Spring application context getting loaded and the Spring runtime initialized.

PS You might like to rename "BPELImplementationProcessor" to "BPELArtifactProcessor" to make it clearer what that class does - it processes an <implementation.bpel.../> element in the composite file (we refer to that as the artifact, rather than the implementation.

However the resolve()
method is never called afterward and this results in a NullPointerException
in Tuscany as the InterfaceContract is never set. From what I could make out
of the code, it seems that the resolution mechanism happens for Interface
processors but not of implementations, but I could be wrong.

Well, it definitely works for the Spring implementation, for sure. If resolve is not being called, then there must be something odd about the implementation object that you return.


AHA - yes there is something odd!! Go look at these lines in BPELImplementationImpl:

    public boolean isUnresolved() {
        // The sample BPEL implementation is always resolved
        return false;
    }

...notice that is always returns "false"  !!

So your implementation type always says that it is resolved. No wonder resolve() does not get called. Change the code here to return the value of some boolean field which gets set by setUnresolved() - setUnresolved() also does nothing at the moment....


I've created a patch that adds the BPEL compilation and demonstrates the
problem using the test case. Please have a look at
BPELImplementationProcessor, you'll see how the implementation is built.
You'll also see that the BPEL file from now is directly loaded using an
additional "file" attribute. Ideally that should go as well to use the same
type of resolving as for the WSDL (when it will work).

Some help regarding this would be definitely welcome...

Thanks,
Matthieu


Yours,  Mike.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to