Skip to main content



      Home
Home » Modeling » ATL » Use a new instance from a rule in another rule
Use a new instance from a rule in another rule [message #1061560] Sun, 02 June 2013 17:20 Go to next message
Eclipse UserFriend
Hello, i have a problem in my ATL transformation, to transform a BPMN model to a PetriNet one, i should transform a TasktoTask (Sequence Flow) from the BPMN into a 3 element in the PetriNet (a TransitiontoPlace, a Place, and a PlacetoTransition). So my problem is that i creat a new place who have no mapping in the BPMN model, and it need the "incomingconnection" ans the "outgoingconnection", but i dont know how to have this two parameters because it's just a intermediate place between 2 transition, and i creat a new arc too that need to have a "from" and a "to", it's mean from the new place that i create.

Any ideas or help please.

rule Place {
	from
		g : bpmn3!Event
	to
		p : PetriNet!Place
		(
			location <- g.location,
			name <- g.name,
			net <- g.process,
			incomingArc <- g.incomingConnections,
			outgoingArc <- g.outgoingConnections
		)
}
-- task to transition
rule Transition {
	from
		g : bpmn3!Task 
	to
		p : PetriNet!Transition
		(
			location <- g.location,
			name <- g.name,
			net <- g.process,
			incomingArc <- g.incomingConnections or g.incomingConnectionst,
			outgoingArc <- g.outgoingConnections or g.outgoingConnectionst
		)
}

rule PlaceToTransition {
	from
		g : bpmn3!EventtoTask 
	to
		p : PetriNet!PlaceToTransition
		(
			location <- g.location,
			name <- g.name,
			net <- g.process,
			"from" <- g."from",
			"to" <- g."to"
		)
}

rule TransitionToPlace {
	from
		g : bpmn3!TasktoEvent 
	to
		p : PetriNet!TransitionToPlace
		(
			location <- g.location,
			name <- g.name,
			net <- g.process,
			"from" <- g."from",
			"to" <- g."to"
		)
}

rule TransitionToTransition {
	from
		g : bpmn3!TasktoTask
	to
		p : PetriNet!TransitiontoPlace
		(
			location <- g.location,
			name <- g.name,
			net <- g.process,
			"from" <- g."from",
			"to" <- r.Place  
		),	

		q : PetriNet!PlaceToTransition
		(
			location <- g.location,
			name <- g.name + '2',
			net <- g.process,
			"from" <- r.Place,  
			"to" <- g."to"
		),
		
		r : PetriNet!Place
		(
			location <- g.location,
			name <- g.name + 'place',
			net <- g.process,
			incomingArc <- p.outgoingConections,  
			outgoingArc <- q.incomingConnections 
		)
}


Thanks

[Updated on: Sun, 02 June 2013 17:21] by Moderator

Re: Use a new instance from a rule in another rule [message #1061641 is a reply to message #1061560] Mon, 03 June 2013 07:43 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Probably you could get answers by looking to this transformation example involving PetriNet models.
The problem described there and yours seem to be relatively similar.
Re: Use a new instance from a rule in another rule [message #1061646 is a reply to message #1061641] Mon, 03 June 2013 07:47 Go to previous message
Eclipse UserFriend
You should notably look to the use of the resolveTemp operation as presented there (cf. also the related section in the ATL User Guide).
Previous Topic:XML Schema (XSD) generation
Next Topic:Refining mode - Possible bug when autoformatting text
Goto Forum:
  


Current Time: Wed Jul 23 11:45:49 EDT 2025

Powered by FUDForum. Page generated in 0.03237 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top