Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge read, write, delete and exceptions with 2023.7 #39

Merged
merged 43 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2748ef7
initial
cortex-sg Jul 24, 2023
f704ff9
Merge branch '2023.7' into feature/9176-data-storage-blocks
cortex-sg Jul 24, 2023
6bd73b6
Create collection block inital
cortex-sg Jul 25, 2023
be62b3e
renamed scope to collectonscope
cortex-sg Jul 25, 2023
6fde4a1
Added scopeoptions + scope amd made small changes to createcollection…
cortex-sg Jul 25, 2023
08585ab
Small fix
cortex-sg Jul 25, 2023
2aeccb9
Added serviceunavailablexception and links
cortex-sg Jul 26, 2023
a9034cb
added icon
cortex-sg Jul 27, 2023
6ca0f1b
Write data with key block doc initial commit
cortex-sg Jul 27, 2023
b979aa6
Fixed typo and added block to exceptions
cortex-sg Jul 27, 2023
73b7cc4
added data storage collection to concepts
cortex-sg Jul 28, 2023
f5ade1e
CreateCollection signed off
cortex-sg Jul 31, 2023
403f152
refined scope, scopeoption and exception
cortex-sg Jul 31, 2023
9b5e0ac
Edits
cortex-sg Jul 31, 2023
a7b5f7a
Final sign off
cortex-sg Jul 31, 2023
34666a2
Merge branch 'feature/9176-data-storage-blocks' into feature/2023.7/9…
cortex-sg Aug 1, 2023
a18dc5f
Refined WriteDataWithKey, changed namespaces, added exception files
cortex-sg Aug 1, 2023
356bd4d
fixed toml
cortex-sg Aug 1, 2023
6b656ab
Merge branch 'feature/9176-data-storage-blocks' into feature/2023.7/9…
cortex-sg Aug 1, 2023
692f6f8
links and index changes
cortex-sg Aug 1, 2023
089b1e3
added icon
cortex-sg Aug 1, 2023
baab5bd
Delete data storage collection to this branch + sign off
cortex-sg Aug 1, 2023
026f41d
Added block to exceptions
cortex-sg Aug 1, 2023
5d039c3
commit
cortex-sg Aug 2, 2023
cf15d44
fix test with new link
cortex-sg Aug 2, 2023
e844ec8
Merge branch 'feature/9176-data-storage-blocks' into feature/2023.7/9…
cortex-sg Aug 2, 2023
4c5beaa
Renamed ScopeOptions to ScopeOption
cortex-sg Aug 2, 2023
0427f54
fixes
cortex-sg Aug 2, 2023
170df02
Merge branch 'feature/9176-data-storage-blocks' into feature/2023.7/9…
cortex-sg Aug 2, 2023
724ddeb
Added exclusion for html test
cortex-sg Aug 2, 2023
3ff2bac
Commit before sign off
cortex-sg Aug 2, 2023
5227a7c
Merge branch 'feature/9176-data-storage-blocks' into feature/2023.7/9…
cortex-sg Aug 2, 2023
44b461d
signed off write data
cortex-sg Aug 4, 2023
021cd7d
renamed file
cortex-sg Aug 4, 2023
fba9c64
added blocks to exceptions
cortex-sg Aug 4, 2023
504afb1
finished off read data and delete data
cortex-sg Aug 4, 2023
7092496
delete and read signed off
cortex-sg Aug 7, 2023
106c132
final commit before sign off
cortex-sg Aug 7, 2023
13a8f09
Sign off- docs done
cortex-sg Aug 7, 2023
84d1a29
Added Service Does Not Exist Exception and modified Service Unavailab…
cortex-sg Aug 7, 2023
ac62c2d
Added url to block and fixed typo
cortex-sg Aug 7, 2023
141f61d
New block icons
cortex-sg Aug 7, 2023
e92342f
final sign-off ServiceDoesNotExistException
cortex-sg Aug 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ IgnoreURLs:
- "https://js/swagger-ui-standalone-preset.js"
- "https://kodify.net/.*"
- "https://grafana.com/.*"
- "https://learn.microsoft.com/.*"
IgnoreDirs:
- "docs/?.*/_print/"
- "docs/?.*/_shared/"
2 changes: 1 addition & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ enable = true
url = "https://www.wearecortex.com/policies/external-data-policy/"
[[params.links.legal]]
name = "Terms and Conditions"
url = "https://www.wearecortex.com/policies/website-terms-and-conditions/"
url = "https://www.wearecortex.com/terms/"
[[params.links.legal]]
name = "Registration Number: 05023238"
url = "https://find-and-update.company-information.service.gov.uk/company/05023238"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Data Storage"
linkTitle: "Data Storage"
description: "Blocks related to working with Data Storage."
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Create Collection"
linkTitle: "Create Collection"
description: "Create a data storage collection."
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
title: "Create Collection"
linkTitle: "Create Collection"
description: "Create a data storage collection."
---
{{<figure src="/blocks/data-storage-create-collection-block.png" alt="Icon" class="block-icon">}}

# {{% param title %}}

<p class="namespace">(Cortex.Blocks.DataStorage.CreateCollection.CreateCollectionBlock)</p>

## Description

Create a [Data Storage Collection] within the [Collection Scope][Collection Scope Property].

## Examples

### Create a Data Storage Collection

This example will attempt to create a new [Data Storage Collection] named `"users"`that is only accessible by flows that are scoped to the same [Tenant] and [System] specified by the [Collection Scope][Collection Scope Property].

#### Properties

| Property | Value | Notes |
|--------------------|---------------------------|------------------------------------------|
| [Collection Scope][Collection Scope Property] | `($)Scope` with value `{"Tenant": "ScopeOption.Current", "System": "ScopeOption.Current"}`. In this example `($)Scope` has been set up using the following [Expression][]: `new Scope(tenant: ScopeOption.Current, system: ScopeOption.Current)`| `($)Scope` is a variable of type [Scope][] |
| [Collection Name][Collection Name Property] | `($)CollectionName` with value `"users"` | `($)CollectionName` is a variable of type [String][] |

#### Result

This creates a new [Data Storage Collection] within the [Collection Scope][Collection Scope Property] with [Collection Name][Collection Name Property] `"users"`.

### Create a Data Storage Collection that Already Exists

This example will attempt to create a new [Data Storage Collection] named `"users"`that is only accessible by flows that are scoped to the same [Tenant] and [System] specified by the [Collection Scope][Collection Scope Property].
In this example `"users"` already exists.

#### Properties

| Property | Value | Notes |
|--------------------|---------------------------|------------------------------------------|
| [Collection Scope][Collection Scope Property] | `($)Scope` with value `{"Tenant": "ScopeOption.Current", "System": "ScopeOption.Current"}`. In this example `($)Scope` has been set up using the following [Expression][]: `new Scope(tenant: ScopeOption.Current, system: ScopeOption.Current)`| `($)Scope` is a variable of type [Scope][] |
| [Collection Name][Collection Name Property] | `($)CollectionName` with value `"users"` | `($)CollectionName` is a variable of type [String][] |

#### Result

Attempting to create a [Data Storage Collection] with the name `"users"` within the [Collection Scope][Collection Scope Property] results in no operation, as the [Data Storage Collection] already exists.

## Properties

### Collection Scope

The [Collection Scope][Collection Scope Property] to create the [Data Storage Collection] within.

| | |
|--------------------|---------------------------|
| Data Type | [Scope] |
| Property Type | [Input][] |
| Is [Advanced][] | `false` |
| Default Editor | [Literal][] |
| Default Value | [Collection Scope][Collection Scope Property] with the value shown below: |

```json
{
"Tenant": "ScopeOption.Current",
"System": "ScopeOption.Current"
}

```

### Collection Name

The name of the [Data Storage Collection] to create.

| | |
|--------------------|---------------------------|
| Data Type | [String][] |
| Property Type | [Input][] |
| Is [Advanced][] | `false` |
| Default Editor | [Variable][] |
| Default Value | `($)CollectionName` with no value |

## Exceptions

The exceptions thrown by the block can be found below:

| Name | Description |
|----------|----------|
| [ArgumentException][] | Thrown when [Tenant][] is not one of the specified [ScopeOption][] types (e.g. `(ScopeOption)100`). |
| | Thrown when [System][] is not one of the specified [ScopeOption][] types (e.g. `(ScopeOption)100`). |
| [PropertyEmptyException][] | Thrown when the [Collection Name][Collection Name Property] is empty (i.e. `""`).|
| [PropertyNullException][] | Thrown when the [Collection Scope][Collection Scope Property] is `null`. |
| | Thrown when the [Collection Name][Collection Name Property] is `null`. |
| [ServiceDoesNotExistException][] | Thrown when the [Data Storage Service][] does not exist. |
| [ServiceUnavailableException][] | Thrown when the [Data Storage Service][] is not healthy. |

## Remarks

### Creating a Collection that Already Exists

When trying to create a collection that already exists, no operation is performed; see example [Create a Data Storage Collection that Already Exists][Collection Already Exists].

### Case Sensitivity

[Collection Name][Collection Name Property] is case insensitive (e.g. 'Collection' is the same as 'collection'), so trying to create a [Data Storage Collection] named `"Collection"` while `"COLLECTION"` already exists would have no effect; see example [Create a Data Storage Collection that Already Exists][Collection Already Exists].

[Collection Scope Property]: {{< ref "#collection-scope" >}}
[Collection Name Property]: {{< ref "#collection-name" >}}
[Collection Already Exists]: {{< ref "#create-a-data-storage-collection-that-already-exists">}}

[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}}
[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}}

[Scope]: {{< url path="Cortex.Reference.DataTypes.Scopes.Scope.MainDoc">}}
[ScopeOption]: {{< url path ="Cortex.Reference.DataTypes.Scopes.ScopeOption.MainDoc">}}
[Tenant]: {{< url path="Cortex.Reference.DataTypes.Scopes.Scope.Tenant">}}
[System]: {{< url path="Cortex.Reference.DataTypes.Scopes.Scope.System">}}

[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}}
[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}}
[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}}
[ServiceDoesNotExistException]: {{< url path = "Cortex.Reference.Exceptions.Services.ServiceDoesNotExistException.MainDoc">}}
[ServiceUnavailableException]: {{< url path = "Cortex.Reference.Exceptions.Services.ServiceUnavailableException.MainDoc">}}
[Data Storage Collection]: {{< url path = "Cortex.Reference.Concepts.WorkingWith.Collections.WhatIsACollection.DataStorage">}}
[Data Storage Service]: {{< url path = "Cortex.Guides.CortexInnovation.CoreApplication.Services.DataStorageService.MainDoc">}}

[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}}
[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}}

[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}}
[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}}
[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}}
[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Delete Collection"
linkTitle: "Delete Collection"
description: "Delete a data storage collection."
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: "Delete Collection"
linkTitle: "Delete Collection"
description: "Deletes a data storage collection."
---

{{<figure src="/blocks/data-storage-delete-collection-block.png" alt="Icon" class="block-icon">}}

# {{% param title %}}

<p class="namespace">(Cortex.Blocks.DataStorage.DeleteCollection.DeleteCollectionBlock)</p>

## Description

Delete a [Data Storage Collection][] within the [Collection Scope][Collection Scope Property].

## Examples

### Delete a Data Storage Collection

This example will attempt to delete a [Data Storage Collection] named `"users"`that is only accessible by flows that are scoped to the same [Tenant] and [System] specified by the [Collection Scope][Collection Scope Property].
In this example `"users"` already exists.

#### Properties

| Property | Value | Notes |
|--------------------|---------------------------|------------------------------------------|
| [Collection Scope][Collection Scope Property] | `($)Scope` with value `{"Tenant": "ScopeOption.Current", "System": "ScopeOption.Current"}`. In this example `($)Scope` has been set up using the following [Expression][]: `new Scope(tenant: ScopeOption.Current, system: ScopeOption.Current)`| `($)Scope` is a variable of type [Scope][] |
| [Collection Name][Collection Name Property] | `($)CollectionName` with value `"users"` | `($)CollectionName` is a variable of type [String][] |

#### Result

This deletes the [Data Storage Collection] within the [Collection Scope][Collection Scope Property] with [Collection Name][Collection Name Property] `"users"`.

***

### Delete a Data Storage Collection that Does Not Exist

This example will attempt to delete a [Data Storage Collection][] named `"users"`that is only accessible by flows that are scoped to the same [Tenant] and [System] specified by the [Collection Scope][Collection Scope Property].
In this example `"users"` does not exist.

#### Properties

| Property | Value | Notes |
|--------------------|---------------------------|------------------------------------------|
| [Collection Scope][Collection Scope Property] | `($)Scope` with value `{"Tenant": "ScopeOption.Current", "System": "ScopeOption.Current"}`. In this example `($)Scope` has been set up using the following [Expression][]: `new Scope(tenant: ScopeOption.Current, system: ScopeOption.Current)`| `($)Scope` is a variable of type [Scope][] |
| [Collection Name][Collection Name Property] | `($)CollectionName` with value `"users"` | `($)CollectionName` is a variable of type [String][] |

#### Result

Attempting to delete a [Data Storage Collection] with the name `"users"` within the [Collection Scope][Collection Scope Property] results in no operation, as the [Data Storage Collection] does not exist.

***

## Properties

### Collection Scope

The [Collection Scope][Collection Scope Property] to delete the [Data Storage Collection] from.

| | |
|--------------------|---------------------------|
| Data Type | [Scope] |
| Property Type | [Input][] |
| Is [Advanced][] | `false` |
| Default Editor | [Literal][] |
| Default Value | [Collection Scope][Collection Scope Property] with value show below |

```json
{
"Tenant": "ScopeOption.Current",
"System": "ScopeOption.Current"
}

```

### Collection Name

The name of the [Data Storage Collection] to delete.

| | |
|--------------------|---------------------------|
| Data Type | [String][] |
| Property Type | [Input][] |
| Is [Advanced][] | `false` |
| Default Editor | [Variable][] |
| Default Value | `($)CollectionName` with no value |

## Exceptions

The exceptions thrown by the block can be found below:

| Name | Description |
|----------|----------|
| [ArgumentException][] | Thrown when [Tenant][] is not one of the specified [ScopeOption][] types (e.g. `(ScopeOption)100`). |
| | Thrown when [System][] is not one of the specified [ScopeOption][] types (e.g. `(ScopeOption)100`). |
| [PropertyEmptyException][] | Thrown when the [Collection Name][Collection Name Property] is empty (i.e. `""`).|
| [PropertyNullException][] | Thrown when the [Collection Scope][Collection Scope Property] is `null`. |
| | Thrown when the [Collection Name][Collection Name Property] is `null`. |
| [ServiceDoesNotExistException][] | Thrown when the [Data Storage Service][] does not exist. |
| [ServiceUnavailableException][] | Thrown when the [Data Storage Service][] is not healthy. |

## Remarks

### Deleting a Collection that Does Not Exist
When trying to delete a collection that does not exist, no operation is performed; see example [Delete a Data Storage Collection that Does Not Exist][Delete Collection that Does Not Exist].

### Case Sensitivity

[Collection Name][Collection Name Property] is case insensitive (e.g. 'Collection' is the same as 'collection'), so trying to delete a [Data Storage Collection] named `"Collection"` while `"COLLECTION"` exists would delete `"COLLECTION"`; see example [Delete a Data Storage Collection][Delete Collection].

[Collection Scope Property]: {{< ref "#collection-scope" >}}
[Collection Name Property]: {{< ref "#collection-name" >}}

[Delete Collection]: {{< ref "#delete-a-data-storage-collection">}}
[Delete Collection that Does Not Exist]: {{< ref "#delete-a-data-storage-collection-that-does-not-exist" >}}

[Data Storage Collection]: {{< url path = "Cortex.Reference.Concepts.WorkingWith.Collections.WhatIsACollection.DataStorage">}}
[Data Storage Service]: {{< url path = "Cortex.Guides.CortexInnovation.CoreApplication.Services.DataStorageService.MainDoc">}}

[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}}
[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}}

[Scope]: {{< url path="Cortex.Reference.DataTypes.Scopes.Scope.MainDoc">}}
[ScopeOption]: {{< url path ="Cortex.Reference.DataTypes.Scopes.ScopeOption.MainDoc">}}
[Tenant]: {{< url path="Cortex.Reference.DataTypes.Scopes.Scope.Tenant">}}
[System]: {{< url path="Cortex.Reference.DataTypes.Scopes.Scope.System">}}

[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}}
[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}}
[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}}
[ServiceDoesNotExistException]: {{< url path = "Cortex.Reference.Exceptions.Services.ServiceDoesNotExistException.MainDoc">}}
[ServiceUnavailableException]: {{< url path = "Cortex.Reference.Exceptions.Services.ServiceUnavailableException.MainDoc">}}

[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}}

[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}}
[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}}
[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}}
[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Delete Data"
linkTitle: "Delete Data"
description: "Delete data from a data storage collection."
---
Loading
Loading