-
Notifications
You must be signed in to change notification settings - Fork 48
datastore
bpmn-server / DataStore
super class for various objects that are part of the server
-
↳
DataStore
- convertColl
- convertObj
- deleteInstances
- findInstance
- findInstances
- findItem
- findItems
- install
- loadInstance
- save
• new DataStore(server
): DataStore
Name | Type |
---|---|
server |
IBPMNServer |
• db: any
• dbConfiguration: any
• execution: Execution
• inSaving: boolean
= false
• isModified: boolean
= false
• isRunning: boolean
= false
• locker: any
• promises: any
[] = []
• server: any
▪ Static
seq: number
= 0
• get
appDelegate(): any
any
ServerComponent.appDelegate
• get
cache(): CacheManager
ServerComponent.cache
• get
configuration(): any
any
ServerComponent.configuration
• get
cron(): Cron
ServerComponent.cron
• get
dataStore(): any
any
ServerComponent.dataStore
• get
definitions(): any
any
ServerComponent.definitions
• get
engine(): IEngine
ServerComponent.engine
• get
listener(): any
any
ServerComponent.listener
• get
logger(): any
any
ServerComponent.logger
▸ convertColl(coll
, cls
): void
Name | Type |
---|---|
coll |
any |
cls |
any |
void
▸ convertObj(obj
, cls
): any
Name | Type |
---|---|
obj |
any |
cls |
any |
any
▸ deleteInstances(query
): Promise
<any
>
Name | Type |
---|---|
query |
any |
Promise
<any
>
▸ findInstance(query
, options
): Promise
<IInstanceData
>
Name | Type |
---|---|
query |
any |
options |
any |
Promise
<IInstanceData
>
▸ findInstances(query
, option?
): Promise
<IInstanceData
[]>
Name | Type | Default value |
---|---|---|
query |
any |
undefined |
option |
any |
'summary' |
Promise
<IInstanceData
[]>
▸ findItem(query
): Promise
<IItemData
>
Name | Type |
---|---|
query |
any |
Promise
<IItemData
>
▸ 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 }
New approach: just like MongoDB 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
Name | Type |
---|---|
query |
any |
Promise
<IItemData
[]>
▸ install(): Promise
<void
>
first time installation of DB
creates a new collection and add an index
Promise
<void
>
▸ loadInstance(instanceId
, options?
): Promise
<{ instance
: IInstanceData
= instanceData; items
: any
[] }>
Name | Type |
---|---|
instanceId |
any |
options |
Object |
Promise
<{ instance
: IInstanceData
= instanceData; items
: any
[] }>
▸ save(instance
, options?
): Promise
<void
>
Name | Type |
---|---|
instance |
any |
options |
Object |
Promise
<void
>