Module: UU::OS::ActivityTemplate
- Extended by:
- ActivityTemplate
- Included in:
- ActivityTemplate
- Defined in:
- uu_os-0.29.16/lib/uu/os/activity_template.rb,
uu_os-0.29.16/lib/uu/os/activity_template/activity_template_create.rb,
uu_os-0.29.16/lib/uu/os/activity_template/activity_template_attributes.rb,
uu_os-0.29.16/lib/uu/os/activity_template/activity_template_set_attributes.rb,
uu_os-0.29.16/lib/uu/os/activity_template/activity_template_get_activity_template_list.rb
Overview
Module Activity Template.
Defined Under Namespace
Classes: ActivityTemplateAttributes, ActivityTemplateCreate, ActivityTemplateGetActivityTemplateList, ActivityTemplateSetAttributes
Constant Summary
- PATH =
Service path
'uu/os/ActivityTemplate'
Instance Method Summary (collapse)
-
- (UU::OS::UESURI) create(parent_node_uri, options)
Creates a new activity template either on the specified meta artifact or on the specified activity template (in the case of creating a new template for subactivities).
-
- (Object) delete(activity_template_uri)
Deletes the activity template.
-
- (UU::OS::REST::ResultList<ActivityStateTemplate::ActivityStateTemplateGetActivityStateTemplateList, ActivityStateTemplate::ActivityStateTemplateAttributes>) get_activity_template_list(meta_artifact_uri, criteria = nil)
Returns a list of activity templates of the specified meta artifact according to the entered criteria.
-
- (UU::OS::ActivityTemplate::ActivityTemplateAttributes) get_attributes(activity_template_uri)
Returns attributes of the specified activity template.
-
- (UU::OS::UESURI) set_attributes(activity_template_uri, options)
Sets basic attributes of the specified activity template.
Instance Method Details
- (UU::OS::UESURI) create(parent_node_uri, options)
Creates a new activity template either on the specified meta artifact or on the specified activity template (in the case of creating a new template for subactivities). At least, its future name and type have to be specified in this command.
94 95 96 97 98 99 100 101 102 |
# File 'uu_os-0.29.16/lib/uu/os/activity_template.rb', line 94 def create(parent_node_uri, ) svc = UU::OS::REST::RemoteClient.new(ActivityTemplate) payload = UU::OS::ActivityTemplate::ActivityTemplateCreate.new().to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('create', parent_node_uri, payload) return UU::OS::UESURI.new(res) end end |
- (Object) delete(activity_template_uri)
Deletes the activity template. It cannot be deleted in case there is an action or condition that contains this template or if the template has already been used for creating another template. Also, it is not possible to delete generic templates.
178 179 180 181 182 183 |
# File 'uu_os-0.29.16/lib/uu/os/activity_template.rb', line 178 def delete(activity_template_uri) svc = UU::OS::REST::RemoteClient.new(ActivityTemplate) UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('delete', activity_template_uri) end end |
- (UU::OS::REST::ResultList<ActivityStateTemplate::ActivityStateTemplateGetActivityStateTemplateList, ActivityStateTemplate::ActivityStateTemplateAttributes>) get_activity_template_list(meta_artifact_uri, criteria = nil)
Returns a list of activity templates of the specified meta artifact according to the entered criteria.
199 200 201 202 203 204 205 206 207 208 209 |
# File 'uu_os-0.29.16/lib/uu/os/activity_template.rb', line 199 def get_activity_template_list(, criteria = nil) svc = UU::OS::REST::RemoteClient.new(ActivityTemplate) dto = ActivityTemplate::ActivityTemplateGetActivityTemplateList.new(criteria) svc.add_parameter('pageIndex', dto.page_index) svc.add_parameter('pageSize', dto.page_size) svc.add_parameter('query', dto.query) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getActivityTemplateList', ) return UU::OS::REST::ResultList.new(ActivityTemplate::ActivityTemplateGetActivityTemplateList, ActivityTemplate::ActivityTemplateAttributes, res) end end |
- (UU::OS::ActivityTemplate::ActivityTemplateAttributes) get_attributes(activity_template_uri)
Returns attributes of the specified activity template.
113 114 115 116 117 118 119 |
# File 'uu_os-0.29.16/lib/uu/os/activity_template.rb', line 113 def get_attributes(activity_template_uri) svc = UU::OS::REST::RemoteClient.new(ActivityTemplate) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', activity_template_uri) return ActivityTemplate::ActivityTemplateAttributes.new(res) end end |
- (UU::OS::UESURI) set_attributes(activity_template_uri, options)
Sets basic attributes of the specified activity template. This command cannot modify the type.
159 160 161 162 163 164 165 166 167 |
# File 'uu_os-0.29.16/lib/uu/os/activity_template.rb', line 159 def set_attributes(activity_template_uri, ) svc = UU::OS::REST::RemoteClient.new(ActivityTemplate) payload = UU::OS::ActivityTemplate::ActivityTemplateSetAttributes.new().to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', activity_template_uri, payload) return UU::OS::UESURI.new(res) end end |