fixed some precommit

This commit is contained in:
jasquat 2022-06-20 10:56:32 -04:00
parent 5cfe999d34
commit 65da9ccbaa
15 changed files with 112 additions and 61 deletions

View File

@ -1,23 +1,27 @@
"""Grabs tickets from csv and makes process instances."""
import csv
import os
from flask import current_app
from flask_bpmn.models.db import db
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
import csv
from spiffworkflow_backend import create_app
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
from spiffworkflow_backend.models.user import UserModel
from spiffworkflow_backend.services.process_instance_processor import ProcessInstanceProcessor
from spiffworkflow_backend.services.process_instance_service import ProcessInstanceService
from flask import current_app
from spiffworkflow_backend.services.process_instance_processor import (
ProcessInstanceProcessor,
)
from spiffworkflow_backend.services.process_instance_service import (
ProcessInstanceService,
)
from spiffworkflow_backend.services.process_model_service import ProcessModelService
def print_process_instance_count(process_model_identifier_ticket: str) -> None:
"""Print process instance count."""
process_instances = ProcessInstanceModel.query.filter_by(process_model_identifier=process_model_identifier_ticket).all()
process_instances = ProcessInstanceModel.query.filter_by(
process_model_identifier=process_model_identifier_ticket
).all()
process_instance_count = len(process_instances)
print(f"process_instance_count: {process_instance_count}")
@ -30,19 +34,31 @@ def main():
with app.app_context():
process_model_identifier_ticket = "ticket"
db.session.query(ProcessInstanceModel).filter(ProcessInstanceModel.process_model_identifier == process_model_identifier_ticket).delete()
db.session.query(ProcessInstanceModel).filter(
ProcessInstanceModel.process_model_identifier
== process_model_identifier_ticket
).delete()
db.session.commit()
"""Print process instance count."""
process_instances = ProcessInstanceModel.query.filter_by(process_model_identifier=process_model_identifier_ticket).all()
process_instances = ProcessInstanceModel.query.filter_by(
process_model_identifier=process_model_identifier_ticket
).all()
process_instance_count = len(process_instances)
print(f"process_instance_count: {process_instance_count}")
# process_model = ProcessModelService().get_process_model(process_model_identifier_ticket)
columns_to_data_key_mappings = {"Month": "month", "MS": "milestone", "ID": "req_id", "Dev Days": "dev_days", "Feature": "feature", "Priority": "priority"}
columns_to_data_key_mappings = {
"Month": "month",
"MS": "milestone",
"ID": "req_id",
"Dev Days": "dev_days",
"Feature": "feature",
"Priority": "priority",
}
columns_to_header_index_mappings = {}
user = UserModel.query.filter_by(username='test_user1').first()
user = UserModel.query.filter_by(username="test_user1").first()
with open("tests/files/tickets.csv") as infile:
reader = csv.reader(infile, delimiter=",")
@ -52,7 +68,9 @@ def main():
header = next(reader)
for column_name in columns_to_data_key_mappings:
columns_to_header_index_mappings[column_name] = header.index(column_name)
columns_to_header_index_mappings[column_name] = header.index(
column_name
)
id_index = header.index("ID")
priority_index = header.index("Priority")
print(f"header: {header}")
@ -70,9 +88,14 @@ def main():
processor.do_engine_steps()
# processor.save()
for column_name, desired_data_key in columns_to_data_key_mappings.items():
for (
column_name,
desired_data_key,
) in columns_to_data_key_mappings.items():
appropriate_index = columns_to_header_index_mappings[column_name]
processor.bpmn_process_instance.data[desired_data_key] = row[appropriate_index]
processor.bpmn_process_instance.data[desired_data_key] = row[
appropriate_index
]
print(f"datas: {processor.bpmn_process_instance.data}")
if processor.bpmn_process_instance.data["month"] == "":
@ -85,6 +108,5 @@ def main():
processor.save()
# if __name__ == "__main__":
main()

View File

@ -1,33 +1,46 @@
import csv
import os
from flask import current_app
from flask_bpmn.models.db import db
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
import csv
from spiffworkflow_backend import create_app
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
from spiffworkflow_backend.models.user import UserModel
from spiffworkflow_backend.services.process_instance_processor import ProcessInstanceProcessor
from spiffworkflow_backend.services.process_instance_service import ProcessInstanceService
from flask import current_app
from spiffworkflow_backend.services.process_instance_processor import (
ProcessInstanceProcessor,
)
from spiffworkflow_backend.services.process_instance_service import (
ProcessInstanceService,
)
from spiffworkflow_backend.services.process_model_service import ProcessModelService
process_model_identifier_ticket = "ticket"
db.session.query(ProcessInstanceModel).filter(ProcessInstanceModel.process_model_identifier == process_model_identifier_ticket).delete()
db.session.query(ProcessInstanceModel).filter(
ProcessInstanceModel.process_model_identifier == process_model_identifier_ticket
).delete()
db.session.commit()
"""Print process instance count."""
process_instances = ProcessInstanceModel.query.filter_by(process_model_identifier=process_model_identifier_ticket).all()
process_instances = ProcessInstanceModel.query.filter_by(
process_model_identifier=process_model_identifier_ticket
).all()
process_instance_count = len(process_instances)
print(f"process_instance_count: {process_instance_count}")
process_model = ProcessModelService().get_process_model(process_model_identifier_ticket)
columns_to_data_key_mappings = {"Month": "month", "MS": "milestone", "ID": "req_id", "Dev Days": "dev_days", "Feature": "feature", "Priority": "priority"}
columns_to_data_key_mappings = {
"Month": "month",
"MS": "milestone",
"ID": "req_id",
"Dev Days": "dev_days",
"Feature": "feature",
"Priority": "priority",
}
columns_to_header_index_mappings = {}
user = UserModel.query.filter_by(username='test_user1').first()
user = UserModel.query.filter_by(username="test_user1").first()
with open("tests/files/tickets.csv") as infile:
reader = csv.reader(infile, delimiter=",")
@ -58,7 +71,9 @@ with open("tests/files/tickets.csv") as infile:
for column_name, desired_data_key in columns_to_data_key_mappings.items():
appropriate_index = columns_to_header_index_mappings[column_name]
print(f"appropriate_index: {appropriate_index}")
processor.bpmn_process_instance.data[desired_data_key] = row[appropriate_index]
processor.bpmn_process_instance.data[desired_data_key] = row[
appropriate_index
]
# you at least need a month, or else this row in the csv is considered garbage
month_value = processor.bpmn_process_instance.data["month"]

View File

@ -1,5 +1,3 @@
from __future__ import with_statement
import logging
from logging.config import fileConfig

View File

@ -1,12 +1,12 @@
"""Process_group."""
import marshmallow
from marshmallow import post_load
from marshmallow import Schema
from dataclasses import dataclass
from dataclasses import field
from typing import Optional
import marshmallow
from marshmallow import post_load
from marshmallow import Schema
from spiffworkflow_backend.models.process_model import ProcessModelInfo

View File

@ -1,5 +1,4 @@
"""Process_instance."""
from flask_bpmn.models.db import db
from sqlalchemy import ForeignKey
from sqlalchemy import func

View File

@ -1,12 +1,12 @@
"""Process_model."""
import marshmallow
from marshmallow import post_load
from marshmallow import Schema
from dataclasses import dataclass
from dataclasses import field
from typing import Optional
import marshmallow
from marshmallow import post_load
from marshmallow import Schema
@dataclass(order=True)
class ProcessModelInfo:

View File

@ -1,5 +1,6 @@
"""User."""
from typing import Optional
import jwt
import marshmallow
from flask import current_app
@ -66,9 +67,7 @@ class UserModel(db.Model): # type: ignore
raise KeyError("we need current_app.config to have a SECRET_KEY")
try:
payload = jwt.decode(
auth_token, secret_key, algorithms=["HS256"]
)
payload = jwt.decode(auth_token, secret_key, algorithms=["HS256"])
return payload
except jwt.ExpiredSignatureError as exception:
raise ApiError(

View File

@ -160,7 +160,9 @@ def process_model_list(process_group_id, page=1, per_page=100):
def get_file(process_group_id, process_model_id, file_name):
"""Get_file."""
process_model = ProcessModelService().get_process_model(process_model_id, group_id=process_group_id)
process_model = ProcessModelService().get_process_model(
process_model_id, group_id=process_group_id
)
files = SpecFileService.get_files(process_model, file_name)
if len(files) == 0:
raise ApiError(
@ -180,7 +182,9 @@ def get_file(process_group_id, process_model_id, file_name):
def process_model_file_update(process_group_id, process_model_id, file_name):
"""Process_model_file_save."""
process_model = ProcessModelService().get_process_model(process_model_id, group_id=process_group_id)
process_model = ProcessModelService().get_process_model(
process_model_id, group_id=process_group_id
)
request_file = get_file_from_request()
request_file_contents = request_file.stream.read()
@ -198,7 +202,9 @@ def process_model_file_update(process_group_id, process_model_id, file_name):
def add_file(process_group_id, process_model_id):
"""Add_file."""
process_model_service = ProcessModelService()
process_model = process_model_service.get_process_model(process_model_id, group_id=process_group_id)
process_model = process_model_service.get_process_model(
process_model_id, group_id=process_group_id
)
request_file = get_file_from_request()
file = SpecFileService.add_file(
process_model, request_file.filename, request_file.stream.read()
@ -239,7 +245,9 @@ def process_instance_create(process_group_id, process_model_id):
def process_instance_list(process_group_id, process_model_id, page=1, per_page=100):
"""Process_instance_list."""
process_model = ProcessModelService().get_process_model(process_model_id, group_id=process_group_id)
process_model = ProcessModelService().get_process_model(
process_model_id, group_id=process_group_id
)
if process_model is None:
raise (
ApiError(
@ -276,7 +284,9 @@ def process_instance_list(process_group_id, process_model_id, page=1, per_page=1
def process_instance_report(process_group_id, process_model_id, page=1, per_page=100):
"""Process_instance_list."""
process_model = ProcessModelService().get_process_model(process_model_id, group_id=process_group_id)
process_model = ProcessModelService().get_process_model(
process_model_id, group_id=process_group_id
)
if process_model is None:
raise (
ApiError(

View File

@ -49,6 +49,7 @@ class Script:
We may be able to remove the task for each of these calls if we are not using it other than potentially
updating the task data.
"""
def make_closure(subclass, task, workflow_id):
"""Yes - this is black magic.
@ -84,6 +85,7 @@ class Script:
We may be able to remove the task for each of these calls if we are not using it other than potentially
updating the task data.
"""
def make_closure_validate(subclass, task, workflow_id):
"""Make_closure_validate."""
instance = subclass()

View File

@ -28,7 +28,9 @@ class ProcessInstanceService:
TASK_STATE_LOCKED = "locked"
@staticmethod
def create_process_instance(process_model_identifier, user, process_group_identifier=None):
def create_process_instance(
process_model_identifier, user, process_group_identifier=None
):
"""Get_process_instance_from_spec."""
process_instance_model = ProcessInstanceModel(
status=ProcessInstanceStatus.not_started,

View File

@ -2,7 +2,8 @@
import os
import shutil
from datetime import datetime
from typing import List, Union
from typing import List
from typing import Union
from flask_bpmn.api.api_error import ApiError
from lxml import etree # type: ignore
@ -126,7 +127,9 @@ class SpecFileService(FileSystemService):
@staticmethod
def set_primary_bpmn(
workflow_spec: ProcessModelInfo, file_name: str, binary_data: Union[bytes, None] = None
workflow_spec: ProcessModelInfo,
file_name: str,
binary_data: Union[bytes, None] = None,
) -> None:
"""Set_primary_bpmn."""
# If this is a BPMN, extract the process id, and determine if it is contains swim lanes.

View File

@ -4,7 +4,7 @@ TRUE,1,1,15.1.3,API,Code bases established using Flask Blueprints,A,Generate a n
TRUE,1,1,7.1.1,API,Deploy Process ,A,The engine offers an API that deploys a set of BPMN process models. It must be possible to include BPMN files in the API request.,,,XS(P),0.4,0.8,1,,0.5,0.5,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ADM-D001,1,A
TRUE,1,1,7.2,API,Deploy Process ,C,"Each business process model is assigned to a process group configured in the model itself, which is a logical identifier.",,,XS,0.5,1.0,1,,0.5,0.5,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ADM-D002,1,C
TRUE,1,1,7.3,API,Deploy Process ,A,"When deploying a new process model version, old process instances are still executed with the old process model version(s).",,,XS,0.5,1.0,1,A BPMN Process Model is deployed and process instances using that model are instantiated. later a new version is deployed. The old instances are still running correctly and with the old process model version.,0.5,0.5,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ADM-D003,1,A
TRUE,1,1,6.1,API,Instantiate Process ,A,"Process Models can be instantiated by API calls to a model-defined endpoint, e.g., the BPMN model defines BudgetApproval as an endpoint which is then exposed via https://localhost:8080/processes/BudgetApproval. Calling this API (no parameters required) will instantiate a process instance of the most current version of this process model.
TRUE,1,1,6.1,API,Instantiate Process ,A,"Process Models can be instantiated by API calls to a model-defined endpoint, e.g., the BPMN model defines BudgetApproval as an endpoint which is then exposed via https://localhost:8080/processes/BudgetApproval. Calling this API (no parameters required) will instantiate a process instance of the most current version of this process model.
If the request is authenticated, the processInitiator metadata attribute of the process instance is set to the authenticated user.",,,S,1.0,3.0,3,Renaming of endpoints required - but otherwise complete.,1.5,1.5,,,,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ADM-E001,1,A
TRUE,1,1,15.3.1,BPMN.IO,Data Refactor-Architect,A,,,,XL(P),3.0,6.0,6,This covers the modifications to the BPMN.io open source tooling to allow us valid Data Input and Data Output models with which to work.,,,6,,,6,,,,,,1.8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
TRUE,1,1,16.1,,,A,Ability to create a BPMN workflow editing tool that allows workflows to be designed visually using functionality similar to drag and drop.,,,S,1.0,3.0,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
@ -26,17 +26,17 @@ TRUE,2,1,7.9.2,API,Process Instance Pagination ,,,,,,,1,1,,,,,,1,1,,,,,,,,,,,,,,
TRUE,2,1,7.9.3,API,Process Model Pagination ,,,,,,,1,1,,0.5,0.5,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
TRUE,2,1,7.9.4,UI,Process Model & Group UI,,,,,,,1,1,,,,,,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,
TRUE,2,1,7.9.5,UI,Support editing DMN,,,,,,,1,1,,0.5,0.5,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
FALSE,2,1,6.2,API,"Process Instance, Model and Model Group instantiation to API.",A,"Process Models can be instantiated by API calls to a model-defined endpoint, e.g., the BPMN model defines BudgetApproval as an endpoint which is then exposed via https://localhost:8080/processes/BudgetApproval. Calling this API with respective parameters, which will mapped to the incoming message of the message start event, will instantiate a process instance of the most current version of this process model.
FALSE,2,1,6.2,API,"Process Instance, Model and Model Group instantiation to API.",A,"Process Models can be instantiated by API calls to a model-defined endpoint, e.g., the BPMN model defines BudgetApproval as an endpoint which is then exposed via https://localhost:8080/processes/BudgetApproval. Calling this API with respective parameters, which will mapped to the incoming message of the message start event, will instantiate a process instance of the most current version of this process model.
If the request is authenticated, the processInitiator metadata attribute of the process instance is set to the authenticated user.
",,,S,1.0,3.0,3,"We have this endpoint, we need to ability to fire the message rather than start the default process.",,,,3.0,,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ADM-E002,2,A
FALSE,2,1,7.6.1,API,Error Handling and Resolution,A,"Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are:
- fault (BPMN standard compliant),
FALSE,2,1,7.6.1,API,Error Handling and Resolution,A,"Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are:
- fault (BPMN standard compliant),
- fault+notify
Notifications are done via sending emails to configurable email addresses.",,,S,1.0,3.0,2,"Depoy a BPMN model without process instance fault behavior configuration and a script task that throws an exception. Instantiate the model and verify that its end state is faulted.
Depoy a BPMN model with process instance fault behavior set to fault and a script task that throws an exception. Instantiate the model and verify that its end state is faulted.
Depoy a BPMN model with process instance fault+notify behavior set to fault and a script task that throws an exception. Instantiate the model and verify that its end state is faulted, and a notification email is sent.",0.5,0.5,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ADM-D005a,2,A
FALSE,2,1,7.6.2,API,Error Handling and Resolution,C,"Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are:
- suspend,
FALSE,2,1,7.6.2,API,Error Handling and Resolution,C,"Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are:
- suspend,
- suspend+notify
Notifications are done via sending emails to configurable email addresses.",,,S,1.0,3.0,2,"Depoy a BPMN model with process instance fault behavior set to suspend and a script task that throws an exception. Instantiate the model and verify that its state is suspended.
Depoy a BPMN model with process instance suspend+notify behavior set to fault and a script task that throws an exception. Instantiate the model and verify that it is suspended, and a notification email is sent.",0.5,0.5,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ADM-D005b,2,C

1 Month MS ID Component Feature Priority Feature description T-Shirt Size Min Days Max Days Dev Days Brief description of work required Jason Kevin Dan Elizabeth Mike Total Jason Kevin Dan Elizabeth Mike Total
4 TRUE 1 1 7.1.1 API Deploy Process A The engine offers an API that deploys a set of BPMN process models. It must be possible to include BPMN files in the API request. XS(P) 0.4 0.8 1 0.5 0.5 1 ADM-D001 1 A
5 TRUE 1 1 7.2 API Deploy Process C Each business process model is assigned to a process group configured in the model itself, which is a logical identifier. XS 0.5 1.0 1 0.5 0.5 1 ADM-D002 1 C
6 TRUE 1 1 7.3 API Deploy Process A When deploying a new process model version, old process instances are still executed with the old process model version(s). XS 0.5 1.0 1 A BPMN Process Model is deployed and process instances using that model are instantiated. later a new version is deployed. The old instances are still running correctly and with the old process model version. 0.5 0.5 1 ADM-D003 1 A
7 TRUE 1 1 6.1 API Instantiate Process A Process Models can be instantiated by API calls to a model-defined endpoint, e.g., the BPMN model defines BudgetApproval as an endpoint which is then exposed via https://localhost:8080/processes/BudgetApproval. Calling this API (no parameters required) will instantiate a process instance of the most current version of this process model. If the request is authenticated, the processInitiator metadata attribute of the process instance is set to the authenticated user. Process Models can be instantiated by API calls to a model-defined endpoint, e.g., the BPMN model defines BudgetApproval as an endpoint which is then exposed via https://localhost:8080/processes/BudgetApproval. Calling this API (no parameters required) will instantiate a process instance of the most current version of this process model. If the request is authenticated, the processInitiator metadata attribute of the process instance is set to the authenticated user. S 1.0 3.0 3 Renaming of endpoints required - but otherwise complete. 1.5 1.5 3 ADM-E001 1 A
8 TRUE 1 1 15.3.1 BPMN.IO Data Refactor-Architect A XL(P) 3.0 6.0 6 This covers the modifications to the BPMN.io open source tooling to allow us valid Data Input and Data Output models with which to work. 6 6 1.8 1
9 TRUE 1 1 16.1 A Ability to create a BPMN workflow editing tool that allows workflows to be designed visually using functionality similar to drag and drop. S 1.0 3.0 3
10 TRUE 1 1 16.2 A Platform should be designed so that the workflow processes can be viewed in various levels of detail. E.g. the ability to zoom in and zoom out to show the correct level of detail. The process can be viewed and any associated subprocesses can be accessed from the same UI including clicking into the underlying python scripts. S 1.0 3.0 3
26 FALSE 2 1 7.6.1 API Error Handling and Resolution A Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are: - fault (BPMN standard compliant), - fault+notify Notifications are done via sending emails to configurable email addresses. Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are: - fault (BPMN standard compliant), - fault+notify Notifications are done via sending emails to configurable email addresses. S 1.0 3.0 2 Depoy a BPMN model without process instance fault behavior configuration and a script task that throws an exception. Instantiate the model and verify that its end state is faulted. Depoy a BPMN model with process instance fault behavior set to fault and a script task that throws an exception. Instantiate the model and verify that its end state is faulted. Depoy a BPMN model with process instance fault+notify behavior set to fault and a script task that throws an exception. Instantiate the model and verify that its end state is faulted, and a notification email is sent. 0.5 0.5 1 ADM-D005a 2 A
27 FALSE 2 1 7.6.2 API Error Handling and Resolution C Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are: - suspend, - suspend+notify Notifications are done via sending emails to configurable email addresses. Allow for configuring uncaught error-behavior, i.e., if a task fails or any expression could not be evaluated, and no matching error event is found. Options are: - suspend, - suspend+notify Notifications are done via sending emails to configurable email addresses. S 1.0 3.0 2 Depoy a BPMN model with process instance fault behavior set to suspend and a script task that throws an exception. Instantiate the model and verify that its state is suspended. Depoy a BPMN model with process instance suspend+notify behavior set to fault and a script task that throws an exception. Instantiate the model and verify that it is suspended, and a notification email is sent. 0.5 0.5 1 ADM-D005b 2 C
28 FALSE 2 1 12.1 Event logging C To better demonstrate the event log, an excerpt could look like this for executing a receive task and a service task: S 1.0 3.0 3 We basically have this already. 1.5 1.5 3 2 C
29 FALSE 2 1 15.2.4 UI Web UI A Create a new Status.IM web application for UI Specific components. M 3.0 5.0 5 2.5 2.5 5 4.5
30 TRUE 2 1 15.6 UI Script editing A Add ability to edit inline script for tasks in new bpmn-js M 1.0 4.0 3 1.5 1.5 3 2.7 2 A
31 FALSE 2 1 15.3.2 SPIFF Data Refactor-implement A XL(P) 7.0 14.0 12 Proper support for Data Input and Data Output mappings. 7.2 4.8 12
32 FALSE 3 2 15.2.2 BPMN Editor, Form Viewer refactor to core library. A Shift BPMN Editors, Form Viewers, etc.. back into the core library. L 5.0 10.0 3 A
33 FALSE 3 2 15.4 Ability to cluster and distribute system to support larger, failure tolerant systems. (Document only!) A We should budget time to assure we can effectively cluster and distribute the system to support larger, failure tolerant systems. M 3.0 5.0 #N/A 1 A
34 FALSE 3 2 10.2 Roles and Permissions A All interactions via the API must be authorized. By default, an administrator group is authorized for all activities only. The portal should hide options for which the user has no permissions. S 1.0 3.0 2 We have a well ecapsulated permission system for the API that can be easily modified and extended. 2 #N/A 1 A
35 FALSE 3 2 10.3 Roles and Permissions A Permissions can be assigned to process instances at run-time. Each process instance has a logical user “processInitiator” which may be assigned permissions for a process instance. S 1.0 3.0 2 This is currently implemented. Process intances have a natural owner. 2 #REF! #REF! #REF!
36 FALSE 3 2 10.4 Roles and Permissions A Permissions can be assigned to the Process Models, which are inherited to all Process Instances, e.g., administering includes termination and changing is allowed for all Process Instances of that Process Model. M 3.0 5.0 4 We don't currently have a concept of assigning control of a process model to a specific user, nore the concept of inheritance. 2 2 #N/A 2 A
37 FALSE 3 2 10.6 Roles and Permissions A If enabled on the server, users can register “anonymously” without requiring administrative intervention and are assigned the “anonymous” group. The server will challenge the client to sign a message to establish ownership of public key, a.k.a. Web3 Sign-In. For a code example see https://pypi.org/project/django-web3-auth/ M 3.0 5.0 4 Integration point - I'm wondering if we want to handle gorups here? Rathr than internally as in 10.1? 4 #N/A 3 A
38 FALSE 3 2 7.1.2 API Deploy Process C The API must be secured via permissions. It must be possible to enter a URL to upload a model in addition to the full xml file previously implemented. XS(P) 0.1 0.3 1 1 ADM-P002 3 A
39 FALSE 3 2 9.1 Inspect Process Instance A User inspects a process instance (process instance model view with activity states and highlight active activities) by clicking on process instance in table view. S 1.0 3.0 3 We have a basic "Navigation" system that can return the current tasks/activities 0.75 2.25 ADM-P003 3 A
40 FALSE 3 2 15.2.3 A Start supporting forms M 3.0 5.0 5 2.25 2.75 #N/A 3 A
41 FALSE 3 2 Messages (avoiding spaghetti) Improve the way we handle messages across workflows. L 5.0 10.0 10 2.5 7.5 #N/A 3 A
42 FALSE 3 2 Navigation Ability to navigate back / view previous steps in a workflow without resetting. S 1.0 3.0 3 1.5 1.5 #N/A 3 C

View File

@ -1,5 +1,4 @@
"""Test Api Blueprint."""
# TODO: possibly get this test working again
# import json
# from typing import Union

View File

@ -689,7 +689,7 @@ def test_process_instance_report_with_default_list(
<= process_instance_dict["end_in_seconds"]
)
assert process_instance_dict["status"] == "complete"
assert process_instance_dict["data"]['Mike'] == "Awesome"
assert process_instance_dict["data"]["Mike"] == "Awesome"
def create_process_instance(

View File

@ -4,7 +4,9 @@ from spiffworkflow_backend.models.process_model import ProcessModelInfo
def test_initializes_files_as_empty_array() -> None:
"""Test_initializes_files_as_empty_array."""
process_model_one = create_test_process_model(id="model_one", display_name="Model One")
process_model_one = create_test_process_model(
id="model_one", display_name="Model One"
)
assert process_model_one.files == []
assert process_model_one.libraries == []