Merge branch 'dev' into 263-optimize-dashboard
This commit is contained in:
commit
3ad3a086ba
File diff suppressed because it is too large
Load Diff
26
crc/api.yml
26
crc/api.yml
|
@ -65,7 +65,8 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
$ref: "#/components/schemas/User"
|
items:
|
||||||
|
$ref: "#/components/schemas/User"
|
||||||
# /v1.0/study
|
# /v1.0/study
|
||||||
/study:
|
/study:
|
||||||
get:
|
get:
|
||||||
|
@ -80,7 +81,8 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
$ref: "#/components/schemas/Study"
|
items:
|
||||||
|
$ref: "#/components/schemas/Study"
|
||||||
post:
|
post:
|
||||||
operationId: crc.api.study.add_study
|
operationId: crc.api.study.add_study
|
||||||
summary: Creates a new study with the given parameters.
|
summary: Creates a new study with the given parameters.
|
||||||
|
@ -159,6 +161,7 @@ paths:
|
||||||
/workflow_sync/{workflow_spec_id}/spec:
|
/workflow_sync/{workflow_spec_id}/spec:
|
||||||
parameters:
|
parameters:
|
||||||
- name: workflow_spec_id
|
- name: workflow_spec_id
|
||||||
|
required: true
|
||||||
in: path
|
in: path
|
||||||
description: The unique id of an existing workflow specification to modify.
|
description: The unique id of an existing workflow specification to modify.
|
||||||
schema:
|
schema:
|
||||||
|
@ -392,7 +395,7 @@ paths:
|
||||||
parameters:
|
parameters:
|
||||||
- name: spec_id
|
- name: spec_id
|
||||||
in: path
|
in: path
|
||||||
required: false
|
required: true
|
||||||
description: The unique id of an existing workflow specification to modify.
|
description: The unique id of an existing workflow specification to modify.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
@ -441,7 +444,7 @@ paths:
|
||||||
parameters:
|
parameters:
|
||||||
- name: spec_id
|
- name: spec_id
|
||||||
in: path
|
in: path
|
||||||
required: false
|
required: true
|
||||||
description: The unique id of an existing workflow specification to validate.
|
description: The unique id of an existing workflow specification to validate.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
@ -497,7 +500,7 @@ paths:
|
||||||
parameters:
|
parameters:
|
||||||
- name: cat_id
|
- name: cat_id
|
||||||
in: path
|
in: path
|
||||||
required: false
|
required: true
|
||||||
description: The unique id of an existing workflow spec category to modify.
|
description: The unique id of an existing workflow spec category to modify.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
@ -1513,8 +1516,7 @@ components:
|
||||||
example: "random_fact"
|
example: "random_fact"
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
file:
|
file:
|
||||||
type: file
|
type: string
|
||||||
format: binary
|
|
||||||
Workflow:
|
Workflow:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
@ -1522,7 +1524,7 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
status:
|
status:
|
||||||
type: enum
|
type: string
|
||||||
enum: ['new','user_input_required','waiting','complete']
|
enum: ['new','user_input_required','waiting','complete']
|
||||||
navigation:
|
navigation:
|
||||||
type: array
|
type: array
|
||||||
|
@ -1576,7 +1578,7 @@ components:
|
||||||
data:
|
data:
|
||||||
type: object
|
type: object
|
||||||
multi_instance_type:
|
multi_instance_type:
|
||||||
type: enum
|
type: string
|
||||||
enum: ['none', 'looping', 'parallel', 'sequential']
|
enum: ['none', 'looping', 'parallel', 'sequential']
|
||||||
multi_instance_count:
|
multi_instance_count:
|
||||||
type: number
|
type: number
|
||||||
|
@ -1709,7 +1711,7 @@ components:
|
||||||
type: string
|
type: string
|
||||||
readOnly: true
|
readOnly: true
|
||||||
type:
|
type:
|
||||||
type: enum
|
type: string
|
||||||
enum: ['string', 'long', 'boolean', 'date', 'enum']
|
enum: ['string', 'long', 'boolean', 'date', 'enum']
|
||||||
readOnly: true
|
readOnly: true
|
||||||
label:
|
label:
|
||||||
|
@ -1785,7 +1787,7 @@ components:
|
||||||
type: string
|
type: string
|
||||||
example: "Chuck Norris"
|
example: "Chuck Norris"
|
||||||
data:
|
data:
|
||||||
type: any
|
type: string
|
||||||
NavigationItem:
|
NavigationItem:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
@ -1815,7 +1817,7 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
example: 4
|
example: 4
|
||||||
state:
|
state:
|
||||||
type: enum
|
type: string
|
||||||
enum: ['FUTURE', 'WAITING', 'READY', 'CANCELLED', 'COMPLETED','LIKELY','MAYBE']
|
enum: ['FUTURE', 'WAITING', 'READY', 'CANCELLED', 'COMPLETED','LIKELY','MAYBE']
|
||||||
readOnly: true
|
readOnly: true
|
||||||
is_decision:
|
is_decision:
|
||||||
|
|
|
@ -166,8 +166,10 @@ class BaseTest(unittest.TestCase):
|
||||||
study_model = StudyModel(**study_json)
|
study_model = StudyModel(**study_json)
|
||||||
session.add(study_model)
|
session.add(study_model)
|
||||||
StudyService._add_all_workflow_specs_to_study(study_model)
|
StudyService._add_all_workflow_specs_to_study(study_model)
|
||||||
session.execute(Sequence(StudyModel.__tablename__ + '_id_seq'))
|
session.commit()
|
||||||
session.commit()
|
update_seq = f"ALTER SEQUENCE %s RESTART WITH %s" % (StudyModel.__tablename__ + '_id_seq', study_model.id + 1)
|
||||||
|
print("Update Sequence." + update_seq)
|
||||||
|
session.execute(update_seq)
|
||||||
session.flush()
|
session.flush()
|
||||||
|
|
||||||
specs = session.query(WorkflowSpecModel).all()
|
specs = session.query(WorkflowSpecModel).all()
|
||||||
|
|
|
@ -253,10 +253,8 @@ class TestWorkflowProcessor(BaseTest):
|
||||||
processor = self.get_processor(study, workflow_spec_model)
|
processor = self.get_processor(study, workflow_spec_model)
|
||||||
self.assertTrue(processor.get_version_string().startswith('v2.1.1'))
|
self.assertTrue(processor.get_version_string().startswith('v2.1.1'))
|
||||||
|
|
||||||
|
|
||||||
def test_hard_reset(self):
|
def test_hard_reset(self):
|
||||||
self.load_example_data()
|
self.load_example_data()
|
||||||
|
|
||||||
# Start the two_forms workflow, and enter some data in the first form.
|
# Start the two_forms workflow, and enter some data in the first form.
|
||||||
study = session.query(StudyModel).first()
|
study = session.query(StudyModel).first()
|
||||||
workflow_spec_model = self.load_test_spec("two_forms")
|
workflow_spec_model = self.load_test_spec("two_forms")
|
||||||
|
@ -275,6 +273,8 @@ class TestWorkflowProcessor(BaseTest):
|
||||||
|
|
||||||
# Assure that creating a new processor doesn't cause any issues, and maintains the spec version.
|
# Assure that creating a new processor doesn't cause any issues, and maintains the spec version.
|
||||||
processor.workflow_model.bpmn_workflow_json = processor.serialize()
|
processor.workflow_model.bpmn_workflow_json = processor.serialize()
|
||||||
|
db.session.add(processor.workflow_model) ## Assure this isn't transient, which was causing some errors.
|
||||||
|
self.assertIsNotNone(processor.workflow_model.bpmn_workflow_json)
|
||||||
processor2 = WorkflowProcessor(processor.workflow_model)
|
processor2 = WorkflowProcessor(processor.workflow_model)
|
||||||
self.assertFalse(processor2.is_latest_spec) # Still at version 1.
|
self.assertFalse(processor2.is_latest_spec) # Still at version 1.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue