Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.18 KB | None | 0 0
  1.     evaluationEvaluator_Name = "Evaluator"
  2.     evaluationEvaluator_Evaluation = "Evaluation"
  3.     evaluationEvaluator_EvaluationBR = "Evaluators"
  4.     evaluationEvaluator_Evaluator = "Evaluator"
  5.     evaluationEvaluator_EvaluatorBR = "Evaluators"
  6.     evaluationEvaluator_Link = "Link"
  7.     evaluationEvaluator_EvaluationState = "Evaluation State"
  8.     evaluationEvaluator_DefaultDisplay = "Default Display"
  9.     ############## EvaluationEvaluator ################    
  10.     if model.Entities.Contains("EvaluationEvaluator") == False:
  11.         entity = ModelEntity({"Name": "EvaluationEvaluator", "InvariantFriendlyName": evaluationEvaluator_Name, "Ownership": Ownership.ApplicationSpecific, "DefaultListName": "DefaultListEvaluationEvaluator", "DefaultFormName": "DefaultFormEvaluationEvaluator"}) 
  12.         entity.ElementGuid = Guid("82F39315-54A9-4BE0-949E-B041442C82DD")  
  13.         entity.Relations.Add(Relation({"Name":"Evaluation", "InvariantFriendlyName": evaluationEvaluator_Evaluation, "Target": model.Evaluation, "BackReferenceName": "EvaluationEvaluators", "BackReferenceInvariantFriendlyName": evaluationEvaluator_EvaluationBR,"Ownership": Ownership.ApplicationSpecific})) 
  14.         entity.Relations.Add(Relation({"Name":"Evaluator", "InvariantFriendlyName": evaluationEvaluator_Evaluator, "Target": model.UserDetail, "BackReferenceName": "EvaluationEvaluators", "BackReferenceInvariantFriendlyName":evaluationEvaluator_EvaluatorBR, "Ownership": Ownership.ApplicationSpecific}))
  15.         entity.Properties.Add(TextProperty({"Name": "Link", "InvariantFriendlyName": evaluationEvaluator_Link, "MaxStorageSize": 99, "IsNullable": True, "Ownership": Ownership.ApplicationSpecific})) 
  16.         entity.Properties.Add(BooleanProperty({"Name": "EvaluationState", "InvariantFriendlyName": evaluationEvaluator_EvaluationState, "DefaultValueExpression": "False", "IsNullable": False, "Ownership": Ownership.ApplicationSpecific }))
  17.         ############# check here
  18.         entity.Properties.Add(CalculatedProperty({"Name": "DefaultDisplay", "InvariantFriendlyName":evaluationEvaluator_DefaultDisplay, "Formula":"Current.Evaluation + '/' + Current.Evaluator", "IsDefaultDisplayProperty": True, "Ownership": Ownership.ApplicationSpecific}))      
  19.         model.Entities.Add(entity)
  20.         print "EvaluationEvaluator added"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement