Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [bpel-dev] PartnerLink Creation during the import

I would try to do it analogously as the default. That is:

In a Process named "Test", there is usually a "Test.wsdl" file (at least
when the process was created with the BPEL designer, this is what we assume
for now).

In BPEL, you programmatically add:

    <bpel:partnerLinks>

        <!--This is there by default -->
        <bpel:partnerLink name="client"
                     partnerLinkType="tns:process"
                     myRole="processProvider"
                     partnerRole="processRequester"
                     />

        <!--This is the new stuff you have to add-->
        <bpel:partnerLink name="newClient"
                     partnerLinkType="tns:process2"
                     partnerRole="processRequester2"
                     />

    </bpel:partnerLinks>

You can do this by using the BPELFactory to create a partnerLink object,
fill it as shown above, and add it to the Process' PartnerLinks.
You also have to modify the WSDL Resource in order to add the new
PartnerLinkType.

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PARTNER LINK TYPE DEFINITION
         the process partnerLinkType binds the provider and
         requester portType into an asynchronous conversation.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
    <plnk:partnerLinkType name="process">
        <plnk:role name="processProvider" portType="tns:process"/>
        <plnk:role name="processRequester" portType="tns:processCallback"/>
    </plnk:partnerLinkType>

    <!--This is the new stuff you have to add-->
    <plnk:partnerLinkType name="process2">
        <plnk:role name="processRequester2"
portType="myWSDLNamespace:myPortType"/>
    </plnk:partnerLinkType>

Do this analogously: Create a new PartnerLinkType Object, fill it, add it
to the WSDL Definition object. Then also save the WSDL. Once this is done,
the Partner automatically gets reflected in the tray.  You do not have to
mess around in the tray or even use command. Just add the things that you
want to the appropriate model objects and save their resources - that's it.

Let me know if you have further questions.

Cheers
Simon


Simon Moser, M.Eng.


                                                                          
 Websphere Integration       Mail:           IBM Deutschland Entwicklung  
 Developer Development       smoser@xxxxxx.  GmbH                         
 Team Lead BPEL Editor       com             Vorsitzender des             
 Dept. 4722, Bldg.           Phone:          Aufsichtsrats: Martin Jetter 
 71032-01, Room 086          +49-7031-16-43  Geschäftsführung: Herbert    
 Websphere Solutions and     04              Kircher                      
 Services                    Fax:            Sitz der Gesellschaft:       
 IBM Deutschland             +49-7031-16-48  Böblingen                    
 Entwicklung GmbH            90              Registergericht: Amtsgericht 
 Schönaicherstr. 220, D –                    Stuttgart, HRB 243294        
 71032 Boeblingen                                                         
                                                                          











                                                                                                                
  From:       "Maio, Marco" <Marco.Maio@xxxxxxxxxxxxxx>                                                         
                                                                                                                
  To:         "BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx>                             
                                                                                                                
  Date:       11.06.2008 11:42                                                                                  
                                                                                                                
  Subject:    RE: [bpel-dev] PartnerLink Creation during the import                                             
                                                                                                                






So, I resume  what I did:
- I created a PartnerLinkType object, called "plt", setting its name with
the name+"PLT" of the port type found in the wsdl at the import stage.
- I created a role setting his name like for the partnerlinktype but adding
"Role" this time. I passed to its method "setporttype" the port type found
in the wsdl.
- I add the role to the plt created.

So at this point the plt should be completed.
After that:
- I get the tray related to the partnerlink from the BPELEditor.
- I used the method publicAddEntry() to add(or create) a new Partner Link
to this tray.
- I set its name equal to the name of the plt's name and its partner link
type to the plt.
- I set the partnerrole to the plt's partnerrole.

So, now I can view a new partner link in the partner link's tray, but
saving I get this error in the "Problems" window:

"partnerLinkType" is set to "bpelInitPTPLT" on this <bpel:partnerLink>  but
it cannot be resolved (check value of "partnerLinkType", imports, WSDLs or
XSDs).

Should be due to the fact that I don't add the PartnerLink to the artifacts
file?

Anyway I've also tried to add this code:

Definition artifactsDefinition = getBPELEditor().getArtifactsDefinition();

CompoundCommand cmd = new CompoundCommand();
cmd.add( new AddWSDLImportCommand ( artifactsDefinition, itPt.next() ));

cmd.add( new CreatePartnerLinkTypeCommand(artifactsDefinition, actualPl) );
getCommandFramework().execute( cmd );

to my process, but without getting any improvement, I always get the same
error.

Thank you for your help.

Marco

-----Original Message-----
From: bpel-dev-bounces@xxxxxxxxxxx [mailto:bpel-dev-bounces@xxxxxxxxxxx] On
Behalf Of Simon D Moser
Sent: Tuesday, June 10, 2008 6:38 PM
To: BPEL Designer project developer discussions.
Cc: bpel-dev@xxxxxxxxxxx; bpel-dev-bounces@xxxxxxxxxxx
Subject: Re: [bpel-dev] PartnerLink Creation during the import

Hey Marco,

yes - the purpose of the artifacts.wsdl is to store the BPEL WSDL
extensions (such as PartnerLinkTypes and properties and propertyAliases) to
a central backing file. Thus, when you create a Partner in the BPEL editor,
it gets stored there.

For your scenario, what you'd need to do is: You have to create a
PartnerLink (in the BPEL) that points to a PartnerLinkType (in the
artifacts WSDL), where the PartnerLinkType has a role (either inbound, or
outbound, or both), and that role points to the portType that you just
added.

HTH
Simon

Simon Moser, M.Eng.



 Websphere Integration       Mail:           IBM Deutschland Entwicklung
 Developer Development       smoser@xxxxxx.  GmbH
 Team Lead BPEL Editor       com             Vorsitzender des
 Dept. 4722, Bldg.           Phone:          Aufsichtsrats: Martin Jetter
 71032-01, Room 086          +49-7031-16-43  Geschäftsführung: Herbert
 Websphere Solutions and     04              Kircher
 Services                    Fax:            Sitz der Gesellschaft:
 IBM Deutschland             +49-7031-16-48  Böblingen
 Entwicklung GmbH            90              Registergericht: Amtsgericht
 Schönaicherstr. 220, D -                    Stuttgart, HRB 243294
 71032 Boeblingen













  From:       "Maio, Marco" <Marco.Maio@xxxxxxxxxxxxxx>


  To:         <bpel-dev@xxxxxxxxxxx>


  Date:       10.06.2008 17:25


  Subject:    [bpel-dev] PartnerLink Creation during the import







Hi to all,
I would like to automatically add the partnerlinks while the import of a
wsdl file. In this way I read the name of the porttype from the wsdl, I
create a PartnerLinkImpl object (givin to it the name of the port type +
"plt" extension), then I get the PartnerLink's tray and I add the
partnerlink to it.
Should I add it even to the artifatcs file?

Anybody could explain me which is the aim of this file?

Thank you,
Marco_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev

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


Back to the top