Skip to main content

SCIM ProcessInstance examples

Operations

This page shows the operations that can be performed for the ProcessInstances object.

List all

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/ProcessInstance
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 311,
    "startIndex": 1,
    "Resources": [
        {
            "dummyProcess": false,
            "variables": {},
            "comments": [
                {
                    "actor": "admin Soffid Administrator",
                    "schemas": [
                        "urn:soffid:com.soffid.iam.bpm.api.Comment"
                    ],
                    "time": "2020-09-30 09:57:15",
                    "message": "Comentario"
                }
            ],
            "processDefinition": 628635,
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/626161",
                "resourceType": "ProcessInstance"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
            ],
            "start": "2020-09-29 20:34:46",
            "currentTask": "Entrada de la consulta",
            "description": "Consultar la base de datos",
            "end": "2020-11-11 15:05:48",
            "id": 626161
        },
        {
            "dummyProcess": false,
            "variables": {},
            "comments": [],
            "processDefinition": 628635,
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/626179",
                "resourceType": "ProcessInstance"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
            ],
            "start": "2020-09-29 20:35:22",
            "currentTask": "Entrada de la consulta",
            "description": "Consultar la base de datos",
            "end": "2020-11-11 15:05:44",
            "id": 626179
        },
      ..........
    ]
}

List by filter

List all ProcessInstances with a filter expression.

It is allowed to use pagination and sort the information, for more information visit the Sorting and Pagination information.

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/ProcessInstance?filter=description co Permission and currentTask eq Start
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 8,
    "startIndex": 1,
    "Resources": [
        {
            "dummyProcess": false,
            "variables": {
                "requester": "admin",
                "grants": [],
                "requesterName": "Soffid Administrator"
            },
            "comments": [],
            "processDefinition": 1054785,
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/1053984",
                "resourceType": "ProcessInstance"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
            ],
            "start": "2020-12-14 14:49:20",
            "currentTask": "Start",
            "description": "Permissions request",
            "end": "2021-01-29 08:25:28",
            "id": 1053984
        },
        {
            "dummyProcess": false,
            "variables": {
                "requester": "admin",
                "grants": [],
                "requesterName": "Soffid Administrator"
            },
            "comments": [],
            "processDefinition": 1946303,
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/1378380",
                "resourceType": "ProcessInstance"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
            ],
            "start": "2021-01-29 08:26:30",
            "currentTask": "Start",
            "description": "Permissions request",
            "id": 1378380
        },
        ...........
    ]
}
      

Query by id

Query a ProcessInstance by its id (primary key).  

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/ProcessInstance/1378380
Response 200 OK
{
    "dummyProcess": false,
    "variables": {
        "requester": "admin",
        "grants": [],
        "requesterName": "Soffid Administrator"
    },
    "comments": [],
    "processDefinition": 1946303,
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/1378380",
        "resourceType": "ProcessInstance"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
    ],
    "start": "2021-01-29 08:26:30",
    "currentTask": "Start",
    "description": "Permissions request",
    "id": 1378380
}

Create

Request

POST http://<your-domain>/soffid/webservice/scim2/v1/ProcessInstance

JSON

{
    "schemas": [
        "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
    ],
    "dummyProcess": false,
    "variables": {
        "requester": "ckelp",
        "grants": [],
        "requesterName": "Casey Kelp"
    },
    "comments": [],
    "processDefinition": 1946303,
    "description": "Permissions request"
}
Response 201 Created
{
    "dummyProcess": false,
    "variables": {
        "requester": "ckelp",
        "grants": [],
        "requesterName": "Casey Kelp"
    },
    "comments": [],
    "processDefinition": 1946303,
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/1378380",
        "resourceType": "ProcessInstance"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
    ],
    "start": "2021-01-29 08:26:30",
    "currentTask": "Start",
    "description": "Permissions request",
    "id": 1378380
}

Update partial

Only attributes with changes will be updated, the other will maintain the same value.

Request
PATCH http://<your-domain>/soffid/webservice/scim2/v1/GroupUser/1976741

JSON

{
    "Operations": [
        {
            "op": "replace",
            "path": "start",
            "value": "2021-05-14 00:00:00"
        }
    ]
}
Response Response 200 OK
{
    "dummyProcess": false,
    "variables": {
        "requester": "admin",
        "grants": [],
        "requesterName": "Soffid Administrator"
    },
    "comments": [],
    "processDefinition": 1946303,
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/1378380",
        "resourceType": "ProcessInstance"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
    ],
    "start": "2021-05-14 00:00:00",
    "currentTask": "Start",
    "description": "Permissions request",
    "id": 1378380
}

Update all

This operation replaces all values in the ProcessInstance.

  • Note that the attribute id is required to confirm that the resource "...ProcessInstance/<id>" is the same that the JSON ProcessInstance.
  • Note that all the attributes not included in the request will be cleared in the ProcessInstance type and their data will be lost.
  • Note that not all the attributes are updatable, for exampleexample, tag meta, avoid these tags. For more information see Resource data model page
Request
PUT - http://<your-domain>/soffid/webservice/scim2/v1/ProcessInstance/1474138

JSON

{
    "schemas": [
        "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
    ],
    "id": 1378380,
    "dummyProcess": false,
    "variables": {
        "requester": "ckelp",
        "grants": [],
        "requesterName": "Casey Kelp"
    },
    "comments": ["comments"],
    "processDefinition": 1946303,
    "start": "2021-05-14 00:00:00",
    "currentTask": "Start",
    "description": "Permissions request"
    
}
Response 200 OK
{
    "dummyProcess": false,
    "variables": {
        "requester": "ckelp",
        "grants": [],
        "requesterName": "Casey Kelp"
    },
    "comments": [
        "comments"
    ],
    "processDefinition": 1946303,
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/ProcessInstance/1378380",
        "resourceType": "ProcessInstance"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.bpm.api.ProcessInstance"
    ],
    "start": "2021-05-14 00:00:00",
    "currentTask": "Start",
    "description": "Permissions request",
    "id": 1378380
}

Delete

When you delete a ProcessInstance, it will be disabled, but never deleted from the database, this ProcessInstance will have an end date.

Please note after this delete, the ProcessInstance has to be created again to use it in the next examples.

Request
DELETE - http://<your-domain>/webservice/scim2/v1/ProcessInstance/1977873
Response 204 No Content
204 No Content

Error response

For more infomation about error response visit https://bookstack.soffid.com/link/116#bkmrk-error-response