Project

General

Profile

Task #17856

WSC: WorkflowList()

Added by Sachin Divekar about 1 year ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

WorkflowList()

Request

{
    "slice": 4,
    "app": "steeringcommittee",
    "class": "newmember",
    "name": "initialchks",
    "is_active": false,
    "is_internal": true
}

where all parameters are optional, and the request block may be empty.

Processing

The caller must have ruleset or root capabilities.

If the user does not have root capabilities, then
    if app parameter is present then
        if the named app matches the name of one of the apps for which the user has "ruleset" rights, then
            selectedset = the workflows of that app
        else
            generate "auth" error
        endif
    else
        selectedset = the workflows of all the apps for which the user has "ruleset" rights
    endif
else
    if the app parameter is present then
        selectedset = the workflows of that app
    else
        selectedset = the workflows of all the apps in the realm
    endif
endif

The other parameters are all used as filters to pick the rulesets which match.

Response

{
    "workflows": [{
        "id": 734,
        "slice": 66,
        "app": "steeringcommittee",
        "class": "members",
        "name": "newmemberchk",
        "is_active": false,
        "is_internal": false,
        "createdat": "some timestamp",
        "createdby": "some user",
        "editedat": "some timestamp",
        "editedby": "some user"
    }, {
        "id": 2215,
        "slice": 5,
        "app": "steeringcommittee",
        "class": "members",
        "name": "goldstatus",
        "is_active": true,
        "is_internal": false,
        "createdat": "some timestamp",
        "createdby": "some user",
        "editedat": "some timestamp",
        "editedby": "some user"
    }]
}

where the response will contain an array of workflow entries, and the fields in each entry will be picked up from the ruleset table.


Files

clipboard-202402191254-nxwsg.png (27 KB) clipboard-202402191254-nxwsg.png test case Aniket Shinde, 19/02/2024 12:54 PM

Also available in: Atom PDF