Module: Muml_Classifier
- Defined in:
- lib/ontomde-uml2-jpdl/processOperationToClass.rb
Instance Method Summary collapse
-
#bpm_addAllOperationAggregateParameterClass!(biz) ⇒ Object
STRUTS_RESULT_PARAM_NAME=“_result”.
- #bpm_addApplyToParameter!(biz) ⇒ Object
- #bpm_addProceed!(biz) ⇒ Object
Instance Method Details
#bpm_addAllOperationAggregateParameterClass!(biz) ⇒ Object
STRUTS_RESULT_PARAM_NAME=“_result”
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/ontomde-uml2-jpdl/processOperationToClass.rb', line 253 def bpm_addAllOperationAggregateParameterClass!(biz) mpc=self mpc.bpm_bizOperation=biz biz.bpm_bizOperationReverse_add(mpc) #biz.bpm_bizForm=mpc #mpc.uml_name="#{biz.umlx_owner_one.java_Name}#{biz.java_Name}PROC" #method process is expected to be unique #in namespace mpc.uml_name="#{biz.java_Name.to_s}" (biz.uml_ownedParameter+biz.uml_returnResult).each { |param| next if param.uml_direction_one.isReturn? mpcp=mpc.umlx_createAndAddProperty(param.rdf_uri+"_proc") param.umlx_copyToAttributeProperty(mpcp) mpcp.uml_name= param.uml_direction_one.isReturn? ? STRUTS_RESULT_PARAM_NAME : param.uml_name } mpc.bpm_addApplyToParameter!(biz) mpc.bpm_addProceed!(biz) #mpc.apaCom_addLogger! end |
#bpm_addApplyToParameter!(biz) ⇒ Object
274 275 276 277 278 279 280 |
# File 'lib/ontomde-uml2-jpdl/processOperationToClass.rb', line 274 def bpm_addApplyToParameter!(biz) return mpc=self m,m1,m2=mpc.umlx_createAndAddAssociation(mpc.rdf_uri+"_apply",biz.umlx_owner_one) m1.uml_name=STRUTS_APPLY_TO_PARAM m2.uml_name="#{STRUTS_APPLY_TO_PARAM}_inv" end |
#bpm_addProceed!(biz) ⇒ Object
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/ontomde-uml2-jpdl/processOperationToClass.rb', line 282 def bpm_addProceed!(biz) return mpc=self cpt=mpc.umlx_createAndAddOperation(mpc.rdf_uri+"_proceed","proceed") params=""; sep="" hasRP=false (biz.uml_ownedParameter+biz.uml_returnResult).each { |param| if param.uml_direction_one.isReturn? hasRP=true next end params="#{params}#{sep}#{param.java_Name}" sep="," } if(biz.uml_raisedException.empty?) cpt.java_code=%{ #{hasRP ? "#{STRUTS_RESULT_PARAM_NAME}=" : ""} #{STRUTS_APPLY_TO_PARAM}.#{biz.java_Name}(#{params}); } else cpt.java_code=%{ try { //log.error("before biz method"); //log.error("applyTo="+#{STRUTS_APPLY_TO_PARAM}); #{hasRP ? "#{STRUTS_RESULT_PARAM_NAME}=" : ""} #{STRUTS_APPLY_TO_PARAM}.#{biz.java_Name}(#{params}); //log.error("after biz method"); //log.error("result="+#{hasRP ? STRUTS_RESULT_PARAM_NAME : %{"-none-"}}); } catch(Exception e) { //TODO: implement proper exception handling throw new java.lang.RuntimeException(e); } } end end |