Commit Graph

1995 Commits

Author SHA1 Message Date
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
jasquat 6f0e59409c
Feature/update extension docs (#1028)
* updated the docs around extensions and updated extensions interfaces in the frontend w/ burnettk

* allow specifying files in component args for extensions and added some support for CustomForm from extensions w/ burnettk

* added comments to the extension interfaces file to better describe how to create them

* finished adding comments to extension interfaces

* added comments at top and some minor tweaks

* some fixes for extensions w/ burnettk

* some fixes for extensions w/ burnettk

* ignore eslint issues for now w/ burnettk

* removed deprecated extension items w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-13 16:48:13 -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
jbirddog c6c1a4a593
Allow getting all secondary keys and values for a KKV top level key (#1016) 2024-02-12 14:50:34 +00:00
burnettk 08002d2c9c
fix some links 2024-02-11 12:28:57 -05:00
Kevin Burnett 04f8f2b0ac
update local dev setup docs (#1015)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-02-09 18:28:39 -08:00
Tim Consolazio 223ff95014
Update readme (#1010)
* 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.
2024-02-09 14:22:53 -08:00
jasquat 4983d48f22
cherry-picked 81b6431c58 into main for task_guid backfill fix 2024-02-09 10:47:24 -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