Please disable Adblockers and enable JavaScript for domain CEWebS.cs.univie.ac.at! We have NO ADS, but they may interfere with some of our course material.

Model Translation

Create a piece of code that can convert arbitrary BPMN 2.0 XML code into a tree structure. Test your code with your model A and 15 supplied models. Below you can find an example of the resulting tree (i.e. imperative model). 
 
<description xmlns="http://cpee.org/ns/description/1.0">
  <loop mode="post_test" condition="data.test &lt; 3">
    <call id="a2" endpoint="timeout">
      <parameters>
        <label/>
        <method>:post</method>
        <arguments>
          <timeout>4</timeout>
        </arguments>
      </parameters>
      <finalize output="result">data.test -= 1</finalize>
      <update output="result"/>
    </call>
  </loop>
  <call id="a1" endpoint="timeout">
    <parameters>
      <!--{{{-->
      <method>:post</method>
      <arguments>
        <timeout>4</timeout>
        <bug>data.nasty</bug>
      </arguments>
    </parameters>
    <!--}}}-->
    <finalize output="result">data.x += "done"</finalize>
  </call>
  <parallel wait="2">
    <parallel_branch>
      <call id="a2_1" endpoint="timeout">
        <parameters>
          <!--{{{-->
          <method>:post</method>
          <arguments>
            <timeout>6</timeout>
          </arguments>
        </parameters>
        <!--}}}-->
      </call>
    </parallel_branch>
    <parallel_branch>
      <call id="a2_2" endpoint="timeout">
        <parameters>
          <!--{{{-->
          <method>:post</method>
          <arguments>
            <timeout>2</timeout>
          </arguments>
        </parameters>
        <!--}}}-->
      </call>
    </parallel_branch>
  </parallel>
  <manipulate id="a3">data.x += '_end'</manipulate>
  <choose>
    <alternative condition="data.x != nil">
      <call id="a4_1" endpoint="timeout">
        <parameters>
          <!--{{{-->
          <method>:post</method>
          <arguments>
            <timeout>4</timeout>
          </arguments>
        </parameters>
        <!--}}}-->
      </call>
    </alternative>
    <otherwise>
      <call id="a4_2" endpoint="timeout">
        <parameters>
          <!--{{{-->
          <method>:post</method>
          <arguments>
            <timeout>10</timeout>
          </arguments>
        </parameters>
        <!--}}}-->
      </call>
    </otherwise>
  </choose>
</description>
 
Details: 
 
Submission: 
Every resulting tree should be correct XML. Every resulting tree should adhere to the example/schema given above. 
 
Tipp: «http://researcher.watson.ibm.com/researcher/files/zurich-hvo/VVK09.pdf» can be used as a basis. 
Letzte Änderung: 30.10.2017, 14:39 | 546 Worte