Next: , Previous: Overview, Up: Top



2 Invoking BPEL2oWFN

The standard invocation of BPEL2oWFN is:

     bpel2owfn -f inputfile.bpel -O2F

where inputfile.bpel is a BPEL process. The option -O2F causes BPEL2oWFN to generate an open workflow net named inputfile.owfn and a file inputfile.info describing the places and transitions of the net. For more examples, see Examples.

2.1 Options

BPEL2oWFN supports the following command-line options:

--file filename.bpel
-f filename.bpel
Read BPEL input from file filename.bpel. The filename is used to name any files generated by BPEL2oWFN. If this parameter is omitted, input is read from standard input.
--help
-h
Print an overview of the command-line options and exit.
--version
-v
Print version information and exit.

2.1.1 Output modes

When invoking BPEL2oWFN several output modes are possible. While the -pn-mode can be implied by other options the other modes have to be set explicitly. Either way, at most one of these options can be chosen.

--ast
-a
Outputs the AST (abstract syntax tree) generated while parsing the input file to standard output. This option is mostly used for debugging reasons.
--xml
-x
Outputs the parsed BPEL file in XML representation. Any unnecessary attributes are omitted. This option is mostly used for debugging reasons.
--petrinet
-pn
Generates a Petri net representing the semantics of the given process. Other options can be added to simplify, abstract or modify that Petri net (see below).

2.1.2 Petri net related options

These options imply the -pn-option. When BPEL2oWFN is run with the -pn-option reading a file input.bpel, a file input.info holding the information about the nodes of the created Petri net is generated. See Naming Conventions for more information.

--simplify
-s
Uses several rules to structurally simplify the generated Petri net. See Petri Net related Functions for more details.
--low-level
-ll
Abstracts the generated Petri net to low-level representation. See Petri Net related Functions for more details.
--lola
-L
Outputs a low-level Petri net representation in the LoLA format (see File Formats). This option should not be used together with -D, -D2F, -O, -O2F. This option implies -ll.
--lola2file
-L2F
The same effect as the --lola option, yet an output file is generated: If the input BPEL process is read from file.bpel, the LoLA net is named file.lola.
--owfn
-O
Outputs an oWFN representing the semantics of the input process (see File Formats). This option should not used together with -D, -D2F, -L or -L2F.
--owfn2file
-O2F
The same effect as the --owfn option, yet an output file is generated: If the input BPEL process is read from file.bpel, the oWFN is named file.owfn.
--dot
-D
Outputs a Dot representation of the Petri net (see File Formats). Should not used together with options -L, -L2F, -O, -O2F. Implies option -pn.
--dot2file
-D2F
The same effect as the --dot option, yet an output file is generated: If the input BPEL process is read from file.bpel, the Dot representation is named file.dot.

2.2 Examples

In this section we show some examples how BPEL2oWFN can be invoked.

bpel2owfn -f sample.bpel -L2F -s
Reads the file sample.bpel, generates a structural simplified low-level Petri net and saves it in a LoLA file sample.lola. For further information a file sample.info is generated.
bpel2owfn -f sample.bpel -O2F -ddd
Reads the file sample.bpel, generates a low-level open workflow net and saves it in an oWFN file sample.owfn. For further information a file sample.info is generated. During the conversion several debug messages are printed to standard output.
prog | bpel2owfn -D -ll | dot -Tpng -osample.png
Runs the program prog and reads its output as BPEL process, generates a low-level Petri net and outputs its Dot representation. This stream is read by Dot which layouts the Petri net and creates an output PNG (Portable Network Graphic) file sample.png.
bpel2owfn -f sample.bpel -a
Reads the file sample.bpel and prints the abstract syntax tree (AST) to standard output.

2.3 Exit Values

When BPEL2oWFN is invoked and run without any error, the exit value is 0.

0
No error. The input file could be correctly opened, parsed and the output file(s) could be generated without any error.
1
Lexical or syntax error. This error occurs while lexing or parsing the input file. It is thrown by the lexer or the parser, resp. Usually the `source' of the error (i.e. the filename and line number) is indicated together with the unexpected (last read) and expected token.

An example:

          Error while parsing
          
          syntax error, unexpected X_SLASH, expecting X_OPEN
          Error in `example.bpel' in line 12:
            token/text last read was `/'
     

Please note that the indicated position (i.e. the line number) may be fuzzy — it should be understood as a hint to the erroneous line.

2
`File not found' exception. The given input file was not found resp. could not be opened.

An example:

          An error has occurred while parsing "example.bpel"!
          
          Exception #2 occurred!
          
             File `example.bpel' not found.
     

10
Option mismatch. The given command-line options cannot be processed together.

An example:

          An error has occurred while parsing "example.bpel"!
          
          Exception #10 occurred!
          
             Chosen parameters cannot work together (see parameter -h).
          
           Additional information:
             LoLA and dot output on stdout are confusing, chose one!
     

30
`Dynamic cast error' exception. While building an internal scope tree an unexpected error has occurred.
40
Node not found.
41
`Node already defined' exception. While generating the Petri net a node was found having a history entry covered by another node before.

An example:

          An error has occurred while parsing "example.bpel"!
          
          Exception #41 occurred!
          
             Place with role `1.internal.final' already defined.
     

42
`Merging error' exception. While generating the Petri net an error occurred while merging two nodes. It happens either when one of the nodes was not found or one of the nodes is a guarded transition—the merging of guarded transitions is not yet supported.
43
`Arc error' exception. While generating the Petri net an error occurred while adding an arc to the net. It happens either on type errors — i.e. an arc between two transitions (or two places, resp.) should be drawn — or when the source or target node of an arc was not found.

Please report the occurrence of any exception with numbers 30–50 since it indicates a bug in BPEL2oWFN we would like to fix immediately (see Reporting Bugs).