1. Overview

Microservice containing the business logic for configuring workflow and execution of the approval cockpit.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • workflow-configuration-controller : Workflow Configuration Controller

  • workflow-event-controller : Workflow Event Controller

  • workflow-execution-command-controller : Workflow Execution Command Controller

  • workflow-execution-controller : Workflow Execution Controller

  • workflow-level-group-execution-controller : Workflow Level Group Execution Controller

2. Resources

2.1. Workflow-configuration-controller

Workflow Configuration Controller

2.1.1. Create Workflow Configuration

POST /api/v1/workflow-configurations
Parameters
Type Name Description Schema

Body

workflowConfiguraionRequest
required

workflowConfiguraionRequest

WorkflowConfigurationRequest

Responses
HTTP Code Description Schema

201

Created

WorkflowConfigurationInfo

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.2. Query WorkFlow Configurations

GET /api/v1/workflow-configurations
Parameters
Type Name Description Schema Default

Query

eventId
required

Event id of the configurtion (Refer API /eventType )

integer (int32)

Query

page
optional

Results page you want to retrieve (0..N)

integer (int32)

0

Query

size
optional

Number of records per page.

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

WorkflowConfigurationInfosPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.3. Query Workflow details

GET /api/v1/workflow-configurations/{id}
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Responses
HTTP Code Description Schema

200

OK

WorkflowConfigurationInfoResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.4. Update Workflow Configurations

PUT /api/v1/workflow-configurations/{id}
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Body

workflowConfigurationRevisionRequest
required

workflowConfigurationRevisionRequest

WorkflowConfigurationRevisionRequest

Responses
HTTP Code Description Schema

200

OK

WorkflowConfigurationInfo

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.5. Inactive workflow configurations

PUT /api/v1/workflow-configurations/{id}/active
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Responses
HTTP Code Description Schema

204

No Content

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.6. Add Co-Owner

PUT /api/v1/workflow-configurations/{id}/co-owner
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Body

coOwnerRequest
required

coOwnerRequest

CoOwnerRequest

Responses
HTTP Code Description Schema

200

OK

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.7. Active workflow configurations

PUT /api/v1/workflow-configurations/{id}/in-active
Parameters
Type Name Description Schema

Path

id
required

id

integer (int64)

Responses
HTTP Code Description Schema

204

No Content

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2. Workflow-event-controller

Workflow Event Controller

2.2.1. Query Workflow Events

GET /api/v1/workflow-events
Responses
HTTP Code Description Schema

200

OK

< WorkflowEventInfo > array

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3. Workflow-execution-command-controller

Workflow Execution Command Controller

2.3.1. Approves workflow level

POST /api/v1/workflow-executions/{id}/approve
Parameters
Type Name Description Schema

Path

id
required

Id of the workflow execution.

integer (int64)

Body

request
required

request

WorkflowExecuteRequest

Responses
HTTP Code Description Schema

200

OK

object

204

No Content

object

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.2. Rejects the workflow level

POST /api/v1/workflow-executions/{id}/reject
Parameters
Type Name Description Schema

Path

id
required

Id of the workflow execution.

integer (int64)

Body

request
required

request

WorkflowExecuteRequest

Responses
HTTP Code Description Schema

200

OK

object

204

No Content

object

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.3. Reverification of the approved workflow

POST /api/v1/workflow-executions/{id}/reverify
Parameters
Type Name Description Schema

Path

id
required

Id of the workflow execution.

integer (int64)

Body

rerequest
required

rerequest

ReverifyRequest

Responses
HTTP Code Description Schema

200

OK

object

204

No Content

object

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4. Workflow-execution-controller

Workflow Execution Controller

2.4.1. Approval Details

GET /api/v1/workflow-executions/{id}/level-groups
Parameters
Type Name Description Schema

Path

id
required

Id of the workflow execution.

integer (int64)

Responses
HTTP Code Description Schema

200

OK

< ExecutionDetails > array

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4.2. Add monitor group

POST /api/v1/workflow-executions/{id}/monitor-group
Parameters
Type Name Description Schema

Path

id
required

Id of the workflow execution.

integer (int64)

Body

monitorGroupRequest
required

monitorGroupRequest

MonitorGroupRequest

Responses
HTTP Code Description Schema

201

Created

MonitorGroupResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.4.3. Update monitor group

PUT /api/v1/workflow-executions/{id}/monitor-group/{monitor-group-id}
Parameters
Type Name Description Schema

Path

id
required

Id of the workflow execution.

integer (int64)

Path

monitor-group-id
required

monitor-group-id

integer (int64)

Body

monitorGroupRequest
required

monitorGroupRequest

MonitorGroupRequest

Responses
HTTP Code Description Schema

200

OK

MonitorGroupResponse

201

Created

MonitorGroupResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.5. Workflow-level-group-execution-controller

Workflow Level Group Execution Controller

2.5.1. Workflow Level Group Executions

GET /api/v1/workflow-level-group-executions
Parameters
Type Name Description Schema Default

Query

level
optional

Level of the execution as a filter.

integer (int32)

Query

onlyMyWorkflows
optional

Currently logged in user’s executions as a filter.

boolean

"true"

Query

page
optional

Results page you want to retrieve (0..N)

integer (int32)

0

Query

size
optional

Number of records per page.

integer (int32)

20

Query

status
optional

status

< enum (Pending, InProgress, Approved, Rejected) > array(multi)

Query

workflowExecutionId
optional

Id of the workflow execution as a filter

integer (int64)

Responses
HTTP Code Description Schema

200

OK

WorkflowExecutionsPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

3. Definitions

3.1. CoOwnerRequest

Name Description Schema

coOwner
optional

Name of the coOwner

string

3.2. Error

Name Schema

code
optional

string

details
optional

object

3.3. ExecutionDetails

Name Schema

groupinfo
optional

< GroupStatusInfo > array

levelId
optional

integer (int32)

levelName
optional

string

3.4. Group

Name Description Schema

groupName
optional

Security group name

string

groupType
optional

string

securityGroups
optional

< string > array

3.5. GroupInfo

Name Schema

groupName
optional

string

groupType
optional

string

groupTypeId
optional

integer (int32)

levelGroupConfigId
optional

integer (int64)

securityGroups
optional

< SecurityGroup > array

3.6. GroupStatusInfo

Name Schema

groupName
optional

string

groupType
optional

string

lastModifiedBy
optional

string

lastModifiedOn
optional

string (date-time)

recievedReverification
optional

boolean

status
optional

string

3.7. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

3.8. Level

Name Description Schema

escalationDueDays
optional

Escaltion due days

integer (int32)

groups
optional

< Group > array

name
optional

Name of the Level

string

sequence
optional

Sequence of the Level

integer (int32)

3.9. LevelInfo

Name Schema

escalationDueDays
optional

integer (int32)

groups
optional

< GroupInfo > array

name
optional

string

sequence
optional

integer (int32)

Name Schema

href
optional

string

rel
optional

string

templated
optional

boolean

3.11. MonitorGroup

Name Schema

groupName
optional

string

securityGroupName
optional

string

3.12. MonitorGroupInfo

Name Schema

createdBy
optional

string

createdOn
optional

string (date-time)

groupName
optional

string

id
optional

integer (int32)

securityGroupName
optional

string

3.13. MonitorGroupRequest

Name Schema

name
optional

string

securityGroup
optional

string

3.14. MonitorGroupResponse

Name Schema

createdBy
optional

string

createdOn
optional

string (date-time)

id
optional

integer (int64)

lastModifiedBy
optional

string

lastModifiedOn
optional

string (date-time)

name
optional

string

securityGroupName
optional

string

workflowExecutionId
optional

integer (int64)

3.15. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.16. ReverifyRequest

Name Schema

levelGroupExecutionIds
optional

< integer (int64) > array

levelId
optional

integer (int32)

3.17. RevisionGroup

Name Schema

groupName
optional

string

groupType
optional

string

levelGroupConfigId
optional

integer (int64)

securityGroups
optional

< RevisionSecurityGroup > array

3.18. RevisionLevel

Name Schema

escalationDueDays
optional

integer (int32)

groups
optional

< RevisionGroup > array

name
optional

string

sequence
optional

integer (int32)

3.19. RevisionMonitorGroup

Name Schema

groupName
optional

string

id
optional

integer (int32)

securityGroupName
optional

string

3.20. RevisionSecurityGroup

Name Schema

id
optional

integer (int32)

name
optional

string

3.21. SecurityGroup

Name Schema

createdBy
optional

string

createdOn
optional

string (date-time)

id
optional

integer (int32)

name
optional

string

3.22. WorkflowConfigurationInfo

Name Schema

active
optional

boolean

coOwner
optional

string

createdBy
optional

string

createdOn
optional

string (date-time)

equipementId
optional

integer (int64)

id
optional

integer (int64)

lastModifiedBy
optional

string

lastModifiedOn
optional

string (date-time)

lineId
optional

integer (int64)

name
optional

string

revision
optional

integer (int32)

workflowEventName
optional

string

3.23. WorkflowConfigurationInfoResponse

Name Schema

equipmentId
optional

integer (int32)

eventId
optional

integer (int32)

levels
optional

< LevelInfo > array

lineId
optional

integer (int64)

monitorGroup
optional

MonitorGroupInfo

name
optional

string

3.24. WorkflowConfigurationInfosPage

Name Schema

content
optional

< WorkflowConfigurationInfo > array

links
optional

< Link > array

page
optional

PageMetadata

3.25. WorkflowConfigurationRequest

Name Description Schema

equipmentId
optional

Equipement id of the workflow for forms configuration

integer (int64)

eventId
optional

Event id of the workflow

integer (int32)

levels
optional

Levels of the workflow

< Level > array

lineId
optional

Line id of the workflow

integer (int64)

monitorGroup
optional

Monitor Group of the workflow

MonitorGroup

name
optional

Name of the workflow

string

3.26. WorkflowConfigurationRevisionRequest

Name Schema

levels
optional

< RevisionLevel > array

monitorGroup
optional

RevisionMonitorGroup

3.27. WorkflowEventInfo

Name Schema

eventType
optional

string

id
optional

integer (int32)

name
optional

string

3.28. WorkflowExecuteRequest

Name Schema

levelGroupExecutionId
optional

integer (int64)

3.29. WorkflowExecutionsPage

Name Schema

content
optional

< WorkflowLevelGroupExecutionInfo > array

links
optional

< Link > array

page
optional

PageMetadata

3.30. WorkflowLevelGroupExecutionInfo

Name Schema

activityId
optional

integer (int64)

groupName
optional

string

groupType
optional

string

id
optional

integer (int64)

levelGroupCreatedOn
optional

string (date-time)

levelId
optional

integer (int32)

levelName
optional

string

monitorGroupId
optional

integer (int64)

monitorSecurityGroup
optional

string

recievedReverification
optional

boolean

requestId
optional

string

requestName
optional

string

revision
optional

integer (int32)

status
optional

string

workflowExecutionId
optional

integer (int64)

workflowLevelGroupExecutionId
optional

integer (int64)

workflowName
optional

string

workflowStartedBy
optional

string

workflowStartedOn
optional

string (date-time)

4. Security

4.1. access_token

Type : oauth2
Flow : accessCode
Token URL : https://localhost/uaa/oauth/authorize
Token URL : https://localhost/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.2. resource_owner

Type : oauth2
Flow : password
Token URL : https://localhost/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.3. implicit_grant

Type : oauth2
Flow : implicit
Token URL : https://localhost/uaa/oauth/authorize

Name Description

default

Default oauth2 scope.

4.4. client_creds

Type : oauth2
Flow : application
Token URL : https://localhost/uaa/oauth/token

Name Description

default

Default oauth2 scope.