...
Required license:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Since version:
Status | ||||
---|---|---|---|---|
|
Table of Contents |
---|
What is the Property Store and a Property?
The property strore is a built-in object database provided by PIPEFORCE where you can save configurations, custom values or application data.
...
Code Block | ||
---|---|---|
| ||
key: "/pipeforce/enterprise/global/app/myapp/pipeline/helloworld" uuid: "529a38e7-9188-4135-b87b-3d890f6764f3" value: "pipeline:\n - log: \n message: \"Hello World\"" defaultValue: null type: "application/yaml;type=pipeline" created: 1613397114448 updated: null timeToLive: null |
Binary property values
Typically the value
of a property is a string (text) value. Which type of text value is defined by the type
attribute which could be of any supported mime type.
...
Code Block | ||
---|---|---|
| ||
value: "some base64 encoded value" type: "application/pdf;encoding=base64" |
How to work with the Property Store?
Typically the property store is managed using one of the property.*
commands. This is handy, if you want to manage the property store programmatically.
...
See Command Line Interface (CLI) for more details about using the CLI.
Create a new property
To create a new property, you need to use the command property.schema.put
.
Info |
---|
Whenever you create a new a property, an event with key |
Documentation reference
See this link of your instance for details about this command (replace NAMESPACE by your real namespace): https://portal-NAMESPACE.pipeforce.net/#/pipeform?pipe=property.schema.put
...
Code Block | ||
---|---|---|
| ||
pi help command property.schema.put |
Using a pipeline
Here is an example using a simple pipeline to create a new property:
Code Block | ||
---|---|---|
| ||
pipeline: - property.schema.put: key: global/app/myApp/myNewProperty |
Using the CLI
Here is an example to use the CLI to create a new property:
Code Block |
---|
pi command property.schema.put key=global/app/myApp/myNewProperty |
Using a Restful HTTP POST
In this example, a new property is created sending a HTTP POST request with the pipeline in JSON format:
Code Block | ||
---|---|---|
| ||
POST https://hub-NAMESPACE.pipeforce.org/api/v3/pipeline Content-Type: application/json { "pipeline": [ { "property.schema.put": { "key": "global/app/myApp/myNewProperty" } } ] } |
Change the value of a property
To change the value of the property, you can use the command property.put
.
...
Note: The property must already exist before you set its value using. So use property.schema.put
to define the property and then property.put
to set its value.
Documentation reference
See this link of your instance for details about this command (replace NAMESPACE by your real namespace): https://portal-NAMESPACE.pipeforce.net/#/pipeform?pipe=property.put
...
Code Block | ||
---|---|---|
| ||
pi help command property.put |
Using a pipeline
Here is an example of using a pipeline to set the value of a property:
...
Info |
---|
Why are there two different commands to create a property and set its value? |
Using the CLI
Here is an example using the CLI to set the value of a property manually:
Code Block |
---|
pi command property.put key=global/app/myApp/myNewProperty value=someValue |
Uploading multiple files as properties
If you did setup a local low-code workspace with an app with multiple files in it and you want to upload those resources to the property store, you can use the CLI:
...
See the CLI documentation for more information about the publish action Command Line Interface (CLI)
Using a Restful HTTP POST
In this example, a value of a property is changed by sending a HTTP POST request with the pipeline in JSON format:
Code Block | ||
---|---|---|
| ||
POST https://hub-NAMESPACE.pipeforce.org/api/v3/pipeline Content-Type: application/json { "pipeline": [ { "property.put": { "key": "global/app/myApp/myNewProperty", "value": "someValue" } } ] } |
Delete a property
In order to delete a property from the property store, you can use the command property.schema.delete
which deletes the property value and all meta data that belong to this property.
...
Info |
---|
Whenever you change the value of a property, an event with key |
Documentation reference
See this link of your instance for details about this command (replace NAMESPACE by your real namespace): https://portal-NAMESPACE.pipeforce.net/#/pipeform?pipe=property.schema.delete
...
Code Block | ||
---|---|---|
| ||
pi help command property.schema.delete |
Using a pipeline
Here is an example using a pipeline to delete a property:
Code Block | ||
---|---|---|
| ||
pipeline: - property.schema.delete: key: global/app/myApp/myNewProperty |
Using the CLI
Here is a call using the CLI to delete a property manually:
...
This approach allows to delete a property at any location as long as you have the permission to do so.
Deleting multiple properties
With the CLI it is also possible to delete multiple properties with one call:
...
This will delete only properties inside the “folder” somename
but will leave all sub folders of it untouched.
Using a Restful HTTP POST
In this example, the property will be deleted by sending a HTTP POST request with the pipeline in JSON format:
Code Block | ||
---|---|---|
| ||
POST https://hub-NAMESPACE.pipeforce.org/api/v3/pipeline Content-Type: application/json { "pipeline": [ { "property.delete": { "filter": "global/app/myApp/myNewProperty" } } ] } |
Using a Restful HTTP GET
In this example, the property will be deleted by sending a HTTP GET request :
Code Block | ||
---|---|---|
| ||
GET https://hub-NAMESPACE.pipeforce.org/api/v3/command:property.delete?key=global/app/myApp/myNewProperty |
Listing and filtering existing properties
If you want to list all existing properties and their metadata, you can use the command property.list
.
Documentation reference
See this link of your instance for details about this command: https://portal-NAMESPACE.pipeforce.net/#/pipeform?pipe=property.list
...
Code Block | ||
---|---|---|
| ||
pi help command property.list |
Using a pipeline
Here is an example using a pipeline to list all properties:
...
This will return you all properties from the property store in case you have the permission to do so.
Filtering
If you want to list only properties from a certain sub-path, you can use the filter
parameter.
...
Code Block | ||
---|---|---|
| ||
pipeline: - property.list: filter: global/app/myapp/object/*/v1/schema |
Using the CLI
You can use this CLI to list all properties:
...
Code Block |
---|
pi command property.list filter=global/app/myapp/** |
Using a Restful HTTP POST
In this example, the properties will be listed by sending a HTTP POST request with the pipeline in JSON format:
Code Block | ||
---|---|---|
| ||
POST https://hub-NAMESPACE.pipeforce.org/api/v3/pipeline Content-Type: application/json { "pipeline": [ { "property.list": { "filter": "global/app/myapp/**" } } ] } |
Using a Restful HTTP GET
In this example, the properties will be listed by sending a HTTP GET request:
Code Block | ||
---|---|---|
| ||
GET https://hub-NAMESPACE.pipeforce.org/api/v3/command:property.list?filter=global/app/myapp/** |
The top-level folders
The top-level level folders inside your property store define the access rules for a certain group or users of your instance.
...
global
The global root folder contains all data and configuration accessible by any user by default.
Info |
---|
This is the default folder where you should put your configuration and application data in most cases. |
group
The resources inside this folder are accessible by the defined groups. Any group has its own sub folder here whereas the name of the folder is the uuid of the group.
tenant
This root folder contains any resources and application data for tenants. Any tenant has its own sub folder here whereas the name of the folder is the uuid of the tenant.
user
This root folder contains user specific resources and application data. Any user has its own sub folder here whereas the name of the folder is the uuid of the user.
The app folder
The app folder contains all resource folders which are required to define a single app. The name of the sub folder of the app folder is the unique name of the app. Here is an example how such a folder structure typically looks like:
...
Code Block |
---|
global/app/delivery global/app/dropin global/app/application global/app/itrequest global/app/accessrequest global/app/travelexpense global/app/sop global/app/accountpayable global/app/sickleave global/app/vacationrequest global/app/onboarding |
The app folder structure
Inside of an app
folder there is a certain folder structure which defines the resources of an app. The typical folder structure looks like this:
...
form
This folder contains all form configuration properties for any form of the app whereas the name of the property is the name of the form. For example:
Code Block |
---|
global/app/myApp/form/createUser global/app/myApp/form/deleteUser |
list
This folder contains all list configuration properties for any list of the app whereas the name of the property is the name of the list. For example:
Code Block |
---|
global/app/myApp/list/users global/app/myApp/list/employees |
object
This folder contains any application model (schema) and its instances (if there are any).
schema
The schema of an object is stored in a property having this path:
...
See the JSON schema specification for a description how to define JSON schema documents: https://json-schema.org/
instance
In case there are object instances based on a schema, they should be typically stored inside this path structure:
...
Code Block | ||
---|---|---|
| ||
{ "firstName": "Homer", "lastName": "Simpson", "age": 48, "gender": "male" } |
pipeline
This folder contains all pipeline configurations for the given app. A pipeline can be seen as the business logic part of an application.
...
Code Block | ||
---|---|---|
| ||
pipeline: - mail.send: to: hr@company.de subject: "A new employee was addded!" |
script
Inside of the optional script folder, scripts can be placed which can contain more complex business logic if required. By default such scripts are written in JavaScript. Optionally also Python or Groovy are available (ask support@pipeforce.io if required). For example:
...
Code Block | ||
---|---|---|
| ||
pipeline: - script.run: path: "global/app/myApp/script/helloworld" |
test
This folder typically contains pipelines for tests only. Whenever necessary, PIPEFORCE automatically executes the test pipelines inside this folder to make sure the app is working as expected. Therefore you have to make sure that these tests can be executed at any time and are fully reentrant (once a test has been finished it can be executed again as often as necessary).
...
Code Block | ||
---|---|---|
| ||
pipeline: - test: assertTrue(false) |
workflow
This folder contains any BPMN workflow files defining a business process.
...
Code Block |
---|
global/app/myApp/workflow/approveNewEmployee |
Setting up a customization workspace
In its simple case you can manage all properties in the property store with the property.*
commands and the CLI using pi pipeline
.
...
See here for a getting started guide how to setup the CLI and use the local workspace: https://logabit.atlassian.netnull/pages/createpage.action?spaceKey=DEVEX&title=Getting%20Started%20-%20Basics&linkCreation=true&fromPageId=988807265 .
Working with Visual Studio Code
We recommend you to work with the Visual Studio Code editor to manage your local resources in the customization editor.
...