Commit Graph

2003 Commits

Author SHA1 Message Date
jasquat b5b8031b44
fix-human-task-guid-fk (#1260)
* removed human_task_ibfk_5 from old migration file and updated task id removal migration to work with both mysql and postgres w/ burnettk

* use sqlalchemy error classes instead of mysql w/ burnettk

* mypy w/ burnettk

* remove deprecated cypress config w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-25 14:32:44 -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
burnettk 420e9e32a8
let restricted script engine use random 2024-03-12 12:11:57 -04:00
jasquat 816d0607a2
run do engine steps for message start events even in async mode to ensure tasks are committed to the db properly w/ burnettk (#1191)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-11 17:26:37 -04:00
Dan Funk e2714fb5fd Fixing line endings on a markdown file. 2024-03-11 14:57:50 -04:00
Dan Funk 4a30b814fe just some updated docs. 2024-03-11 14:36:04 -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
jbirddog 9c6c99db8e
Add min/max to the function allow list (#1187) 2024-03-11 10:18:37 -04:00
Dan Funk 137e8a8232
Docs/pycharm setup (#1169)
* Just some notes from getting my dev environnent set up again.

* fix readme link

* fixing black configuration.

* Black config settings in pre-commit.

* Update README.md

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

* Update README.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-03-07 14:40:24 -05:00
jasquat bc3708bb00
async-support-on-message-start (#1173)
* added async and sync support for the message start api w/ burnettk

* removed debug dump call w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-06 13:43:06 -08:00
jasquat a762efca33
remove unnecessary queue to celery when submitting a task w/ burnettk 2024-03-06 16:34:49 -05:00
jasquat f1abed13d6
remove unused arg from celery worker producer w/ burnettk 2024-03-06 15:48:24 -05: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
jasquat 31b84c60e3
updated cryptography for security w/ burnettk 2024-03-05 14:43:55 -05:00
jasquat 0507f9cd8b
set request body schemas to open schemas rather than using incorrect ones w/ burnettk (#1168)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-05 11:35:30 -08:00
jasquat 2be7db73df
Feature/async support on pi run (#1161)
* added execution mode to task submit and pi run calls to run in async or sync mode w/ burnettk

* do not allow requesting async mode without celery w/ burnettk

* attempt to move queue checking for celery and async to same method to avoid confusing methods w/ burnettk

* if requesting synchronous mode then run with greedy as well w/ burnettk

* implemented some coderabbit suggestions w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-05 08:20:54 -08:00
Kevin Burnett bcf0593ebc
bpmn unit test framework improvements for json issue (#1162)
* added the contents of script engine init to the process model test running init w/ burnettk

* get backend scripts

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-05 03:49:18 -08: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 4cebddb6c2
commit the db at the end of the save method in the processor to avoid race conditions between process instance and human task w/ burnettk (#1158)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 14:27:27 -05: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
jbirddog 222685155a
Fix for first time use of dev containers in clean environment (#1136) 2024-03-01 15:28:06 -05:00
Kevin Burnett 4d9946cc91
make a script engine for bpmn unit tests (#1145)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-01 08:50:07 -08:00
jasquat 346d7a4660
task-show-render-instructions-fix (#1142)
* add the jinja rendered instructions back to the extensions list before returning

* fixed comment

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-01 10:49:44 -05:00
Kevin Burnett 72629f5ed8
unblock bpmn unit testing with duplicate files, our script engine, get process initiator user (#1140)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-02-29 16:21:13 -08:00
jasquat 0565e63e98
do not overwrite the instructionsForEndUser on the spec object with the rendered instructions w/ burnettk (#1135)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-29 11:39:12 -08:00
jasquat 4cf70a8e9b
feature/support-google-oauth (#1125)
* support decrypting and validating jwt tokens from google auth w/ burnettk

* moved code as suggested by coderabbit

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-29 07:06:54 -08:00
jbirddog 840dd74cea
Update secrets programmatically (#1122)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-02-29 09:55:09 -05:00
jbirddog bb3a685138
Dev containers now work with "run as me" (#1129) 2024-02-29 05:27:06 -05:00
jasquat b2126e8f38
check if the dir looks like it is a git directory already before cloning to it w/ burnettk 2024-02-28 14:25:38 -05:00
jasquat 947c00670d
set the GIT_SSH_COMMAND so we can use the private key path 2024-02-28 11:07:29 -05:00
jasquat 11226167cc
Merge branch 'main' of github.com:sartography/spiff-arena 2024-02-28 10:35:38 -05:00
jasquat 1fbf237823
remove lost and found dir if it exists w/ burnettk 2024-02-28 10:35:35 -05:00
jbirddog 52f986ffe2
Dev Container Tweaks (#1117) 2024-02-28 09:49:45 -05:00
jbirddog d66ea0e9ac
Only show data stores from upsearch in the properties panel (#1116) 2024-02-27 18:17:14 -05:00
jasquat b0dbdfb192
commit the repo when a data store is added (#1115)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-27 11:50:17 -05:00
jasquat b210b84b3a
added script to clone the process model repo w/ burnettk 2024-02-26 16:34:06 -05:00
jasquat 80886b53bc
do not validate the audience with the jwt decode since we have a more thorough check for it later w/ burnettk (#1109)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-26 14:12:36 -05:00
jasquat 13848e85e3
feature/fix-service-task-oauth-flow (#1108)
* corrected service task controller excluded auth methods to reference the correct controller w/ burnettk

* fixed docs requirements file w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-26 10:54:26 -05:00
jbirddog ea9336e625
docker compose overlay file for editable backend container (#1098)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-02-23 19:13:16 -05:00
jasquat 044e9facf7
feature/pin-auth-exlusions-to-controller (#1087)
* this adds lookup of the controller names as well as the functions when checking if api call should be excluded

* added login functions to exclusion list and turned it into a constant

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-22 10:19:04 -05:00
burnettk 802d80883c
fix error message on dup message start event 2024-02-21 13:48:05 -05: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
jbirddog 6a81d684a5
Support syncing data stores in the DB with those defined in process_group.json files (#1052) 2024-02-19 12:21:57 -05: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
jbirddog 680fbd9658
Store data store specifications in process_group.json (#1040) 2024-02-15 09:57:53 -05:00