projet-mini-genie-logiciel-.../fr.n7.simplePDL/SimplePDL.ocl

28 lines
809 B
Plaintext
Raw Normal View History

2021-10-03 20:23:04 +00:00
import 'SimplePDL.ecore'
package simplepdl
context Process
inv warningSeverity: false
inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false
--inv errorSeverity: null
context Process
inv validName('Invalid name: ' + self.name):
self.name.matches('[A-Za-z_][A-Za-z0-9_]*')
context ProcessElement
def: process(): Process =
Process.allInstances()
->select(p | p.processElements->includes(self))
->asSequence()->first()
context WorkSequence
inv successorAndPredecessorInSameProcess('Activities not in the same process : '
+ self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and '
+ self.successor.name + ' in ' + self.successor.process().name
):
self.process() = self.successor.process()
and self.process() = self.predecessor.process()
endpackage