Commit the skeleton API endpoints, so we can use them while developing the BPMN side of things.

This commit is contained in:
mike cullerton 2021-08-27 11:40:38 -04:00
parent 961925e03e
commit f639e101b7
2 changed files with 67 additions and 0 deletions

View File

@ -568,6 +568,36 @@ paths:
responses:
'204':
description: The workflow specification has been removed.
/workflow-specification/{spec_id}/reorder:
parameters:
- name: spec_id
in: path
required: true
description: The unique id of an existing workflow specification to validate.
schema:
type: string
- name: direction
in: query
required: true
description: The direction we want to move the spec - `up` or `down`
schema:
type: string
example: up
put:
operationId: crc.api.workflow.reorder_workflow_specification
summary: Move the workflow spec up or down in the display order
tags:
- Workflow Specifications
responses:
'200':
description: An array of workflow specifications
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/WorkflowSpec"
/workflow-specification/{spec_id}/validate:
parameters:
- name: spec_id
@ -685,6 +715,35 @@ paths:
responses:
'204':
description: The workflow spec category has been removed.
/workflow-specification-category/{cat_id}/reorder:
parameters:
- name: cat_id
in: path
required: true
description: The unique id of an existing workflow spec category to modify.
schema:
type: string
- name: direction
in: query
required: true
description: The direction you want to move the category - `up` or `down`
schema:
type: string
example: up
put:
operationId: crc.api.workflow.reorder_workflow_spec_category
summary: Move the workflow spec category up or down in the display order
tags:
- Workflow Specification Category
responses:
'200':
description: An array of workflow spec categories
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/WorkflowSpecCategory"
/file:
parameters:
- name: workflow_spec_id

View File

@ -144,6 +144,10 @@ def delete_workflow_specification(spec_id):
session.commit()
def reorder_workflow_specification(spec_id, direction):
pass
def get_workflow_from_spec(spec_id):
workflow_model = WorkflowService.get_workflow_from_spec(spec_id, g.user)
processor = WorkflowProcessor(workflow_model)
@ -328,6 +332,10 @@ def delete_workflow_spec_category(cat_id):
session.commit()
def reorder_workflow_spec_category(cat_id, direction):
pass
def lookup(workflow_id, task_spec_name, field_id, query=None, value=None, limit=10):
"""
given a field in a task, attempts to find the lookup table or function associated