I solved, or i think so.
i create a java project adding these libreries:
apache-ode-war-1.3.3/lib/commons-logging-1.1.jar
apache-ode-war-1.3.3/lib/log4j-1.2.13.jar
apache-ode-war-1.3.3/lib/ode-bpel-api.jar
apache-ode-war-1.3.3/lib/ode-bpel-compiler.jar
apache-ode-war-1.3.3/lib/ode-bpel-obj.jar
apache-ode-war-1.3.3/lib/ode-bpel-schemas.jar
apache-ode-war-1.3.3/lib/ode-tools.jar
apache-ode-war-1.3.3/lib/ode-utils.jar
apache-ode-war-1.3.3/lib/wsdl4j-1.6.1.jar
apache-ode-war-1.3.3/lib/xalan-2.7.0-2.jar
apache-ode-war-1.3.3/lib/xercesImpl-2.9.0.jar
apache-ode-war-1.3.3/lib/commons-collections-3.1.jar
and the code is this:
to create the Process
BpelObjectFactory bof = new BpelObjectFactory();
InputSource is = new InputSource("bpel/StartStopAsync.bpel");
Process bo = bof.parse(is, null);
and then is simple to parse all the code.
i need a feedback, i wrote this function in order to read the operation, is
recurisve:
.... how to call the parser function ...
Activity root = bo.getRootActivity();
parseActivity(root);
.....
private static void parseActivity(Activity act) {
if (act.getType().getLocalPart().equals("sequence")){
System.out.println("found a sequence");
SequenceActivity seq = ((SequenceActivity) act);
for (Activity for_act : seq.getActivities()) {
parseActivity(for_act);
}
} else
if (act.getType().getLocalPart().equals("invoke")){
System.out.println("found an invoke");
InvokeActivity invoke = ((InvokeActivity) act);
System.out.println("parteneLink invoved "
+invoke.getPartnerLink());
System.out.println("operation " +invoke.getOperation());
System.out.println();
} else
if (act.getType().getLocalPart().equals("receive")){
System.out.println("found an receive");
ReceiveActivity receive = ((ReceiveActivity) act);
System.out.println("parteneLink invoved "
+receive.getPartnerLink());
System.out.println("operation " +receive.getOperation());
System.out.println();
}
if (act.getType().getLocalPart().equals("reply")){
System.out.println("found an replay");
ReplyActivity reply = ((ReplyActivity) act);
System.out.println("parteneLink invoved "
+reply.getPartnerLink());
System.out.println("operation " +reply.getOperation());
System.out.println();
}
}
is right to do that in this way?
On Wed, Dec 2, 2009 at 15:45, Stefano Tranquillini <
[email protected]> wrote:
>
> Hi all.
> which classes can i take for have the parser of a BPEL?
> there's a BPEL api or Library that the ODE used or is a simply DOM parser?
> thanks in advance
>
> best
>
> --
> Stefano
--
Stefano