Module: Mbpm_named_Node

Defined in:
lib/ontomde-java/jpdl/main.rb

Instance Method Summary collapse

Instance Method Details

#bpm_addJavaProcessOperation(j) ⇒ Object

adds a method in java process for this node



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/ontomde-java/jpdl/main.rb', line 203

def bpm_addJavaProcessOperation(j)
  o=nil
  j.uml_ownedOperation.each { |op|
    o=op if op.java_Name.to_s.casecmp(op.java_safeName(self.bpm_nodeName.to_s))==0
  }
  o=j.umlx_createAndAddOperation(self.rdf_uri+"meth",self.bpm_nodeName) if o.nil?
  o.uml_name=self.bpm_nodeName #case fix
  if self.kind_of?(Mbpm_source_Node) && hasMultipleTransitions?
    r=o.umlx_createAndAddReturnParameter(o.rdf_uri+"_return")
    r.uml_type=self.bpm_javaTransitionNameEnum_one
    o.java_code=<<END
//TODO: replace this test code by real implementation
log.debug("test method called #{o.uml_name}");
return #{self.bpm_javaTransitionNameEnum_one.java_qualifiedName}.values()[0];
END
  else
    o.java_code=<<END
//TODO: replace this test code by real implementation
log.debug("test method called #{o.uml_name}");
END
  end
  if self.kind_of?(Mbpm_asynchronousNode)
    #Ajout du paramètre callback
    p=o.umlx_createAndAddParameter(o.rdf_uri+"_param", "_callback")
    mrdf=context[:umlModel,self.rdf_Repository]
    muml=mrdf.umlx_reserved_model
    i=muml.umlx_getOrCreateInterface(BPM::CallbackClass)
    i.umlx_external="true"
    p.uml_type=i
  end
end

#bpm_qualifiedNameObject

returns a qualified name for this node



194
195
196
# File 'lib/ontomde-java/jpdl/main.rb', line 194

def bpm_qualifiedName
  return "#{bpm_processNode_inv_one.bpm_qualifiedName}.#{bpm_nodeName}"
end

#hasMultipleTransitions?Boolean

Returns:

  • (Boolean)


198
199
200
# File 'lib/ontomde-java/jpdl/main.rb', line 198

def hasMultipleTransitions?
  return false
end