Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Response FormatJSON
Description
Example Predicate

1) reaction to every object creation:
spel:true

2) reaction to every object creation having a content range attribute:
spel:contentStreams[0]['range'].length() > 0

3) reaction to every object creation without content:
spel:options['action']=100

Action Codes - History Codes101 - OBJECT_CREATED_WITH_CONTENT
100 - OBJECT_CREATED
Example Response


Code Block
languageyml
{
    "objects": [      
        {
            "properties": {
                "system:objectId": {
                    "value": "5d460d53333c226c-b4713a44-4c075e66-a5a67777-d9ad95bddfe48d999a0000e1"
                },
                "system:baseTypeId": {
                    "value": "system:document"
                },
                "system:objectTypeId": {
                    "value": "document"
                },
                "system:createdBy": {
                    "value": "111c226c-3a44-5e66-7777-8d999a0000e1"
                },
                "system:creationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:lastModifiedBy": {
                    "value": "111c226c-3a44-5e66-7777-8d999a0000e5"
                },
                "system:lastModificationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:versionNumber": {
                    "value": 1
                },
                "system:tenant": {
                    "value": "default"
                },
                "system:traceId": {
                    "value": "1234567887654321"
                },
                "Name": {
                    "value": "test.eml"
                }
            },
            "contentStreams": [
                {
                    "contentStreamId": "0AB98765-CDEF-4321-ABCD-098EF76AB543",
                    "archivePath": "default/DOCUMENT/32/15/7/",
                    "length": 82683,
                    "mimeType": "message/rfc822",
                    "fileName": "test.eml",
                    "digest": "12345678123456781234567812345678123456781234567812345678",
                    "range": "1234-12345,123456-123458,123489-234567,245678-345678",
                    "repositoryId": "repo252"
                }
            ],

           "options": {
             "action": 101,
             "detail": "OBJECT_CREATED_WITH_CONTENT"

           }       

        }
    ]
}


...

Response FormatJSON
Description
Example Predicate

1) reaction to every object update:
spel:true

2) reaction to every tag creation:
spel:options['action']==110

3) reaction to every tag deletion:
spel:options['action']==210

4) reaction to every metadata update:
spel:options['action']==300

5) reaction to every content update:
spel:options['action']==301

Action Codes - History Codes300 - OBJECT_METADATA_CHANGED
301 - OBJECT_DOCUMENT_CHANGED
303 - OBJECT_UPDATE_CONTENT_MOVED
110 - OBJECT_TAG_CREATED
310 - OBJECT_TAG_UPDATED
210 - OBJECT_TAG_DELETED
Example Response


Code Block
languageyml
Dem Objekt wurde ein Tag 'ocr' hinzugefügt. Unter options ist im Attribut "previousVersion" das Dokument vor der Änderung bereitgestellt.


    "objects": [      
        {
            "properties": {
                "system:objectId": {
                    "value": "2b7a3b0a333c226c-30383a44-433e5e66-96bd7777-493d7702b5108d999a0000e1"
                },
                "system:baseTypeId": {
                    "value": "system:document"
                },
                "system:objectTypeId": {
                    "value": "document"
                },
                "system:createdBy": {
                    "value": "275c826c111c226c-6a613a44-4e895e66-95127777-8d935a1631e58d999a0000e1"
                },
                "system:creationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:lastModifiedBy": {
                    "value": "275c826c111c226c-6a613a44-4e895e66-95127777-8d935a1631e58d999a0000e5"
                },
                "system:lastModificationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:versionNumber": {
                    "value": 1
                },
                "system:tenant": {
                    "value": "default"
                },
                "system:traceId": {
                    "value": "e686f806ed44f37d"
                },
                "Name": {
                    "value": "test.eml"
                },
                "system:tags": {
                    "value": [["ocr", 1, "2020-09-16T16:57:40.780Z", "ce03f1c20308d77d" ]]
                }
            },
            "contentStreams": [
                {
                    "contentStreamId": "1D2AD7BA-F82B-11EA-A5EA-7FE7FFB009F6",
                    "archivePath": "default/DOCUMENT/D232/AD15/7/",
                    "length": 82683,
                    "mimeType": "message/rfc822",
                    "fileName": "test.eml",
                    "digest": "2713BB70F1B3F8F556D2661286A5D45157EB723A815E1066E50F1808228075F7"12345678123456781234567812345678123456781234567812345678,
                    "range": "475781234-6824812345,115827123456-136497123458,184076123489-204746234567,252320245678-272989345678",
                    "repositoryId": "repo252"
                }
            ],

           "options": {
             "action": 110,
             "detail": "OBJECT_TAG_CREATED",
             "previousVersion" :

{
            "properties": {
                "system:objectId": {
                    "value": "2b7a3b0a-3038-433e-96bd-493d7702b510"
                },
                "system:baseTypeId": {
                    "value": "system:document"
                },
                "system:objectTypeId": {
                    "value": "document"
                },
                "system:createdBy": {
                    "value": "275c826c-6a61-4e89-9512-8d935a1631e5"
                },
                "system:creationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:lastModifiedBy": {
                    "value": "275c826c111c226c-6a613a44-4e895e66-95127777-8d935a1631e58d999a0000e5"
                },
                "system:lastModificationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:versionNumber": {
                    "value": 1
                },
                "system:tenant": {
                    "value": "default"
                },
                "system:traceId": {
                    "value": "e686f806ed44f37d1234567887654321"
                },
                "Name": {
                    "value": "test.eml"
                }
            },
            "contentStreams": [
                {
                    "contentStreamId": "1D2AD7BA0AB98765-F82BCDEF-11EA4321-A5EAABCD-7FE7FFB009F6098EF76AB543",
                    "archivePath": "default/DOCUMENT/D2/AD/7/",
                    "length": 82683,
                    "mimeType": "message/rfc822",
                    "fileName": "test.eml",
                    "digest": "2713BB70F1B3F8F556D2661286A5D45157EB723A815E1066E50F1808228075F712345678123456781234567812345678123456781234567812345678",
                    "range": "475781234-6824812345,115827123456-136497123458,184076123489-204746234567,252320245678-272989345678",
                    "repositoryId": "repo252"
                }
            ]

  }
   

           }       

        }
    ]
}


dms.response.insert (previous object.insert.document)

Response FormatJSON
Description
Example Predicate

1) reaction to every object deletion:
spel:true

2) reaction to every object deletion of type document:
spel:properties['system:objectTypeId']['value']=='document'

3) reaction to every object failed deletion of objects that were flagged for deletion:
spel:options['action']==202

Action Codes - History Codes200 - OBJECT_DELETED
202 - OBJECT_FLAGGED_FOR_DELETE
Example Response


Code Block
languageyml
{
    "objects": [      
        {
            "properties": {
                "system:objectId": {
                    "value": "2b7a3b0a333c226c-30383a44-433e5e66-96bd7777-493d7702b5108d999a0000e1"
                },
                "system:baseTypeId": {
                    "value": "system:document"
                },
                "system:objectTypeId": {
                    "value": "document"
                },
                "system:createdBy": {
                    "value": "275c826c111c226c-6a613a44-4e895e66-95127777-8d935a1631e58d999a0000e1"
                },
                "system:creationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:lastModifiedBy": {
                    "value": "275c826c-6a61-4e89-9512-8d935a1631e5"
                },
                "system:lastModificationDate": {
                    "value": "2020-09-16T16:57:40.780Z"
                },
                "system:versionNumber": {
                    "value": 1
                },
                "system:tenant": {
                    "value": "default"
                },
                "system:traceId": {
                    "value": "e686f806ed44f37d"
                },
                "Name": {
                    "value": "test.eml"
                }
            },
            "contentStreams": [
                {
                    "contentStreamId": "1D2AD7BA0AB98765-F82BCDEF-11EA4321-A5EAABCD-7FE7FFB009F6098EF76AB543",
                    "archivePath": "default/DOCUMENT/D232/AD15/7/",
                    "length": 82683,
                    "mimeType": "message/rfc822",
                    "fileName": "test.eml",
                    "digest": "2713BB70F1B3F8F556D2661286A5D45157EB723A815E1066E50F1808228075F7",
                    "range": "47578-68248,115827-136497,184076-204746,252320-272989",
                    "repositoryId": "repo252"
                }
            ],

           "options": {
             "action": 200,
             "detail": "OBJECT_DELETED"

           }       

        }
    ]
}


...