Commit Graph

634 Commits

Author SHA1 Message Date
jbirddog 9043a08a9e
Drop element units as a dependecy (#1366) 2024-04-10 11:22:52 -04:00
jasquat 293aa867a1
Auth for secrets (#1369)
* added new api to show secrets so we can use that in permissions

* updated frontend to use new secret show value api

* cleaned up secret_show method

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-09 13:44:47 -04:00
Kevin Burnett 2b6640f24c
Prevent duplicated path prefix elements in generated URLs take two (#1350)
* Prevent duplicated path prefix elements in generated URLs

* add more debug info

* pure refactor

* let flask determine how to access site

* build this branch

* build image

* use more url_for, which includes a slash, and things are working locally

* fix hopefully the last missing url_for

* add some code that works for any openid provider

* one more url_for and remove more backend url config references

---------

Co-authored-by: Bret Mogilefsky <bmogilefsky@gmail.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-04-08 08:50:55 -07:00
jasquat 12e7cecd97
local-openid-path-based-fix (#1332)
* use the backend url config for the well-known endpoint since request.host_url will not know about the path w/ burnettk

* attempting to fix run precommit in ci w/ burnettk

* fix constraints location w/ burnettk

* fix correct stanza w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-03 16:16:22 -04:00
jasquat b35ab336f5
Omit completed subprocesses (#1327)
* updates to avoid loading completed subprocesses when loading a processor w/ burnettk

* bpmn unit test generator in controller test is passing w/ burnettk

* most tests are passing again w/ burnettk

* tests are all passing now w/ burnettk

* added assertion to reset pi test to ensure task data does come back w/ burnettk

* removed debug benchmark stuff w/ burnettk

* pyl w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-03 12:17:14 -04:00
jasquat 280240ca87
lookup 1000 groups when attempting to cache them so we are not restricted to 100 w/ burnettk (#1331)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-03 08:22:07 -07:00
jasquat cef93033e8
do not store pi events when running migrations (#1310)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-01 12:24:02 -04:00
dependabot[bot] 4a373be939
Bump black from 23.1.0 to 24.3.0 (#1285)
* Bump black from 23.1.0 to 24.3.0

Bumps [black](https://github.com/psf/black) from 23.1.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.1.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixed pre commit black issues w/ burnettk

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-27 14:05:49 -04:00
jasquat e724cc5856
added ability to retry getting a lock on task submit w/ burnettk (#1279)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 17:20:48 -04:00
jasquat 930cfb720c
Handle pi lock from message service (#1278)
* handle process instance already locked in message service

* moved celery check to own method in message sevice w/ burnettk

* removed initial implementation w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 16:04:15 -04:00
jbirddog e8d2396b38
Upsearch api (#1259)
* Run partial tests, add sqlite var

* Add upsearch api

* Getting ./bin/pyl to pass

* Getting ./bin/pyl to pass

* Clean up fixtures

* Revert this change

* PR feedback - use actual schema for api.yml

* Hopefully fix the permissions
2024-03-26 07:56:24 -07:00
jasquat a12d2883c1
Bpmn unit test from pi (#1262)
* added most of the code needed to generate a bpmn unit test from a process instance w/ burnettk

* pyl and tests are passing

* renamed some files and some clean up

* added api method to generate test case w/ burnettk

* debugging the generate test api w/ burnettk

* test case generator test case is now passing w/ burnettk

* added test for TaskMismatchError w/ burnettk

* added support for extension to create bpmn unit tests with the api w/ burnettk

* coderabbit and typeguard fixes w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 10:14:57 -04:00
jasquat ab9e823dcf
added public permissions to basic macro w/ burnettk 2024-03-22 12:00:00 -04:00
jasquat 0db1727a99
Bugfix/data object management (#1243)
* initial updates to prepare for data object data migration w/ burnettk

* added method to import bpmn_process_dict to the database w/ burnettk

* test to ensure we can import json is passing w/ burnettk

* added some more tests around importing bpmn process json w/ burnettk

* version 4 migration test is now passing w/ burnettk

* spiff lib back to main after its merge

* some coderabbit suggestions

* do not run version 3 and 4 migrations twice w/ burnettk

* build docker images for this branch w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-21 12:00:03 -04:00
jasquat 709a0c8492
Merge guest flow into unauth flow (#1233)
* removed some portions of the guest access flow in favor of the unauthed flow w/ burnettk

* removed guest access from auth flow in backend w/ burnettk

* updated frontend to use new public api for guest tasks

* fixed tests and updated get task url script to choose between public and non public urls

* removed old guest task support from frontend

* return 404 when a task cannot be found w/ burnettk

* fixed typo in group list tiles w/ burnettk

* added cypress tests for public formg w/ burnettk

* display metadata key for urls instead of values w/ burnettk

* updated permissions for acceptance testss w/ burnettk

* set up permissions for public group if it is in the list and login and logout admin user in ci to ensure permissions are set w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-19 11:52:27 -07:00
jasquat 9acd2954bb
Unauthed endpoint support (#1210)
* some basic updates for unauthed endpoints and the start of a test w/ burnettk

* added logic to create public access token if appropriate w/ burnettk

* updated message_form_show to return the rjs form w/ burnettk

* pyl w/ burnettk

* WIP: adding public routes to frontend w/ burnettk

* added public message form page to start a process instance w/ burnettk

* added api endpoint to submit message task data w/ burnettk

* allow switching rjsf themes in customform w/ burnettk

* we can submit a public message form w/ burnettk

* add message start submit to public exclusion list w/ burnettk

* run message submit in synchronous mode w/ burnettk

* a little refactoring to get ready for submitting unauthed tasks w/ burnettk

* created public controller w/ burnettk

* added api endpoint to submit additional public forms w/ burnettk

* added ability to submit a second form from the public web ui w/ burnettk

* some clean up and show markdown confirmation messages w/ burnettk

* added support for instructions and added a logout page for public users w/ burnettk

* support instructions for end user on the start message event as well w/ burnettk

* minor tweaks to public logout page w/ burnettk

* pyl w/ burnettk

* log unsupported form in custom form w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-14 15:55:37 -04:00
Dan Funk f8f64c3350
Allow deleting api keys after use. (#1206) 2024-03-14 10:43:14 -04:00
Dan Funk 86b31d20cb
Messages as MicroServices (#1185)
* Purpose:  Allow the messages api endpoint to accept arbitrary JSON in it's body - and to respond with the latest task_data - this will allow you to create BPMN processes are that can function as microservices.

* Fixing a bug that prevented the synchronous execution of a message post.
* A message post directly uses the body of the post, do not specify it within a "payload".
* The message response is not just the process instance details, it now contains the "process_instance" and "task_data" at the top level of the returned json.
* The last completed task data is now returned as a part of a response to the message api endpoint, it is with the "task_data" attribute.

* CodeRabbit suggestions

* run_pyl fixes

* fix lint

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-11 11:24:31 -07:00
jasquat bc2852c984
added swagger docs to exclusion list (#1170)
* added swagger docs to exclusion list w/ burnettk

* added test for swagger docs w/ burnettk

* pyl w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-06 09:47:20 -05:00
Kevin Burnett 3416843329
spiff lib upgrade (#1139)
* wip spiff lib upgrade

* unit and script tests are now passing w/ burnettk

* tests and pre-commit are passing

* pass None in as external_context as named param instead of creating a variable w/ burnettk

* some extra debugging in case bpmn_xml_file_contents is empty w/ burnettk

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 12:29:37 -08:00
jasquat a71af6e40f
Tcoz openai assist (#1138)
* Update README.md

Some notes for people that might want to run full-on native, with detail about how Mac hijacks port 7000 and how to get around it.

* Revert "Update README.md"

This reverts commit 096887c26d.

* README update and native code patch

Some details for user that might be running Python3, Mac, and want to run everything locally/natively.

* Implement basic tooltips

Uses MUI tooltip, as it behaves more predictably with existing styling, and enables top-level theme config.

Top-level configuration for all MUI components can be controlled via overriding the existing theme. See index.tsx. This could be done per user for customization, etc.

Enabling JSON module imports in tsconfig.json seemed to fix the error in ReactDiagramEditor

* Naive AI code editor implementation

A working starting point.

* Implement API to return if script assist should be enabled

Along with route and function, api config, etc.

* UI calls backend to see if script assist is enabled.

If it is, loads the related UI, otherwise it doesn't appear.

* Moving forward with service for message processing.

* Services scaffolded

* Open API called, prompt-engineered to get script only.

* Little cleanup work

* Enabled + process message working.

Had to find all the places permissions are enabled, etc.

* Cleanup, comments, etc.

* Env vars, styling, error cases, conditional display of script assist

Finishing touches for the most part.

REQUIRES TWO ENV VARS BE SET.

SPIFFWORKFLOW_SCRIPT_ASSIST_ENABLED=["True" | "true" | 1]  (anything else is false)
SECRET_KEY_OPENAI_API=[thekey]

The are retrieved in default.py. I run the app locally, so I just set them in the terminal.

NEW INSTALL: @carbon/colors (so we consistently use carbon palette etc.)

* Fix tooltips, clean up some styling.

Finishing it off.

* Add loader and error message

Complete UX stuff

* Update useScriptAssistEnabled.tsx

Remove log

* Update script_assist_controller.py

Add this tweak to avoid TMI.

* Some reasonable changes suggested by the build process

* Comments from PR.

* Update ProcessModelEditDiagram.tsx

Should (but I don't know how to tell yet) call the change handler that wasn't firing before.

* updated the permissions setting in authorization service w/ burnettk

* precommit now passes. tests are failing w/ burnettk

* pinned SpiffWorkflow to known working version and fixed tests. we will update spiff in a later pr w/ burnettk

* made changes based on coderabbi suggestions

* updated the error handling to be more inline with how we have handled other errors and some ui tweaks

* removed pymysql package w/ burnettk

* forgot to remove pymysql from lock file w/ burnettk

---------

Co-authored-by: Tim Consolazio <tcoz@tcoz.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 10:42:27 -05:00
Kevin Burnett e584d47205
support bpmn unit test method mocks (#1146)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-03 06:50:38 -08:00
jasquat 4ee2a289c3
delete message triggerable processes if they no longer exist within the corresponding file w/ burnettk (#1070)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-20 07:44:02 -08:00
jasquat 27ea21b81a
create process groups json file at root if it does not exist when creating a data store w/ burnettk (#1056)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-16 15:20:16 -05:00
jasquat cc3d10f340
Feature/generic webhook (#1020)
* added api endpoint for a generic webhook w/ burnettk

* added the start of test for testing webhooks w/ burnettk

* the initial test for webhooks is now working w/ burnettk

* added test to prove we can run a message send from a non-persistent process instance w/ burnettk

* pyl w/ burnettk

* updated connector-http for patch command w/ burnettk

* make the webhook persistent so the message instance can be created w/ burnettk

* make sure we commit the message instance to the db in the webhook code w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-12 13:44:52 -05:00
jasquat 4b2fbd8938
when starting a process model from a message start event cancel all start events that do not match w/ burnettk (#1005)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-08 14:55:35 -05:00
jbirddog 353b5a84a6
Support top level data stores, not exposed via the UI yet (#986) 2024-02-07 08:37:38 -08:00
jbirddog 305a6fb67a
KKV Revamp (#968) 2024-02-07 09:01:52 -05:00
jasquat 5ae59367cb
Feature/reset pi go button (#978)
* delete human task for task that is being reset to in a process instance w/ burnettk

* added script to remove duplicate human tasks from the database w/ burnettk

* test that human tasks are not duplicated during pi reset w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-06 15:50:00 -05:00
Kevin Burnett a61f2d6927
future tasks should not cause anything to happen if the instance is suspended (#952)
* Reapply "future tasks should not cause anything to happen if the instance is suspended"

This reverts commit 05b50df2b3.

* lint

* add required approval and merge instead of mark as auto merge

* lint

* added server default to new future_task column so default is actually added to the table schema w/ burnettk

* pyl w/ burnettk

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-06 11:43:17 -08:00
burnettk 05b50df2b3
Revert "future tasks should not cause anything to happen if the instance is suspended"
This reverts commit b627567add.
2024-02-02 17:59:37 -05:00
burnettk b627567add
future tasks should not cause anything to happen if the instance is suspended 2024-02-02 17:58:53 -05:00
Kevin Burnett 020519a724
support bpmn executable property (#934)
* support executable property

* process model with no primary file is not executable

* filter by executable and primary file and avoid snagging g.user from service

* kill Start buttons on process group list as well

* use more similar code to check is executable and write integration test

* add a test and improve a variable name

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-02-01 10:57:12 -08:00
Kevin Burnett 6a3f8a212f
update spiff and remove dot notation (#933)
* update spiff and remove dot notation

* update script_engine dependency based on spiff lib update

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-02-01 06:51:19 -08:00
Kevin Burnett 711da2b048
unique bpmn process ids (#927)
* remove SpecReferenceCache

* make sure strings are sometimes unique

* lint

* more random

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-01-30 12:48:44 -08:00
burnettk 40b9570e22
process instances for-me is a basic permissions thing needed by everyone 2024-01-30 12:16:46 -05:00
jasquat f0f4bcce12
Feature/homepage extension filter refactor (#919)
* WIP: initial work to have a home page created from an extension w/ burnettk

* added support to display an extension as the root page w/ burnettk

* allow extensions to add new routes to base routes w/ burnettk

* use page instead of creating new key route w/ burnettk

* added components to support pi tables in extensions w/ burnettk

* allow using asterisks to mark words as bold in process instance list table

* moved table component from InstancesListTable to own component w/ burnettk

* filters are somewhat working again w/ burnettk

* default homepage uses the table without filters component now w/ burnettk

* renamed instance list tables to be more appropriate w/ burnettk

* display errors if list table is used incorrectly w/ burnettk

* fixed issue where columns were not displaying in the filter list

* pyl

* rely on changes in report hash to determine if report hash state needs updating

* only show link to report if there are instances to show

* many updates for filtering to remove the apply button and clean things up w/ burnettk

* some more fixes for too many renderings w/ burnettk

* advanced filters are working again w/ burnettk

* clear is working again w/ burnettk

* fixed a few linting errors and warnings w/ burnettk

* fixed some cypress tests

* if there are errors then display them right away instead of trying to put together the other elements

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-01-26 11:41:07 -05:00
jbirddog 4758634c99
Show Data Store tiles on the Process Group page (#917)
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
2024-01-24 10:15:08 -05:00
jasquat 80bc2f2e42
Feature/typeahead allow guest user (#897)
* decode tokens with jwt instead of with base64 w/ burnettk

* try to verify jwt token with keycloak when we decode it w/ burnettk

* make the token algorithm a constant w/ burnettk

* WIP: create more valid looking jwt from spiff w/ burnettk

* tests are passsing now w/ burnettk

* some pyl stuff w/ burnettk

* fixed mypy issues w/ burnettk

* fixed issues from mypy fixes w/ burnettk

* do not load openid blueprint if not using those configs w/ burnettk

* used the process instance to determine if guest user can use connector api w/ burnettk

* only check the db for process instance if the api call is for typeahead

* removed unused test code

* pyl

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-01-16 14:47:25 -05:00
jbirddog 8e05e1e3c0
Add identifier and clz fields to the data stores response (#894) 2024-01-12 08:04:32 -05:00
jbirddog a8a32b60fa
Add data store at the process group level (#859) 2024-01-10 09:48:31 -05:00
jbirddog ad3e63367f
Make file upload detection more flexible, add integration test (#854) 2024-01-04 11:32:13 -05:00
jasquat a7a48ee9fc
feature/get-pg-of-readable-pm (#832)
* get parent process groups of process models that the user has access to w/ burnettk

* use the process group list to get the info we need for the group show page for permissions w/ burnettk

* clear the browser cache when updating a process group w/ burnettk

* fixed broken test w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-12-22 13:17:40 -05:00
jasquat d2b39b10c6
feature/handle-null-bpmn-process-on-pi (#827)
* do not error out and allow process instances to recover if the bpmn_process is null but the definition is set w/ burnettk

* fixed another flakey test w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-12-20 16:16:08 -05:00
jasquat 06bf1f24df
fixed flakey task model test 2023-12-20 13:54:20 -05:00
Kevin Burnett e1fefa9fc7
nplusone (#824)
* n plus one checks

* tests passing with nplusone

* satisfy probably-wrong json schema

* remove useless comment and consolidate poetry dev deps

* not actually going to add this dependency, but leave docs for next guy

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-12-20 07:18:20 -08:00
burnettk d688e2414d
make it so we can delete TaskInstructionsForEndUserModel on instance delete 2023-12-19 15:28:02 -05:00
jasquat 3fce735d4f
Feature/task table drop (#823)
* removed id from task and still working on getting the migration working w/ burnettk

* fixed migration to work on postgres and sqlite as well w/ burnettk

* fixed tests w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-12-19 08:59:29 -08:00
jasquat 15d0d788e5
Feature/pi show page diagram (#816)
* get most recent tasks based on last_state_change instead of task_model.id

* added api to get task instances of a task

* some changes to support displaying task instances

* forgot to commit the controller

* updated frontend to display info for other instances of a task w/ burnettk

* some formatting to the selected task instance w/ burnettk

* do not get task instances when selecting different instance w/ burnettk

* added tests for task-instances w/ burnettk

* some ui tweaks for task instance view w/ burnettk

* updates based on coderabbit

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-12-18 14:23:51 -05:00
jasquat c00d810704 Feature/data object category (#796)
* WIP: some initial code for category in data objects

* attempt to get the data object for the given bpmn process and instance of it w/ burnettk

* updates for data objects

* fixed tests

* made suggestions by code rabbit and moved logic to get process data file out of shared method since it has a completely different implentation

* remove commented out code

* updated SpiffWorkflow for data object category

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-12-11 07:42:01 -08:00