Version: 1.0.0
Category: Process
Extended Category: JSON
Action Package: Standard Actions
Description
Update JSON.
Supports SESSION and GLOBAL parameters.
Parameter | Mandatory/Optional | Default | Description | Example |
Config | Mandatory | JSON array containing the different JSON modification operations to execute on the session objects | source | |
Atomic Level | Optional | none | How the action should handle failures executing the different operations | object |
Fail Attribute | Optional | The attribute to store the failure messages in. By default it wont write the failure messages to any attribute. | failMsg |
Config format
JSON array with JSON objects representing the operations to perform on the session objects.
The following operations are available:
- update
- delete
- move
- append
Operations
JsonTypes: string, number, boolean, object, array
update
Update operation updates or creates a JSON value in a JSON blob.
Property | Mandatory/Optional | Default value | Description |
operation | Mandatory | The type of operation | |
targetAttribute | Mandatory | The attribute containing the JSON blob to update | |
jsonPointer | Mandatory | The JSON Pointer (rfc6901) pointing to what in the JSON blob should be updated | |
sourceAttribute | Mandatory | The attribute containing the value to add to the JSON blob | |
type | Optional | string | What type of JSON value the source value should be treated as |
escape | Optional | false | If the source values should be escaped and treated as a string instead. Only applicable for type object and array |
{
"operation": "update",
"targetAttribute": "target",
"jsonPointer": "/key",
"sourceAttribute": "source",
"type": "string",
"escape": false
}
delete
Property | Mandatory/Optional | Default value | Description |
operation | Mandatory | The type of operation | |
targetAttribute | Mandatory | The attribute containing the JSON blob to delete in | |
jsonPointer | Mandatory | The JSON Pointer (rfc6901) pointing to what in the JSON blob should be deleted |
{
"operation": "delete",
"targetAttribute": "target",
"jsonPointer": "/key"
}
move
Property | Mandatory/Optional | Default value | Description |
operation | Mandatory | The type of operation | |
targetAttribute | Mandatory | The attribute containing the JSON blob to update | |
source | Mandatory | The JSON Pointer (rfc6901) pointing to what in the JSON blob should be moved | |
target | Mandatory | The JSON Pointer (rfc6901) pointing to the new location |
{
"operation": "move",
"targetAttribute": "target",
"source": "/key",
"target": "/new-key"
}
append
Property | Mandatory/Optional | Default value | Description |
operation | Mandatory | The type of operation | |
targetAttribute | Mandatory | The attribute containing the JSON blob to append to | |
jsonPointer | Mandatory | The JSON Pointer (rfc6901) pointing to what in the JSON blob should have the value appended to | |
sourceAttribute | Mandatory | The attribute containing the value used to append | |
type | Optional | string | What type of JSON value the source value should be treated as |
escape | Optional | false | If the source values should be escaped and treated as a string instead. Only applicable for type object and array |
{
"operation": "update",
"targetAttribute": "target",
"jsonPointer": "/key",
"sourceAttribute": "source",
"type": "string",
"escape": false
}
Atomic Level
Atomic level is the configuration for how the action should behave if there are operation(s) failing. There are 3 atomic levels: none, object and full.
- none will always apply all successful operations
- object will not apply any changes for a session object if there is one or more failed operations
- full will not apply any change for all session object if there is one or more failed operations on any of the session objects
Use Cases
Example 1:
DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.
PhenixID - support.phenixid.se