<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards Standard Conformant BPEL Engines: The Case of Static Analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Christian R. Preißinger</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Simon Harrer</string-name>
          <email>simon.harrer@uni-bamberg.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stephan J. A. Schuberth</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Bimamisa</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guido Wirtz</string-name>
          <email>guido.wirtz@uni-bamberg.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Distributed Systems Group, University of Bamberg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <fpage>57</fpage>
      <lpage>60</lpage>
      <abstract>
        <p>The errors in BPEL processes that are only detected at runtime are expensive to fix. Several modelers and process engines for BPEL exist, and the standard defines basic static analysis (SA) rules as a detection mechanism for invalid processes, but the actual conformance of BPEL modelers and engines regarding these rules is unknown. We propose to develop test cases to evaluate the conformance of BPEL modelers and engines regarding static analysis. The evaluation results enable decision makers to identify and use the most conformant engine and modeler that detect errors before runtime and therefore reduce costs.</p>
      </abstract>
      <kwd-group>
        <kwd>SOA</kwd>
        <kwd>BPEL</kwd>
        <kwd>static analysis</kwd>
        <kwd>conformance testing</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        BPEL, a standard [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] by OASIS, defines a graph and block structured process
language (see [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]), corresponding execution semantics, and 94 basic static analysis
(SA) rules1. “The purpose of [these rules] is to detect any undefined semantics or
invalid semantics within a process definition that was not detected during the
schema validation against the XSD” [9, p. 194]. These rules seem rather simple,
but are nevertheless as important for executing BPEL processes as static type
checking is for executing Java applications. Consequently, one would expect the
IDEs (BPEL modelers) and the runtime (BPEL engines) to detect any violations
of these rules. Especially, as the BPEL specification requires a fully standard
conformant engine to implement all static analysis rules [9, p. 13].
      </p>
      <p>Each static analysis rule defines constraints for at least one BPEL element, e.g.,
rule #47 enforces, among other conditions, that any received non-empty message
must be stored in variables. For example, consider a developer implements a
simple BPEL process2 with two variables (input and output variable) which awaits
a message (onMessage) which instantiates the process, copies the contents of the
1 The rules are enumerated from 1 to 95, but 49 is missing, thus 94 rules exist.
2 The process is available at https://lspi.wiai.uni-bamberg.de/svn/betsy/
sa47-test.zip - Accessed 02/14/2014
input variable into the output variable (assign) and returns the output variable
(reply), but forgets to store the received message in the designated input variable,
hence violating rule #47. Against expectations, the error is neither detected by
the two widely used Open Source BPEL IDEs, Eclipse BPEL Designer v1.0.3
and the OpenESB IDE v2.3.1, nor by the BPEL analysis tool BPEL2oWFN.
Moreover, only the BPEL engines Apache ODE 1.3.6 and bpel-g v5.3 correctly
reject the erroneous process whereas OpenESB v2.3.1 and Orchestra 4.9 falsely
accept and deploy the process. Upon execution of the process, both engines show
behavior which is hard to debug: OpenESB returns null with the error of a
NullPointerException and Orchestra returns a timeout with no error trace. In
this particular case, none of the modelers or analysis tools and only two out of
four engines were able to detect this basic error.</p>
      <p>Thus, this preliminary evaluation raises the following research question: What
is the conformance to the static analysis rules of BPEL modelers and engines
and why is this the case?
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Static analysis regarding BPEL has been studied extensively in literature. Each
considered approach was analyzed by investigating three aspects: the BPEL
version, the number of test cases, and the amount of static analysis rules covered
by the tests. The approaches [
        <xref ref-type="bibr" rid="ref1 ref11 ref2 ref3">1–3, 11</xref>
        ] focus on BPEL 1.1 whereas [
        <xref ref-type="bibr" rid="ref12 ref13 ref7">7, 12, 13</xref>
        ] focus
on the latest specification BPEL 2.0. Because the rules were initially published
in the BPEL 2.0 specification, the first four approaches could not specify any SA
conformance tests. Nevertheless, Akehurst [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and Ouyang et al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] provide 16
and 30 valid BPEL 1.1 processes as test cases, respectively. In addition, Ouyang
et al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] presents two incomplete BPEL 1.1 processes detailing an unreachable
activity and a conflicting receive, the latter would violate the rule #60 of BPEL
2.0 which requires the use of explicit messageExchanges in this case. Returning
to the approaches using BPEL 2.0, only [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] provides test cases3. Each of these
56 test cases corresponds to a specific static analysis rule. Moreover, Lohmann
presents the tool BPEL2oWFN which automatically detects violations of these
56 rules as a positive side efect during a transformation from BPEL to Petri
Nets [8, p. 34]. Because of a diferent focus of [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the 56 provided tests are not
suitable to evaluate the conformance to the static analysis rules of BPEL engines.
They do not include all error types of the covered 56 rules and are abstract (no
WSDL interface, incomplete process definition).
      </p>
      <p>
        Whereas the discussed approaches check the standard conformance of BPEL
processes, none of them evaluates the standard conformance of BPEL modelers
or engines. Harrer et al. [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ] did focus on BPEL engines with their automated
testing tool betsy, but solely evaluated standard conformance using approx. 130
valid processes. Thus, standard conformance regarding the static analysis rules
of BPEL engines remains untested [4, p. 7], as is the case for BPEL modelers.
3 The test cases are available as part of the source code of the BPEL2oWFN tool at
http://www.gnu.org/software/bpel2owfn/download.html - Accessed 01/22/2014
Towards Conformant BPEL Static Analysis
      </p>
    </sec>
    <sec id="sec-3">
      <title>Research Outline</title>
      <p>To answer the research question, we aim to a) create test cases (d−−er−i→ve in Fig. 1) for
the 94 static analysis rules and b) use these test cases to analyze static analysis
conformance of BPEL modelers and engines (e−v−a−l−u−a→te in Fig. 1) with betsy, i.e.,
determining the degree of static analysis conformance.</p>
      <p>The derivation of the test cases for each static analysis rule is subdivided into
six steps. First, the related elements and attributes are extracted from the textual
representation of the rule and partitioned into groups. Second, the elements
and attributes are permutated into a list of possible combinations. Third, we
identify valid, invalid, and meaningless combinations according to the standard
restrictions. Fourth, we calculate the distance from each invalid combination to
every valid combination and pair up the least distant combinations. Our distance
metric is the amount added and removed elements and attributes. Fifth, to create
the test case we select the most feature-poor process from a test set of valid
processes (e.g. the betsy test set) that fits the valid combination. Sixth, we mutate
the valid process to an invalid one corresponding to the invalid combination.
This approach increases the quality of the tests as it ensures that the erroneous
process solely violates a single error condition. Especially the first and the third
step are hard to automate as interpreting prose is nontrivial. Thus, four steps
are automated whereas the other two are done manually. Following our running
example, we applied the first step of our proposed procedure onto rule #47 and
determined the formalization of influencing factors in the listing below. Step
two to five are not shown. Regarding step six, the test case described in Sect. 1
implements the error condition represented by the permutation marked as bold.</p>
      <p>{empty message, non-empty message} ×
{invoke, receive, reply, onMessage, onEvent}×</p>
      <p>{incoming, outgoing}×
{variable assignment, no variable assignment}×</p>
      <p>{part assignment, no part assignment}</p>
      <p>An engine passes such a test case if the process is rejected during deployment.
But there may be false positives, i.e., the process is rejected by an engine
because of an unsupported feature or an internal error. To prevent misleading
results, we propose to take the betsy conformance evaluation into account. betsy
reveals [4, p. 6] that full standard conformance is far from given by detailing
which BPEL feature is supported by which engine. To avoid false positives during
the evaluation of a single error type, we suggest to use a pair of BPEL processes,
a fully functional and an erroneous one. We assume that if the engine rejects
the valid process, it is not able to detect this error type. But this assumption
introduces false negatives, as the engine may reject the erroneous process by
static analysis and the valid one by missing feature support. To counter this, we
propose to evaluate the log files for any hints on why the deployment failed. The
evaluation of the BPEL modelers is analogous.</p>
      <p>The evaluation with test pairs of valid and invalid tests reveal the quality of
the error detection, making the engines and modelers comparable in this regard.
As the degree of error detection has an impact on the development costs, this
metric may be leveraged for buying decisions. In addition, it can also be used for
improving the products and act as a regression test suite.</p>
      <p>
        The requirements to use our approach are 1) a process language standard
defining rules for valid processes and 2) a feature complete set of valid processes.
We use the process language BPEL in this case study, but the approach is also
applicable for other process languages, e.g., for the Business Process Modeling
and Notation (BPMN) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Akehurst</surname>
            ,
            <given-names>D.H.</given-names>
          </string-name>
          :
          <article-title>Validating BPEL Specifications using OCL</article-title>
          .
          <source>Tech. Rep. 15-04</source>
          , University of Kent, Computing Laboratory (
          <year>August 2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Fisteus</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fernández</surname>
            ,
            <given-names>L.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kloos</surname>
          </string-name>
          , C.D.:
          <article-title>Formal verification of BPEL4WS business collaborations</article-title>
          . In:
          <string-name>
            <surname>EC-Web</surname>
            <given-names>LNCS</given-names>
          </string-name>
          3182, pp.
          <fpage>76</fpage>
          -
          <lpage>85</lpage>
          . Springer (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Foster</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Uchitel</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Magee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kramer</surname>
          </string-name>
          , J.:
          <article-title>LTSA-WS: A Tool for Model-Based Verification of Web Service Compositions and Choreography</article-title>
          . In: ACM ICSE (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Harrer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenhard</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wirtz</surname>
          </string-name>
          , G.:
          <article-title>BPEL Conformance in Open Source Engines</article-title>
          . In: IEEE SOCA (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Harrer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenhard</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wirtz</surname>
          </string-name>
          , G.:
          <article-title>Open Source versus Proprietary Software in Service-Orientation: The Case of BPEL Engines</article-title>
          .
          <source>In: ICSOC. LCNS</source>
          , vol.
          <volume>8274</volume>
          , pp.
          <fpage>99</fpage>
          -
          <lpage>113</lpage>
          . Springer Berlin Heidelberg, Berlin, Germany (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kopp</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martin</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wutke</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leymann</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The Diference Between GraphBased and Block-Structured Business Process Modelling Languages</article-title>
          .
          <source>Enterprise Modelling and Information Systems</source>
          <volume>4</volume>
          (
          <issue>1</issue>
          ),
          <fpage>3</fpage>
          -
          <lpage>13</lpage>
          (
          <year>June 2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lohmann</surname>
          </string-name>
          , N.:
          <article-title>A feature-complete Petri net semantics for WS-BPEL 2.0</article-title>
          . In: LNCS,
          <string-name>
            <surname>4th</surname>
            <given-names>WS-FM</given-names>
          </string-name>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Lohmann</surname>
          </string-name>
          , N.:
          <article-title>A feature-complete Petri net semantics for WS-BPEL 2.0 and its compiler BPEL2oWFN</article-title>
          .
          <source>Tech. rep., 212</source>
          , HU Berlin (
          <year>August 2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. OASIS:
          <string-name>
            <surname>Web Services Business Process Execution Language</surname>
          </string-name>
          (
          <year>April 2007</year>
          ),
          <year>v2</year>
          .
          <fpage>0</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. OMG:
          <article-title>Business Process Model and Notation (January</article-title>
          <year>2011</year>
          ),
          <year>v2</year>
          .
          <fpage>0</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Ouyang</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Verbeek</surname>
          </string-name>
          , E., van der Aalst, W.,
          <string-name>
            <surname>Breutel</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dumas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>ter Hofstede</surname>
          </string-name>
          , A.:
          <article-title>WofBPEL: A Tool for Automated Analysis of BPEL Processes</article-title>
          . In: ICSOC (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Defect Analysis Respecting Dead Path Elimination in BPEL Process</article-title>
          . In: IEEE APSCC (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Ye</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>A Static Analysis Method of WSDLRelated Defect Pattern in BPEL</article-title>
          . In: IEEE ICCET (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>