Module: Mbpm_source_Node
- Defined in:
- lib/ontomde-uml2-jpdl/main.rb,
lib/ontomde-uml2-jpdl/main.rb
Instance Method Summary collapse
- #bpm_addTransition!(transitionName, targetNode) ⇒ Object
-
#bpm_createEnumerationForTransitions!(processClass) ⇒ Object
creates an uml enumeration listing every node leaving this transition This is usefull for decision node.
-
#hasMultipleTransitions? ⇒ Boolean
Indique si ce noeud a plusieurs sorties et donc si on génère un Enum pour son type de retour.
Instance Method Details
#bpm_addTransition!(transitionName, targetNode) ⇒ Object
305 306 307 308 309 310 |
# File 'lib/ontomde-uml2-jpdl/main.rb', line 305 def bpm_addTransition!(transitionName,targetNode) t=Cbpm_transition.new(self.rdf_model,"#{self.rdf_uri}_#{transitionName}") self.bpm_leavingTransition_add(t) t.bpm_destinationNode=targetNode t.bpm_transitionName=transitionName end |
#bpm_createEnumerationForTransitions!(processClass) ⇒ Object
creates an uml enumeration listing every node leaving this transition This is usefull for decision node.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/ontomde-uml2-jpdl/main.rb', line 246 def bpm_createEnumerationForTransitions!(processClass) mrdf=context[:umlModel,self.rdf_model] muml=mrdf.umlx_reserved_model p=processClass.umlx_owner_one return if !hasMultipleTransitions? p=p.umlx_getOrCreatePackage(p.context[:bpm_javaSubPackage],p) p=p.umlx_getOrCreatePackage(processClass.uml_name.to_s) i=p.umlx_getOrCreateEnumeration("#{bpm_nodeName}_BpmTransitions",p) i.umlx_external="false" self.bpm_javaTransitionNameEnum=i bpm_leavingTransition.each { |t| i.umlx_createAndAddLiteral(t.bpm_transitionName.to_s) } end |
#hasMultipleTransitions? ⇒ Boolean
Indique si ce noeud a plusieurs sorties et donc si on génère un Enum pour son type de retour
234 235 236 237 238 239 240 241 |
# File 'lib/ontomde-uml2-jpdl/main.rb', line 234 def hasMultipleTransitions? return false if bpm_leavingTransition.nil? nb = 0 bpm_leavingTransition.each { |transition| nb += 1 if !transition.kind_of?(Mbpm_timeOutTransition) } return nb > 1 end |