From: Simon D
Moser <SMOSER@xxxxxxxxxx>
To: BPEL Designer project developer discussions. <bpel-dev@xxxxxxxxxxx>
Cc: bpel-dev@xxxxxxxxxxx; bpel-dev-bounces@xxxxxxxxxxx
Sent: Tue, 4 May, 2010 16:17:23
Subject: Re: [bpel-dev] Bpel process generation... help needed
Some sample code that should help you ...
protected Process createBPEL(){
Process process = null;
try {
//create resource
URI uri = URI.createPlatformResourceURI(
"/myProject/myBPEL.bpel", false);
bpelResource = getResourceSet().createResource(uri);
process = BPELFactory.eINSTANCE.createProcess();
process.setName("myBPEL");
Sequence mySeq = BPELFactory.eINSTANCE.createSequence();
mySeq.setName("mainSequence");
process.setActivity(mySeq);
bpelResource.getContents().add(process);
bpelResource.save(null);
}
catch (Exception e) {
e.printStackTrace();
}
return process;
}
You dont have to call the writer explicitly ... calling bpelResource.save()
should do the trick
Mit freundlichen Grüßen / Kind regards
Simon Moser
WebSphere BPM Architecture - Team Lead BPEL, BSM & Selector Editors
IBM Software Group, Application and Integration Middleware Software
Business Process Solutions Development 1
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland
Schoenaicher Str. 220
71032 Boeblingen
Phone: +49-7031-16-4304
Fax: +49-7031-16-4890
E-Mail:
smoser@xxxxxxxxxx-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH / Vorsitzender des
Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht
Stuttgart, HRB 243294
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Adnan <
adnust@xxxxxxxxx>
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|
bpel-dev@xxxxxxxxxxx
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|04.05.2010 13:19
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|[bpel-dev] Bpel process generation... help needed |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|
bpel-dev-bounces@xxxxxxxxxxx |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Hi,
I want to generate the bpel process (xml), I tried to roam around the
classes like BPELWriter, BPELFactoryImpl, BPELResourceImpl etc...
What I am trying to do is that creating Process and its children form
BPELFactoryImpl and then want to use write(BPELResource, OutputStream)
method.
first am i assuming it right and second how can i add Process to
BPELResource
regards,
----
AL
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/bpel-dev_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/bpel-dev