Commit Graph

28 Commits

Author SHA1 Message Date
mike cullerton 1671caacec Use the new JinjaService 2021-10-21 10:30:42 -04:00
mike cullerton 8fd55565a4 Move changes to another branch 2021-10-20 13:11:06 -04:00
mike cullerton 1c02928d04 Merge branch 'dev' into jinja-include-403 2021-10-19 10:09:18 -04:00
mike cullerton 0122029e30 *** WIP ***
Migrating the complete_template script stuff to JinjaService.
Having trouble with the tools stuff.
Pulled back to spot where test pass using CompleteTemplate
2021-10-18 16:56:03 -04:00
mike cullerton 983c4104e1 We run the same basic Jinja code in 4 different contexts.
Now call the the Jinja service
2021-10-16 14:20:48 -04:00
mike cullerton 771019d9ca Clarify call to email service. We now use the words content and content_html 2021-10-13 12:05:08 -04:00
Dan 84680ea846 Fixing multiple issues that came out of Study Info, as we debugged issue #474 related to navigating back to a previous task.
There was a problem with the python script engine as well that wasn't handling the de-serialize properly and didn't correctly pick back up on the script engine, and the renaming of methods in PythonScriptEngine created some conflicts with the way we override functions.
We were not handling ldap looks up efficiently, and this was also breaking in Study Info.

Finally we had a bug in SpiffWorkflow that did not allow us to reset back to the previous task in some cases where nested call activities happen far later in the process and are currently active when the reset is created.
2021-10-06 12:17:57 -04:00
mike cullerton d7b7f39128 Added a field `handle` that displays the filename, which is what configurators actually call in a script task. 2021-09-22 12:10:43 -04:00
Dan 92ca506c8e Calls to eval no longer return the data, rather it will accept and return a key, allowing the front end to cache similar queries and not re-execute them. 2021-06-22 17:23:18 -04:00
Dan acae6030f5 The API for evaluating python expressions should not raise an error, it can simply return a result of false, and provide an error to explain the problem. In this way the front end doesn't error out when it's running the script tasks but doesn't have enough information to get a valid response back.
The validation should take into account that repeating sections must be evaluated in the context of the data within the repeating section, not outside of it.
2021-06-15 16:17:15 -04:00
Dan 7282419174 modified the tools api to return the expression and data with the result, making it easier to cash results on the front end, This should help drastically reduce the calls to the python_eval from the front end.
The post processors for form submissions needs to take repeating sections into account, or it won't find the files it is looking for.
2021-06-11 08:27:50 -04:00
mike cullerton ef26238127 added CustomBPMNScriptEngine back in 2021-03-11 14:33:35 -05:00
Mike Cullerton e7c78c8d0e
Merge branch 'dev' into study-associated-email-207-223 2021-03-11 12:38:47 -05:00
mike cullerton 80f1fc276f Modify api.tools.send_email to accommodate the changes to the api endpoint in api.yml
We now accept subject, address, body (the email message), and possible data.
We now use email_service to send the message, and wrap it with the CR Connect html formatting.

**** We import DEFAULT_SENDER from config.default. Will this be a problem on testing and production? ****
2021-03-11 11:19:02 -05:00
Dan 291216e081 Fixing a bug that prevented proper evaluation of a enum field where the default value was null or empty. 2021-03-08 14:00:03 -05:00
Aaron Louie 182e375fdc Adds a test for string manipulation 2020-08-21 13:46:10 -04:00
Dan Funk 66e49a347a Minor tweaks to the eval endpoint, which should take both the expression and the data as one data structure. 2020-08-20 16:13:48 -04:00
Dan Funk acb43cc271 Removing an unused function and addign a fix me. 2020-07-22 11:40:49 -04:00
Dan Funk a243c14d75 Updating to lastest spiffworkflow which uses box to support dot notation.
Adding a new endpoint for evaluating the results of a python expression into the tools section of the api.
2020-07-22 11:30:16 -04:00
Dan Funk d01b30debc Building the start of an endpoint that could be used by logged in / authenticated users that will evaluate basic python functions sent in via the API.
The hope here is that we can process these in real time for the front end, but still do it using the same evaluation engine we use everywhere else, so
the syntax for things like hide-expressions can be properly verified during workflow validation and will be assured to work during front end rendering.
Removing any all javascript code in the BPMN models.
2020-07-21 13:57:33 -04:00
Carlos Lopez 665faaa175 Send emails from service 2020-06-25 16:18:42 -06:00
Carlos Lopez e6d74aaa1a Removing extra index when parsing users info 2020-06-18 12:53:50 -06:00
Dan Funk 8cf420b781 Default mail user name and password to blank. 2020-06-08 14:15:56 -04:00
Dan Funk e102214809 minor cleanup of error codes. 2020-06-03 15:03:22 -04:00
Dan Funk 1017bb1897 On the tools/render_docx api, allow sending the json data in the body, rather than as a ludicrous long get parameter. Silly Dan. 2020-05-22 15:30:22 -04:00
Dan Funk 94f828dfd6 Adding a simple endpoint that describes what scripts are currently available, along with a brief description. 2020-03-03 15:30:42 -05:00
Dan Funk 7194d7d374 Standardizing the script tasks that can be executed on the server, adding tons of error messages for when things go wrong. All scripts must exist in side of the crc/scripts directory.
Adding a new script that script tasks can use to add in data about the study.

Moving all the test workflow specifications out of the main load.

fixing a pile of tests so they can find workflow specs that are now moved into the test directory.
2020-03-03 13:52:45 -05:00
Dan Funk 5e3fdaaa94 New set of "Tools" api endpoints, that provides a way to quickly render markdown or word documents by uploading json data and a template to populate.
Improved Error messages / Error processing.  You can now just throw an APIError anywhere, and it will be properly serialized and returned.
2020-02-29 17:22:38 -05:00