- TIBCO BusinessEvents®
- Standard
- Instance

# Instance

## Description

Functions to create and modify instances of type Concept

## Categories

Name | Description
--- | ---
`PropertyArray` | Utility Functions to Operate on PropertyArray types of Concepts
`PropertyAtom` | Utility functions to operate on PropertyAtom properties
`Reflection` | Reflection method for Concept
`StateMachine` | Utility functions to operate on StateMachines

## Functions

Name | Signature and Synopsis
--- | ---
`createInstance` | `Concept createInstance (String xslt-template)` Creates a new Concept instance based on the data provided in the XSLT Mapper and adds it to the working memory. Adding the instance to the working memory will cause any rule conditions that depend on the concept to be evaluated.
`createInstanceFromJSON` | `Concept createInstanceFromJSON (String uri, String json)` This function creates a new Concept instance by deserializing the JSON data provided. The form of the JSON data provided is expected to be the same as the output from `serialize()`. The new Concept instance is added to the working memory. Adding the instance to the working memory will cause any rule conditions that depend on the concept to be evaluated.
`createInstanceFromXML` | `Concept createInstanceFromXML (String uri, String xml)` This function creates a new Concept instance by deserializing the XML data provided. If `uri` is null, then the URI will be inferred from the namespace in `xml`. The form of the XML data provided is expected to be the same as the output from `serialize()`. The new Concept instance is added to the working memory. Adding the instance to the working memory will cause any rule conditions that depend on the concept to be evaluated.
`createTransientInstanceFromEvent` | `Concept createTransientInstanceFromEvent (String uri, SimpleEvent event)` This function returns a concept instance using the payload from the event passed in the `event` parameter. The payload must adhere to the XML schema corresponding to the concept definition. The concept instance is not asserted (hence it is $1transient$1). You can then, for example, use the transient concept's property values to update an asserted concept's properties.
`createTransientInstanceFromJSON` | `Concept createTransientInstanceFromJSON (String uri, String json)` This function creates a new Concept instance by deserializing the JSON data provided. The form of the JSON data provided is expected to be the same as the output from `serialize()`. The newly created Concept instance is NOT added to the working memory.
`createTransientInstanceFromXML` | `Concept createTransientInstanceFromXML (String uri, String xml)` This function creates a new Concept instance by deserializing the XML data provided. If `uri` is null, then the URI will be inferred from the namespace in `xml`. The form of the XML data provided is expected to be the same as the output from `serialize()`. The newly created Concept instance is NOT added to the working memory.
`deleteInstance` | `Concept deleteInstance (Concept instance)`
`filterAndSerializeUsingDefaults` | `String filterAndSerializeUsingDefaults (Concept instance, String propertyNameRegexFilter)` Serializes a Concept instance into an XML String with the default namespace URI for concepts, and with the inclusion of properties controlled by a regex filter.
`getByExtIdByUri` | `Concept getByExtIdByURI (String extId, String uri)` Returns the Concept instance identified by `extId` and with URI matching `URI` or null if not found. Note: This method should not be used to load cache-only concepts into working memory for modifications, especially if they have not already been loaded in a pre-processor.
`getById` | `Concept getById (Object Id)`
`getExpandedName` | `String getExpandedName (Concept instance)` Returns the fully qualified namespace URI for `instance`.
`getReverseReferences` | `Object[] getReverseReferences(Concept instance)`
`getStateMachineOwner` | `Concept getStateMachineOwner (Concept instance)`
`isModified` | `boolean isModified (Concept instance)` This function returns true if `instance` has been modified by a currently running RTC. This function will return false again once any of the modifying RTCs has ended.
`isNew` | `boolean isNew (Concept instance)` This function returns true if `instance` was created by a currently running RTC. It also returns true if `instance` has been configured for cache-only mode and has not been loaded into any current RTC.
`isStateMachine` | `boolean isStateMachine (Concept instance)`
`newInstance` | `Concept newInstance (String uri, String extId)`
`newTransientInstance` | `Concept newTransientInstance (String uri)`
`serialize` | `String serialize (Concept instance, boolean changedOnly, String nameSpace, String root)` Serializes a Concept instance into an XML string.
`serializeToJSON` | `String serializeToJSON (Concept instance, boolean pretty, String root)` Serializes a Concept instance into an JSON string.
`serializeUsingDefaults` | `String serializeUsingDefaults (Concept instance)` Serializes a Concept instance into an XML string using the default namespace URI for Concepts.
`startStateMachine` | `void startStateMachine(Concept instance, boolean startChildren)` Start a Concept instance's main state machine, and optionally, the main state machines of its contained concepts.
`updateInstance` | `void updateInstance (String xslt-template)` Updates a Concept instance based on the data provided in the XSLT Mapper. Modifying the instance in the working memory will cause any rule conditions that depend on the concept to be evaluated.
`updateInstanceFromJSON` | `Concept updateInstanceFromJSON (String uri, String json)` Update a Concept instance with data contained in an JSON serialization of concept data. The Concept instance to be updated is identified by an extId attribute in the serialized concept data. An Exception will be thrown if the extId provided does not match any existing Concept instance.
`updateInstanceFromXML` | `Concept updateInstanceFromXML (String xml)` Update a Concept instance with data contained in an XML serialization of concept data. The Concept instance to be updated is identified by an extId attribute in the serialized concept data. An Exception will be thrown if the extId provided does not match any existing Concept instance.