Jump to: navigation, search

Difference between revisions of "Activity:CreateInstance (Activity)"


m (moved CreateInstance (Activity) to CreateInstance (Activity): Text replacement - "(.*)\(Activity\)" to "Activity:$1(Activity)")
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
The CreateInstance Activity creates a new [[Instance|instance]] of a specified [[MetaClass]].
 +
 +
=Description=
 
{{ActivityInfoBox
 
{{ActivityInfoBox
 
| title = Create Instance
 
| title = Create Instance
Line 9: Line 12:
 
| version = 2.1+
 
| version = 2.1+
 
}}
 
}}
The CreateInstance Activity creates a new [[Instance|instance]] of a specified [[MetaClass]].
 
  
==Arguments==
+
===Arguments===
  
 
{| class="wikitable sortable" | width = "50%"
 
{| class="wikitable sortable" | width = "50%"
Line 22: Line 24:
 
|}
 
|}
  
==Usage==
+
===Usage===
 
This activity is used to create new {{UBIK}} objects during the execution of a workflow. Since it only needs to know the MetaClass to create objects from, it can be used to create regular content objects as well as properties or anything else.
 
This activity is used to create new {{UBIK}} objects during the execution of a workflow. Since it only needs to know the MetaClass to create objects from, it can be used to create regular content objects as well as properties or anything else.
  
{{Attention|This activity does not automatically save changes. If you want to persist the newly created instance, you need i.e. a subsequent [[Activity SaveObject|SaveObject activity]]!}}
+
{{Attention|This activity does not automatically save changes. If you want to persist the newly created instance, you need i.e. a subsequent [[Activity:SaveObject_(Activity)|SaveObject activity]]!}}
  
==Example==
+
=Example=
 
Load the MetaClass named ''PUMP'', and create a new instance from it:
 
Load the MetaClass named ''PUMP'', and create a new instance from it:
  
Line 38: Line 40:
 
.AllInstances("PUMP")</source>
 
.AllInstances("PUMP")</source>
 
|}
 
|}
 +
 +
<headertabs />
  
 
==See also==
 
==See also==
 
* [[Workflow Designer]]
 
* [[Workflow Designer]]
* [[SaveObject (Activity)]]
+
* [[Activity:SaveObject (Activity)]]
  
 
[[Category:Activities]]
 
[[Category:Activities]]

Latest revision as of 17:10, 23 February 2015

The CreateInstance Activity creates a new Instance of a specified MetaClass.

[edit]

Description

Create Instance
Name CreateInstance
Purpose Create a new instance of a MetaClass
Category UBIK Object Primitives
Returns The created instance
Version 2.1+

Arguments

Argument Type Direction Purpose
MetaClass BaseClass In The MetaClass to create the instance from
Result RelationalObject Out The created instance, null if creation failed

Usage

This activity is used to create new UBIK® objects during the execution of a workflow. Since it only needs to know the MetaClass to create objects from, it can be used to create regular content objects as well as properties or anything else.

IC Attention.pngThis activity does not automatically save changes. If you want to persist the newly created instance, you need i.e. a subsequent SaveObject activity!

Example

Load the MetaClass named PUMP, and create a new instance from it:

Argument Value
MetaClass
UBIKObject.Environment _
.GetSystemMetaClass(UBIK.Kernel.SystemObjects.METACLASS) _
.AllInstances("PUMP")

See also