bpmn-server / DataStore
Class: DataStore#
super class for various objects that are part of the server
Hierarchy#
↳ DataStore
Implements#
Table of contents#
Constructors#
Properties#
- dbConfiguration
- db
- execution
- isModified
- isRunning
- inSaving
- promises
- locker
- enableSavePoints
- seq
- server
Accessors#
Methods#
- save
- loadInstance
- getItemsFromInstances
- saveInstance
- findItem
- findInstance
- convertObj
- convertColl
- findInstances
- findItems
- deleteInstances
- install
- archive
Constructors#
constructor#
• new DataStore(server
): DataStore
Parameters#
Name | Type |
---|---|
server |
IBPMNServer |
Returns#
Overrides#
Defined in#
Properties#
dbConfiguration#
• dbConfiguration: any
Implementation of#
Defined in#
db#
• db: any
Implementation of#
Defined in#
execution#
• execution: Execution
Defined in#
isModified#
• isModified: boolean
= false
Defined in#
isRunning#
• isRunning: boolean
= false
Defined in#
inSaving#
• inSaving: boolean
= false
Defined in#
promises#
• promises: any
[] = []
Defined in#
locker#
• locker: any
Implementation of#
Defined in#
enableSavePoints#
• enableSavePoints: boolean
= false
Defined in#
seq#
▪ Static
seq: number
= 0
Defined in#
server#
• server: any
Inherited from#
Defined in#
Accessors#
configuration#
• get
configuration(): any
Returns#
any
Inherited from#
ServerComponent.configuration
Defined in#
logger#
• get
logger(): any
Returns#
any
Implementation of#
Inherited from#
ServerComponent.logger
Defined in#
cron#
• get
cron(): Cron
Returns#
Inherited from#
ServerComponent.cron
Defined in#
cache#
• get
cache(): CacheManager
Returns#
Inherited from#
ServerComponent.cache
Defined in#
appDelegate#
• get
appDelegate(): any
Returns#
any
Inherited from#
ServerComponent.appDelegate
Defined in#
engine#
• get
engine(): IEngine
Returns#
Inherited from#
ServerComponent.engine
Defined in#
dataStore#
• get
dataStore(): any
Returns#
any
Inherited from#
ServerComponent.dataStore
Defined in#
definitions#
• get
definitions(): any
Returns#
any
Inherited from#
ServerComponent.definitions
Defined in#
listener#
• get
listener(): any
Returns#
any
Inherited from#
ServerComponent.listener
Defined in#
Methods#
save#
▸ save(instance
, options?
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
instance |
any |
options |
Object |
Returns#
Promise
\<void
>
Implementation of#
Defined in#
loadInstance#
▸ loadInstance(instanceId
, options?
): Promise
\<{ instance
: IInstanceData
= instanceData; items
: any
[] }>
Parameters#
Name | Type |
---|---|
instanceId |
any |
options |
Object |
Returns#
Promise
\<{ instance
: IInstanceData
= instanceData; items
: any
[] }>
Implementation of#
Defined in#
getItemsFromInstances#
▸ getItemsFromInstances(instances
, condition?
, trans?
): any
[]
Parameters#
Name | Type | Default value |
---|---|---|
instances |
any |
undefined |
condition |
any |
null |
trans |
any |
null |
Returns#
any
[]
Defined in#
saveInstance#
▸ saveInstance(instance
, options?
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
instance |
any |
options |
Object |
Returns#
Promise
\<void
>
Defined in#
findItem#
▸ findItem(query
): Promise
\<IItemData
>
Parameters#
Name | Type |
---|---|
query |
any |
Returns#
Promise
\<IItemData
>
Implementation of#
Defined in#
findInstance#
▸ findInstance(query
, options
): Promise
\<IInstanceData
>
Parameters#
Name | Type |
---|---|
query |
any |
options |
any |
Returns#
Promise
\<IInstanceData
>
Implementation of#
Defined in#
convertObj#
▸ convertObj(obj
, cls
): any
Parameters#
Name | Type |
---|---|
obj |
any |
cls |
any |
Returns#
any
Defined in#
convertColl#
▸ convertColl(coll
, cls
): void
Parameters#
Name | Type |
---|---|
coll |
any |
cls |
any |
Returns#
void
Defined in#
findInstances#
▸ findInstances(query
, option?
): Promise
\<IInstanceData
[]>
Parameters#
Name | Type | Default value |
---|---|---|
query |
any |
undefined |
option |
any |
'summary' |
Returns#
Promise
\<IInstanceData
[]>
Implementation of#
Defined in#
findItems#
▸ findItems(query
): Promise
\<IItemData
[]>
scenario:
itemId { items { id : value } }
itemKey { items {key: value } }
instance, task { instance: { id: instanceId }, items: { elementId: value }}
message { items: { messageId: nameofmessage, key: value } {}
status { items: {status: 'wait' } }
custom: { query: query, projection: projection }
itemId { items { id : value } }
itemKey { items {key: value } }
instance, task { id: instanceId , items.elementId: value }
message { items.messageId: nameofmessage, key: value } {}
status { items.status: 'wait' } }
custom: { query: query, projection: projection }
Problem with Mongodb: projection $elematch returns only the first record
Parameters#
Name | Type |
---|---|
query |
any |
Returns#
Promise
\<IItemData
[]>
Implementation of#
Defined in#
deleteInstances#
▸ deleteInstances(query
): Promise
\<any
>
Parameters#
Name | Type |
---|---|
query |
any |
Returns#
Promise
\<any
>
Implementation of#
Defined in#
install#
▸ install(): Promise
\<void
>
first time installation of DB
creates a new collection and add an index
Returns#
Promise
\<void
>
Implementation of#
Defined in#
archive#
▸ archive(query
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
query |
any |
Returns#
Promise
\<void
>