[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re: Petri net to BPEL model transformation > How t

Subject: RE: Re: Petri net to BPEL model transformation > How to find patterns?
From: stgn@xxxxxxx
Date: Sun, 10 Sep 2006 16:56:25 +0200
multi stop process
I considered a multi-stop process as well.

1. In answer to your question: in a Petri net, you create a <flow> element when a <transition> element connects with two (it could be more, but for simplicity's sake let's just take two) <place> elements. In your XML code

<node from="" to="11 21" node-id="2"/>

the "to" attribute with two entries would indicate the start of a <flow> element and in your XML code

<node from="13 21" to="" node-id="3"/>

the "from" attribute with two entries would indicate the end of a <flow> element.

Of course one would have to make sure that the closing </flow> tag belongs to the right opening <flow> tag, but let's just ignore that for the moment to make it easier.


2. I can make the input file look as shown in your example.
I have a few questions considering your process though.

What do the XLST snippets look like which do the those two transformations of yours?

How do I figure out that node-ids 11 and 13 go into one <sequence> element and that node-id 21 goes into another sequence element? The node-ids may have been given in random order.

When I have this line
<node from="13 21" to="" node-id="3"/>
how do I find out that 13 and 21 are to pieces of information and not just a string saying "13 21".

Thank you for all the input you've given me so far!

Regards
Sagi




At 06.09.2006 10:37 -0400, you wrote:
>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@xxxxxxxxxx - email
>
>
>
>-----Original Message-----
>From:     stgn@xxxxxxx
>Sent:     Mon, 04 Sep 2006 17:45:30 +0200
>To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject:  Re:  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.bryan@xxxxxxxxx> 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@xxxxxxx <stgn@xxxxxxx> 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>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.