Project

General

Profile

Task #17852

WSC: WFinstanceList()

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

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

100%

Estimated time:
#1

Updated by Shuvam Misra about 1 year ago

  • Status changed from New to In Progress
#2

Updated by Shuvam Misra about 1 year ago

  • Target version set to Sprint 29 Feb
#3

Updated by Kanchan Barve about 1 year ago

  • Assignee set to Kanchan Barve

WFinstanceList()

Request

{
    "slice": 7,
    "entityid": "0eb8da50-aece-11ee-b168-3b192f7cd2b6",
    "app": "retailsales",
    "workflow": "customeronboarding",
    "parent": 952
}

where all the parameters are optional.

Processing

The call will be open to any authenticated user from one of the whitelisted IP addresses. No specific capability is required.

It is possible that multiple parameters may be specified in the request, and there may be no record matching all those parameters. Only records which match all search parameters will be returned.

All records matching the specified parameters will be returned in the response. All records whose parent field specifies one of the records in the result set will also be returned, and this tree traversal will be done till all descendant nodes are included.

Response

{
    "wfinstances": [{
        "id": 8534,
        "entityid": "b171e684-b076-11ee-acfd-57353b1989cb",
        "slice": 21,
        "app": "retailbroking",
        "class": "billofmaterial",
        "workflow": "bomcreationintl",
        "step": "bomassembled",
        "loggedat": "2024-03-09T05:05:13Z",
        "doneat": "",
        "nextstep": "bomassembled",
        "parent": 243
    }, {
        "id": 9902,
        "entityid": "0307f664-b077-11ee-9094-fb1893e66973",
        "slice": 21,
        "app": "retailbroking",
        "class": "exportorder",
        "workflow": "orderissue",
        "step": "check1",
        "loggedat": "2024-03-03T09:25:44Z",
        "doneat": "",
        "nextstep": "check1",
    }]
}

where instances is an array of active workflow instances, with the fields having the usual meanings as defined in the wfinstance table.

The parent field will be omitted if no value has been set in a specific record. doneat will be empty if the step has not been marked done. The value of nextstep will be the same as the value of step for sequential steps, and may be different in case of the records of a concurrent set of steps.

A specific entity (identified by the entityid) may have multiple workflows concurrently active -- Crux does not enforce any kind of restriction on this.

#4

Updated by Kanchan Barve about 1 year ago

  • % Done changed from 0 to 50
  • WFInstanceList API development done.
#5

Updated by Kanchan Barve about 1 year ago

  • Status changed from In Progress to On Hold
#6

Updated by Kanchan Barve about 1 year ago

  • Status changed from On Hold to In Progress
#7

Updated by Kanchan Barve about 1 year ago

  • % Done changed from 50 to 80
  • Status changed from In Progress to Testing
#8

Updated by Kanchan Barve about 1 year ago

  • % Done changed from 80 to 100
  • Status changed from Testing to Closed
#9

Updated by Kanchan Barve about 1 year ago

  • Added request validations

Also available in: Atom PDF