本文整理汇总了Python中interface.objects.ProcessDefinition.description方法的典型用法代码示例。如果您正苦于以下问题:Python ProcessDefinition.description方法的具体用法?Python ProcessDefinition.description怎么用?Python ProcessDefinition.description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类interface.objects.ProcessDefinition
的用法示例。
在下文中一共展示了ProcessDefinition.description方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_data_process_definition
# 需要导入模块: from interface.objects import ProcessDefinition [as 别名]
# 或者: from interface.objects.ProcessDefinition import description [as 别名]
def create_data_process_definition(self, data_process_definition=None):
data_process_definition_id = self.RR2.create(data_process_definition, RT.DataProcessDefinition)
# -------------------------------
# Process Definition
# -------------------------------
# Create the underlying process definition
process_definition = ProcessDefinition()
process_definition.name = data_process_definition.name
process_definition.description = data_process_definition.description
process_definition.executable = {
"module": data_process_definition.module,
"class": data_process_definition.class_name,
}
process_definition_id = self.clients.process_dispatcher.create_process_definition(
process_definition=process_definition
)
self.RR2.assign_process_definition_to_data_process_definition_with_has_process_definition(
process_definition_id, data_process_definition_id
)
return data_process_definition_id
示例2: create_data_process_definition
# 需要导入模块: from interface.objects import ProcessDefinition [as 别名]
# 或者: from interface.objects.ProcessDefinition import description [as 别名]
def create_data_process_definition(self, data_process_definition=None):
result, _ = self.clients.resource_registry.find_resources(RT.DataProcessDefinition, None, data_process_definition.name, True)
validate_true( len(result) ==0, "A data process definition named '%s' already exists" % data_process_definition.name)
#todo: determine validation checks for a data process def
data_process_definition_id, version = self.clients.resource_registry.create(data_process_definition)
#-------------------------------
# Process Definition
#-------------------------------
# Create the underlying process definition
process_definition = ProcessDefinition()
process_definition.name = data_process_definition.name
process_definition.description = data_process_definition.description
process_definition.executable = {'module':data_process_definition.module, 'class':data_process_definition.class_name}
process_definition_id = self.clients.process_dispatcher.create_process_definition(process_definition=process_definition)
self.clients.resource_registry.create_association(data_process_definition_id, PRED.hasProcessDefinition, process_definition_id)
return data_process_definition_id