[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: Tue, 05 Sep 2006 13:41:15 +0200
bpel switch
Thanks for not giving up on me. :)

The flat structure of the input document is exactly what's driving me insane. Now I have to go and find patterns with XSLT in that flat structure to create the nested structure of the output document.

The nested structure can only be inferred if you know what element BPEL supports and what they look like in the Petri net. I'll try to give e few examples:

1. Activities
- Petri net: Represented by <transition> element
- BPEL: <transition> relates to <invoke>

2. Sequences
- Petri net: Sequences start with a transition and end with a transition (T1--P--...--P--Tn)
- BPEL: Sequences are grouped with <sequence> tags and looks like this (<place>s get ignored):

<sequence>
	<invoke operation="T1"/>
	...
	<invoke operation="Tn"/>
</sequence>

3. Concurrencies
- Petri net: Starts with a AND-split and ends with a AND-join
- BPEL: Concurrencies look like this :

<flow>
	<sequence>
		<!-- everything from the first path goes here -->
	</sequence>
	<sequence>
		<!-- everything from the second path goes here -->
	</sequence>
</flow>

An AND-split is when a transition connects to two places.
An AND-join is when two places connect to one transition.

4. Alternative paths (XOR-split, XOR-join)
- Petri net: Starts with a XOR-split and ends with a AND-join
- BPEL: Alternative paths look like this:

<switch>
	<case condition="some_XPath_expression">
		<!-- everything from one path goes here -->
	</case>
	<case condition="some_other_XPath_expression">
		<!-- everything from the other path goes here -->
	</case>
</switch>


Does this information help to infer the nested structure?

Regards
Sagi




At 04.09.2006 11:52 -0400, you wrote:
>Your input structure is flat. How are we to infer the nested structure 
>of the output document?
>-- 
>Charles Knell
>cknell@xxxxxxxxxx - email
>
>
>
>-----Original Message-----
>From:     stgn@xxxxxxx
>Sent:     Mon, 04 Sep 2006 16:50:46 +0200
>To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject:  RE:  Petri net to BPEL model transformation > How to 
>find patterns?
>
>Thank you for your feedback.
>
>1. I have drawn two diagrams which illustrate the relationship there are.
>
>The first diagram illustrates the desired input and output document. 
>The input document is generated by e workflow modeling tool. 
>http://www.myjavaserver.com/~stgn/pn2bpel/input_and_output.gif
>
>The second diagram illustrates the relationships. I hope this is what 
>you asked for.
>http://www.myjavaserver.com/~stgn/pn2bpel/relationships.gif
>
>
>2. Not quite. One <place> element may be connected to several 
><transitions> elements via <arc> elements.
>The source model is a Petri net graph consisting of places and 
>transitions which are connected through arcs. The graph is bipartite 
>meaning that places may only connect to transitions and transitions 
>may only connect to places. However, one place may connect to several 
>transitions and one transition may connect to several places (as you 
>can see in the example in input_and_output.gif).
>
>
>3. That's right, each transition (i.e. a activity in a workflow) gets 
>transformed into an <invoke> element. For a place, however, there is 
>no corresponding concept in the target BPEL model, so we just don't 
>transform them.
>
>I tried to describe the relationships with the two diagramms given above.
>
>I assume there is still information missing that one needs to do such 
>a transformation. Please feel free to ask, I'll try to provide the 
>necessary information. I'd also like to mention that perhaps the 
>transformation isn't feasible with the current XML input document (as 
>given in input_and_output.gif). Since I'm new to XSLT I can't jugde 
>whether this particular transformation is possible at all. In case it 
>is not, I am able to slightly adjust the input model (as far as the 
>workflow modeling tool allows it) to make the transformation possible 
>or easier. 
>
>Regards
>Sagi
>
>
>
>
>At 04.09.2006 09:09 -0400, you wrote:
>>In order to transform one document to another, it is first necessary 
>>to understand how the nodes in the original document relate to the 
>>nodes in the output document. Nothing in your model documents suggests 
>>to me exactly what those relationships might be.
>>
>>It appears that between pairs of <place> elements there is exactly one 
>><transition> element ( P---T---P) judging by comparing the @id values 
>>of the <place> and <transition> elements to the values of the <from> 
>>and <to> children of the <arc> elments.
>>
>>Looking at your desired output, I hypothesize that each <invoke> 
>>element is derived from a <transition> element, but beyond that, I'm 
>>at a loss to describe any other relationship to the source document.
>>
>>Please describe what the relationships are between elements in the 
>>souce document and elements in the output document.
>>
>>
>>Charles Knell
>>cknell@xxxxxxxxxx - email
>>
>>
>>
>>-----Original Message-----
>>From:     stgn@xxxxxxx
>>Sent:     Mon, 04 Sep 2006 09:38:03 +0200
>>To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>Subject:   Petri net to BPEL model transformation > How to find 
>>patterns?
>>
>>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.