Difference between revisions of "Activity:AssignToNamedRelation (Activity)"
(Created page with "The AssignedToNamedRelation activity assigns a child objec via the name of an existing Relation to a given parent object. {{ActivityInfoBox | title = Assign To ...") |
|||
(15 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The AssignedToNamedRelation activity assigns a child objec via the name of an existing [[Relation|relation]] to a given parent object. | The AssignedToNamedRelation activity assigns a child objec via the name of an existing [[Relation|relation]] to a given parent object. | ||
− | + | =Description= | |
− | + | ||
{{ActivityInfoBox | {{ActivityInfoBox | ||
| title = Assign To Named Relation | | title = Assign To Named Relation | ||
Line 8: | Line 7: | ||
| imagecaption = Activity AssignToNamedRelation | | imagecaption = Activity AssignToNamedRelation | ||
| purpose = Relate child object to parent object | | purpose = Relate child object to parent object | ||
− | | category = Object Primitives | + | | category = UBIK Object Primitives |
| returns = True if successful | | returns = True if successful | ||
| version = 2.1.15+ | | version = 2.1.15+ | ||
}} | }} | ||
− | + | ===Arguments=== | |
− | + | ||
− | + | ||
− | + | ||
− | ==Arguments== | + | |
{| class="wikitable sortable" | width = "50%" | {| class="wikitable sortable" | width = "50%" | ||
Line 23: | Line 18: | ||
! Argument !! Type !! Direction !! Purpose | ! Argument !! Type !! Direction !! Purpose | ||
|- align="left" | |- align="left" | ||
− | | Parent || RelationalObject || In || The parent object | + | | Parent || [[RelationalObject]] || In || The parent object |
|- align="left" | |- align="left" | ||
− | | RelationName || | + | | RelationName || {{String_MSDN}}|| In || The name of the relation to be searched for at the parent object |
|- align="left" | |- align="left" | ||
− | | Child || RelationalObject || In || The child to relate | + | | Child || [[RelationalObject]] || In || The child to relate |
|- align="left" | |- align="left" | ||
− | | RelationData|| RelationData || Out || The created relation data object, null if failed | + | | RelationData|| [[RelationData]] || Out || The created relation data object, null if failed |
|- align="left" | |- align="left" | ||
− | | Result|| | + | | Result|| {{Boolean_MSDN}}|| Out || True if successful, false if failed |
|} | |} | ||
− | ==Usage== | + | ===Usage=== |
This activity is used to find a certain relation at the parent object via the name and then relate the child object to it. | This activity is used to find a certain relation at the parent object via the name and then relate the child object to it. | ||
− | + | =Example= | |
− | + | Load the MetaClass named ''PUMP'', also load the MetaProperty ''NOMINALPOWER'' from the property pool and then add it to the MetaClasses' properties: | |
− | Load the MetaClass named PUMP, also load the MetaProperty | + | |
− | + | ||
{| class="wikitable" | width = "50%" | {| class="wikitable" | width = "50%" | ||
Line 47: | Line 40: | ||
! Argument!! Value | ! Argument!! Value | ||
|- align="left" | |- align="left" | ||
− | | Parent || | + | | Parent || <source lang = "vbnet">UBIKObject.Environment _ |
+ | .GetSystemMetaClass(SystemObjects.METACLASS) _ | ||
+ | .AllInstances("PUMP")</source> | ||
|- align="left" | |- align="left" | ||
| RelationName || <source lang = "vbnet">"SYSREL_METAPROPERTY"</source> | | RelationName || <source lang = "vbnet">"SYSREL_METAPROPERTY"</source> | ||
|- align="left" | |- align="left" | ||
− | | Child || | + | | Child || <source lang = "vbnet">UBIKObject.Environment _ |
+ | .GetSystemMetaClass(SystemObjects.POOL_METAPROPERTY) _ | ||
+ | .GetMetaProperty("NOMINALPOWER")</source> | ||
|} | |} | ||
+ | |||
+ | <headertabs /> | ||
==See also== | ==See also== | ||
* [[Workflow Designer]] | * [[Workflow Designer]] | ||
− | * [[Activity RemoveFromNamedRelation]] | + | * [[Activity:RemoveFromNamedRelation (Activity)]] |
− | + | [[Category:Activities]] |
Latest revision as of 13:54, 23 February 2015
The AssignedToNamedRelation activity assigns a child objec via the name of an existing Relation to a given parent object.