Commit Graph

574 Commits

Author SHA1 Message Date
jbirddog 8d72ef5cfd Feature flag support (#787) 2023-12-05 10:29:54 -05:00
Kevin Burnett 353ba4cd31 avoid print statements, generally (#784)
* avoid print statements, generally

* remove test for empty main script

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-12-01 06:24:11 -08:00
jasquat 1627f5dd07 bugfix/guest-login-multiple-auths (#782)
* This fixes guest login with using multiple auths, removes empty items from ApiError, and raises if redirect_url given to login does not match expected frontend host w/ burnettk

* get body for debug

* try to get the logs from the correct place to upload w/ burnettk

* mock the openid call instead of actually calling it w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-11-30 13:51:01 -05:00
jasquat d737d40ab7 disabled no task data on completed tasks when rehydrating (#706)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-11-21 10:49:16 -05:00
jasquat 91ee554543 ensure we do not delete user group assignments from regexes w/ burnettk (#690)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-11-20 08:27:28 -08:00
jasquat b031b0f940 remove the unused next_task key from api calls since nobody uses it w/ burnettk essweine (#688)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-11-17 13:34:04 -08:00
Kevin Burnett 8d85e5ac26 added some updates to help with logging deployments w/ burnettk (#683)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-11-16 13:15:49 -08:00
jasquat 449fe87d43 Feature/deny macro on permission (#672)
* look for deny in the permission action rather than in the target uri and updated the documentation w/ burnettk

* added depecation warning if allowed_permissions is being used intead of actions w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-11-15 11:46:56 -05:00
Kevin Burnett 8dcdae2590 Feature/fix filters (#670)
* work in progress

* respect multiple filters for the same field

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-11-15 06:20:00 -08:00
jasquat 1d37001727 Feature/no data for finished spiff tasks (#661)
* do not add data to spiff tasks if that task is finished w/ burnettk

* build docker image for this branch w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-11-14 12:47:20 -08:00
jbirddog c122926e01 Support creating unique top level keys for KKV data store (#613) 2023-11-13 11:37:24 -05:00
jasquat d5b0330609 Feature/support multiple auth (#602)
* added some support for configs to have mutliple auths

* multiple openids services are mostly working - still needs some cleanup

* some cleanup for pyl and fixed login_return for internal openid server w/ burnettk

* if only one auth is returned from backend then just do that w/ burnettk

* login page has been formatted w/ burnettk

* some extra formatting on the login page w/ burnettk

* relabel test openid providers and add user

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-11-09 10:34:07 -05:00
jasquat 39edd60fd6 Feature/hide private data objects (#581)
* added test and some additional support for deny permissions w/ burnettk

* added support for deny through permissions-check api w/ burnettk

* support DENY at the beginning of a permission target marcro

* do not look up permissions using grant type, only use the uniqueness key

* added support in frontend to display a nice error if user does not have access to a data object value w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-25 16:31:06 -04:00
jasquat 54b7c5c3ec feature/formatting-in-extension-md (#559)
* support formatting data client side in markdown and support greater than and less than for metadata column filters w/ burnettk

* moved spiff conversion functions to FormattingService and use it in InstructionsForEndUser w/ burnettk

* added tests for greater than and less than metadata operators and added negative tests w/ burnettk

* removed unneeded useEffect w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-20 15:19:26 -04:00
jasquat 2f9aa12906 Feature/error boundary (#552)
* WIP for error boundary support w/ burnettk

* updates to catch error boundary events and send them back out w/ burnettk

* fixed broken test w/ burnettk

* use connector-http and spiffworkflow-proxy from main w/ burnettk

* updated smtp and slack connectors in connector-proxy-demo w/ burnettk

* added more tests for the service task service call connector to test errors w/ burnettk

* added spiffworkflow-connector-command and some code clean up

* updated the connectors in the proxy demo

* use SpiffWorkflow from git instead of locally

* some cleanup while code reviewing

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-18 14:00:12 -04:00
jbirddog a80abc4c47 Keyed key/value data store implementation (#548) 2023-10-17 10:59:01 -04:00
jasquat c2dc4a738e Feature/data migrator tests (#546)
* using new spiffworkflow locally and the db can be recreated w/ burnettk

* tests are passing w/ burnettk

* added version 3 data migration for typenames on tasks and bpmn processes w/ burnettk

* pyl w/ burnettk

* attempting to add tests for data migrator and fix 1.3 for postgres

* run version_1_3 migration differently from postgres versus mysql and sqlite

* look up the task model again to make sure it is fresh w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-12 14:29:51 -04:00
jasquat 4d842e8dbf Improvement/better serialization (#540)
* using new spiffworkflow locally and the db can be recreated w/ burnettk

* tests are passing w/ burnettk

* added version 3 data migration for typenames on tasks and bpmn processes w/ burnettk

* pyl w/ burnettk

* switch SpiffWorkflow back to main

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-12 14:14:02 -04:00
jasquat db4e9292f6 remove colons as well when checking wildcard permissions and updated test to ensure it works as expected 2023-10-11 10:25:02 -04:00
jasquat 8bf92f7a39 Feature/regex support in permissions (#530)
* support wildcards when adding users to groups from waiting table

* moved the user route to authentication_controller to avoid having so many user routes and this controller was all about login

* added test to ensure regexes work for permissions - still need to remove old ones on refresh

* moved token related code out of authorization service and into authentication service w/ burnettk

* remove old user group assignment waiting entries when refreshing permissions w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-06 13:47:40 -04:00
jasquat cba4a19d3b Feature/remove group service (#529)
* removed group service in favor of user service and messing around with ruff and pre-commeit w/ burnettk

* pyl can succeed now w/ burnettk

* removed debug code w/ burnettk

* pyl

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-05 13:27:38 -04:00
jbirddog 34a0323c4d Upsearch for data stores (#520) 2023-10-04 09:42:25 -04:00
Kevin Burnett fa5109ff57 update permission check to hopefully improve performance (#523)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-10-03 13:00:13 -07:00
jasquat 5d4713fc0e feature/use-context-with-git-commands (#524)
* use the c option with git commands instead of using cd from python w/ burnettk

* removed the cd method since we should not be using it since it is not threadsafe

* pyl

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-10-03 16:00:03 -04:00
jasquat 8bf38aaa1c Feature/new reference cache (#511)
* added basic model for new reference cache w/ burnettk

* switched out SpecReferenceCache for ReferenceCacheModel w/ burnettk jbirddog

* pyl w/ burnettk jbirddog

* save items to the db using the new cache with generation table w/ burnettk

* bulk save for performance

* tests are passing

* actually use the new generation table - we still need a test to ensure we are using it

* added test to ensure using new cache generation

* corrected reference interface on frontend w/ burnettk

* do not perform git pull in webhook if the revision is the same as the current w/ burnettk jbirddog

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-09-22 11:28:59 -04:00
jasquat 1826cc4b6c Improvement/flexible task iteration (#507)
* updated to use new spiff branch and fixed broken tests w/ burnettk essweine

* updated spiffworkflow with new main build w/ burnettk essweine

* initial updates to new spiff branch w/ burnettk essweine

* more updates for new spiff w/ burnettk essweine

* fixed some linting issues w/ burnettk essweine

* fixed some failing tests w/ burnettk

* updated spiffworkflow for cancel fix w/ burnettk

* Improvement/flexible task iteration 2 (#504)

* wip

* consistent failure, mostly

* removing test code and tests

* removing unused test bpmn files

* removing unused test bpmn files

* minor cleanup of commented code

* spaces and unused imports

* go back to spiff on main

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>

* lint

* updated test to reflect storing predicted tasks w/ burnettk

* add some orders so postgres does not do whatever it wants, and clear log

* fix lint

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: danfunk <daniel.h.funk@gmail.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-09-21 14:47:18 -07:00
jasquat ff9d34fe83 updated milestone table query to include logic similar to caching last_milestone on the pi w/ burnettk (#505)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-09-20 13:25:42 -04:00
jbirddog 804555bc4d File based generic json data store (#490) 2023-09-18 15:55:24 -04:00
Dan Funk 691611c695 Bug/various bugs (#494)
* Don't bug out in older instances that don't have runtime_info

* Add zoom buttons to React Diagram Editor

* This removes some potential features for on-boarding, that we are not currently using, but fixes the issue with 100's of onboarding processes piling up and sitting around.  Hoepfully we can wrap this into the extensions mechanism so everything works the same way eventually.

* Improved error messages on form builder
Don't try to auto-save the file before it is fully loaded.
Example data was not getting saved on update.

* Found several errors with new zooming buttons in DMN, so cleaning that up.

Recent changes prevented creating a new dmn table.

* Errors were not being displyed for the Editor Routes

* Going to disable handling user tasks in the onboarding controller for now.
2023-09-18 11:22:29 -04:00
jasquat f6d3bc8e73 Feature/api keys (#489)
* some initial work to support user api keys w/ burnettk

* some updates to store and use service accounts - migrations do not work in sqlite atm

* pyl

* minor tweak to the migration

* refactored user route

* this is working if returning user that created the service account

* put back migrations from main w/ burnettk

* tests pass with new migration w/ burnettk

* do not remove service account permissions on refresh_permissions w/ burnettk

* added new component to make some api calls to populate child components and routes w/ burnettk

* allow displaying extensions in configuration tab w/ burnettk

* removed service accounts controller in favor of extension and encrypt the api keys

* add fuzz to username to make deleting and recreating service accounts easier

* allow specifying the process id to use when running an extension w/ burnettk

* allow extensions to navigate to each other on form submit w/ burnettk

* removed commented out debug code

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-09-15 10:10:57 -04:00
jasquat a72ed7ffb5 disable element units by default and added test that was failing due to it w/ burnettk (#480)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-09-08 13:47:31 -07:00
jasquat 912886f3e6 Improvement/task and spec relations (#477)
* updated to use new spiff branch and fixed broken tests w/ burnettk essweine

* updated spiffworkflow with new main build w/ burnettk essweine

* work around dictionary changed size during iteration error in parallel tests

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-09-08 12:54:43 -04:00
burnettk 4e47eadfea add SPIFFWORKFLOW_BACKEND_OPEN_ID_IS_AUTHORITY_FOR_USER_GROUPS and default to false 2023-09-08 12:54:32 -04:00
Dan Funk 948c633b2c Feature/better form nav (#474)
* Detect focus loss/return in the Diagram Editor - so that we can reload the process model and assure that we know about any changed files.

Allow for looking specifically for json SCHEMA files (those files that are named -schema.json or .schema.json (as is the convention).  Only show these in the dropdown for the form.

* * Run descriptions through the markdown processor so you can use bold/italic etc... in your description fields within a form.
* Move ExampleTable into it's own view component to keep the size of the form builder sane.
* Assure markdown within jrsf forms have reasonable styling that follows the containers style, rather than setting to some other default.
* Add a couple of example forms so people can get a sense of what is possible.
* Connect up the new Json Schema Editor Component to the process model edit diagram.
* Just select the schema file - not the ui file when selecting the form for a component - we may revert this to just a text box.
*

* Cleanup the formatting of arrays, so that they are sligtly intended, do not contain an awkward unneeded heading, and have some tighter css.

* Connect the form editing in the modal back to the BPMN-JS editor

Auto-Save edits in the Form Builder

Lots and lots of tweaks to the react form builder ui

* various fixes.

* test for prepare_schema

* minor fix for run_pyl

* css cleanup
less issues with reloading and jumping about when in the editor
Don't sort keys when returning the json.
More intelligent "ready"

* bump package to point to branch of bpmn-js-spiffworkflow so others can check it out.

* Assure that json keys are not sorted during serialization by default.
Allow adding example fields to an existing schema

Create a set of examples.

* db complaints in migration change.

* removed items from interface file that had been moved elsewhere w/ burnettk

* rename prepare_form to prepare-form

* rename prepare_form to prepare-form

* Remove commented out code.

* typo

* add a comment about the empty column

* move back to the main branch

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-09-08 11:07:43 -04:00
jasquat c056b89006 Feature/group mapping from keycloak (#457)
* some basics to set a user groups based on info in keycloak w/ burnettk

* test for adding groups from token now passes

* do not remove users from groups when running refresh_permissions if specified

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-09-07 11:17:40 -04:00
jasquat 9ea90a94bf updated the support user permissions to disallow authentications as well and updated webui to nav to auth page if auth is available but secrets are not w/ burnettk (#454)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-09-07 10:33:56 -04:00
jbirddog 9925105a5e Support lazy loading call activities with human tasks (#450)
* Switch to local wheel

* Fix to load the call activity by spec

* Added log

* Logging

* WIP - getting the right tasks it seems from the db, need to get into the workflow

* Clean up, revert things

* Working thanks dan

* Getting bin_pyl to pass

* run_pyl.

* Re-poet install

* Revert file

* Remove logging lines

* Getting bin_pyl to pass

* Clean up, revert things

* Bump wheel

* Use version off pypi

---------

Co-authored-by: danfunk <daniel.h.funk@gmail.com>
2023-09-07 10:33:38 -04:00
jasquat ffe2a18ce9 Feature/guest form submission (#447)
* WIP: some initial code to allow anonymous users get a task w/ burnettk

* added scripts to get the url for a given human task w/ burnettk

* users can complete a task anonymously

* pyl

* fixed up login flow and added submission confirmation message for guest tasks w/ burnettk

* added only_guest_task_completion to guest token so we can remove items from the ui with it

* renamed anonymous to guest

* force logout guest users when verifying the token if certain criteria are met and do not do it random controller methods

* also allow saving draft data to use guest users w/ burnettk

* updated bpmn-js-spiffworkflow and added test to test allow guest

* pyl

* fix typo and remove bad file

* remove allow_guest column and moved allow guest check to TaskModel

* removed unnecessary comment

* missing import

* do not allow guest users to see completed tasks and remove save and close button for guest users w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-09-07 10:33:02 -04:00
Dan Funk 80ad92a0c3 Threads (#439)
* WIP - threading with dan

* WIP - cleanup with dan

* Fixing a minor bug and adding a comment and taking the win, even though it was all actually done by @jbirddog with help from @essweine

* adding a couple of simple tests

* * Threaded execution of multiple ready engine tasks is now the default behavior for all execution strategies by default (the skip-one strategry does not do it)
* Assure that tasks in the db match those in the spiffworkflow bpmn on save (remove all predicted and pruned tasks)

with @jbirddog, @jlantz, @burnettk

* run_pyl

---------

Co-authored-by: Jon Herron <jon.herron@yahoo.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-09-07 10:12:56 -04:00
jasquat 9bb9ce47f8 Feature/business end states (#333)
* WIP: some updates to support new spiff w/ burnettk

* unit tests are passing

* all tests except message tests are passing

* fixed usage of catch message event w/ burnettk

* messages are working again w/ burnettk

* uncommented remaining message tests w/ burnettk

* fixed cypress tests w/ burnettk

* use main for spiffworkflow

* translated mysql last milestone query to sqlalchemy w/ burnettk

* fixed last milestone query so instances still return if no milestone found and moved some code from the main report method to own methods

* added some comments

* added last milestone column to process instances table

* display last milestone in instance list table w/ burnettk

* remove 3 characters when truncating last milestone for ellipsis

* make sure we have a current processor so we don't return null

* remove sleep

* The background processor now only picks up processes that were last updated more than a minute ago to avoid conflicting with the interstitial page.  With the understanding that we can rmeove this limitation when we can refactor to allow the backend processes to provide updates on what they are doing.

* pyl w/ burnettk

* cache last milestone on instances

* pyl

* added test for last milestone and added it to the proces instance show page w/ burnettk

* fixed broken test w/ burnettk

* fixed last milestone header

* removed duplicated column

* fixed broken test

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
Co-authored-by: danfunk <daniel.h.funk@gmail.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-09-07 10:10:44 -04:00
jasquat d58391e21d added permissions for authentication endpoints 2023-08-24 08:37:01 -04:00
jasquat de67f1ba72 update SpiffWorkflow to remove Root task specs and removed Root specific code from backend w/ burnettk (#444)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-08-22 08:55:09 +05:30
jasquat 29620cb17f Feature/add support permissions (#445)
* added support perm macro which removes secrets perms w/ burnettk

* support perm macro inherits from basic now and updated docs on permissions to be more accurate w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-08-22 08:53:26 +05:30
jasquat dbabdf170b fixed is_empty metadata filter and added test to ensure they all work w/ burnettk (#437)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-08-21 22:00:01 +05:30
jasquat 17309fb7fd Feature/allow markdown in extension results (#435)
* allow markdown in extensions results w/ burnettk

* fixed tests

* moved our rjsf form to component so extensions can also use it w/ burnettk

* added ability to create extensions that can download files w/ burnettk

* added test for extensions-get-data endpoint w/ burnettk

* make user optional when getting process instance reports

* added extensions-get-data to elevated perm macro and raise an error if user is not specified when needed when running a report

* fixed typeguard test

* push extensions branch

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-08-21 21:59:25 +05:30
jasquat 8ba5616ea8 Feature/restrict call activity processes (#426)
* ensure users have access to run a process model in order to use it as a call activity w/ burnettk

* bad some cache dir w/ burnettk

* pyl

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-08-21 21:57:29 +05:30
Dan Funk a0202c6a5b Feature/onboarding ephemeral (#442)
* The onboarding controller should not save the process model to the database.  It creates a pile of pointless noise.  So just cleaning that up.

* run_pyl

* assure we can handle user tasks if they happen during on-boarding, while keeping the list of processes clean.
Lots of weird stuff getting run_pyl going.

* pyl

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-08-16 12:11:38 -04:00
Kevin Burnett 9313a9f73a Feature/event payloads part 2 (#401)
* Revert "Revert "Feature/event payloads (#393)""

This reverts commit 95fafb7af1.

* Revert "Revert "poet not available in container""

This reverts commit 140220498c.

* Revert "Revert "Run event payloads data migration from background processor (#399)""

This reverts commit 2afced3a51.

* Revert "Revert "using new spiff api to get info about events. w/ elizabeth""

This reverts commit af857fee22.

* Revert "Revert "fix tests for waiting_event_can_be_skipped""

This reverts commit 886e6bd42a.

* push image for preview env

* default scripts to localhost w/ burnettk

* use the bugfix/update-split-task-inputs spiffworkflow branch w/ burnettk

* removed debug json files

* use main for spiffworkflow

* do not attempt to highlight non-diagram boundary items w/ burnettk

* updated SpiffWorkflow to fix multiple signal event issue w/ burnettk

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-08-10 18:24:49 +05:30
jasquat 48893cae13 fixed linting issues w/ burnettk 2023-08-03 15:38:02 -04:00
Dan Funk b446aad184 Minor tweaks t othe onboarding page. (#430)
* * Display the instructions_for_user directly on the home page (no redirects to alternate pages)
* Moved the onboarding view above the tabs on the home page.
* Added a "times_executed_by_user" script - not sure if we should keep it, but maybe handy.
* Assure that the display_name for the user is returned consistently (it was not being returned by the get_current_user function).

With @jbirddog

* remove pointless comment.
2023-08-03 15:08:25 -04:00