xsl-list
[Top] [All Lists]

RE: Re: [xsl] Petri net to BPEL model transformation > How to find patterns?

2006-09-06 07:37:54
I've been noodling around with this the past day and I've made some progress. 
You said you may be able to adjust your input file, so I've taken the liberty 
of doing so. If your work-flow tool can't do this, it would be easy to produce 
this file from your original with an XSLT transformation. I have in mind a 
multi-step process in any case, so that wouldn't be a stumbling block in the 
solution.

<?xml version="1.0"?>
<petrinet>
  <arc>
    <from node-type="P">1</from>
    <to node-type="T">2</to>
  </arc>
  <arc>
    <from node-type="T">2</from>
    <to node-type="P">10</to>
  </arc>
  .....
</petrinet>

My first step was to transform the <arc> elements to <node> elements. The 
output looks like this.

<?xml version="1.0" encoding="UTF-8"?>
<node-net>
   <node from="" to="11 21" node-id="2"/>
   <node from="2" to="13" node-id="11"/>
   <node from="11" to="3" node-id="13"/>
   <node from="2" to="3" node-id="21"/>
   <node from="13" to="" node-id="3"/>
   <node from="21" to="" node-id="3"/>
</node-net>

As you will see, the first node in the net has no value in its "from" attribute 
and the last node in the net has no value in its "to" attribute.

The next step merges the two end nodes.

<?xml version="1.0" encoding="UTF-8"?>
<node-net>
   <node from="" to="11 21" node-id="2"/>
   <node from="2" to="13" node-id="11"/>
   <node from="11" to="3" node-id="13"/>
   <node from="2" to="3" node-id="21"/>
   <node from="13 21" to="" node-id="3"/>
</node-net>

So it seems pretty clear that the node with no value in the "from" will produce 
the first <invoke> element and the the node with no value in the "to" attribute 
will produce the last <invoke> element.

How do I know when to create a "flow" element?
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     stgn(_at_)gmx(_dot_)net
Sent:     Mon, 04 Sep 2006 17:45:30 +0200
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  Re: [xsl] Petri net to BPEL model transformation > How to find 
patterns?

Thanks for both your postings.

I'll have a look the the book Professional XSL. It might take a few days until 
the library has it ready.

Thanks for the hint. Unfortunatelly, I haven't found any work by Michael 
Corning on PNML neither in Google, Google Scholar, Yahoo nor CiteSeer. However, 
a few webpages mention PNML with reference to his book Web Service Faceplates 
from Wrox.

Regards
Sagi




At 04.09.2006 15:22 +0200, you wrote:
just checked the page closer, is old and out of date. I suppose if you
can find the book used somewhere it can be useful or if you can find
Corning's work via google on PNML.

Cheers,
Bryan

On 9/4/06, bryan rasmussen <rasmussen(_dot_)bryan(_at_)gmail(_dot_)com> wrote:
The book Professional XSL from Wrox had some transforms for working
with Petri Nets, can't remember exactly what was being done though.

Michael Corning, whose transforms were used, has a homepage here (not
sure about current status of it)
http://authors.aspalliance.com/mcorning/ where some mention is made of
the petri nets stuff.

Cheers,
Bryan

On 9/4/06, stgn(_at_)gmx(_dot_)net <stgn(_at_)gmx(_dot_)net> wrote:
Hello

How can I find/describe patterns in a Petri net graph with XSLT?

For instance a sequence, a concurrency, AND-split, AND-join, 
OR-split,
OR-join or a while loop.

Below you see a Petri net model (source model) which I would like to
transform into a BPEL model (target model).

Can you tell me what the corresponding XSLT code would look like?

My problem is to find patterns in a graph representation (Petri net)
and to transform them into a tree representation (BPEL). It might be
that such a transformation is not possible with the Petri net example
given below or that the Petri net XML would need further information
(for example an attribute attached to a transition saying "this is 
the
start of an AND-split").

I am grateful for any hints. If you need any further information to
solve the problem, please let me know.

Regards
Sagi

--------------------
source model
--------------------
<?xml version="1.0"?>
<petrinet>

        <!-- start of Petri net -->
        <place id="1"></place>
        <transition id="2"></transition>

        <!-- upper flow of concurrency -->
        <place id="10"></place>
        <transition id="11"></transition>
        <place id="12"></place>
        <transition id="13"></transition>
        <place id="14"></place>

        <!-- lower flow of concurrency -->
        <place id="20"></place>
        <transition id="21"></transition>
        <place id="22"></place>

        <!-- end of Petri net -->
        <transition id="3"></transition>
        <place id="4"></place>

        <!-- arcs connecting places and transitions -->
        <arc>
                <from>1</from>
                <to>2</to>
        </arc>
        <!-- next 2 arcs define an AND-split -->
        <arc>
                <from>2</from>
                <to>10</to>
        </arc>
        <arc>
                <from>2</from>
                <to>20</to>
        </arc>
        <!-- upper flow of concurrency -->
        <arc>
                <from>10</from>
                <to>11</to>
        </arc>
        <arc>
                <from>11</from>
                <to>12</to>
        </arc>
        <arc>
                <from>12</from>
                <to>13</to>
        </arc>
        <arc>
                <from>13</from>
                <to>14</to>
        </arc>
        <!-- lower flow of concurrency -->
        <arc>
                <from>20</from>
                <to>21</to>
        </arc>
        <arc>
                <from>21</from>
                <to>22</to>
        </arc>

        <!-- next 2 arcs define an AND-join -->
        <arc>
                <from>14</from>
                <to>3</to>
        </arc>
        <arc>
                <from>22</from>
                <to>3</to>
        </arc>
        <arc>
                <from>3</from>
                <to>4</to>
        </arc>
</petrinet>



--------------------
target model
--------------------
<?xml version="1.0"?>

<process>
        <sequence>
                <invoke name="2"/>
                <flow>
                        <!-- upper flow of concurrency -->
                        <sequence>
                                <invoke name="11"/>
                                <invoke name="13"/>
                        </sequence>
                        <!-- lower flow of concurrency -->
                        <sequence>
                                <invoke name="21"/>
                        </sequence>
                </flow>
                <invoke name="3"/>
        </sequence>
</process>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--