Go to file
Dan Funk f205fffc3c Allow migration even when data exists. 2020-03-23 13:03:31 -04:00
config Edits frontend callback URL 2020-02-20 21:10:34 -05:00
crc Fixing a bug where the workflow specification can not be deleted. 2020-03-23 12:48:31 -04:00
docs Cleanup. 2020-01-09 10:09:59 -05:00
migrations Allow migration even when data exists. 2020-03-23 13:03:31 -04:00
postgres Gets docker-compose working. 2020-02-04 21:42:09 -05:00
readme_images Updates to the README and removing a problematic dependency 2019-11-20 17:00:02 -05:00
schema Adds basic Flask, Connexion, and SpiffWorkflow structure 2019-11-19 15:57:46 -05:00
tests Merge remote-tracking branch 'origin/master' into feature/reference_files 2020-03-20 11:07:55 -04:00
.gitignore Generates coverage data 2020-02-12 11:31:02 -05:00
.sonarcloud.properties Generates coverage.xml report 2020-02-12 11:04:04 -05:00
.travis.yml Generates coverage data 2020-02-12 11:31:02 -05:00
Dockerfile Trivial change to force travis docker push 2020-02-06 11:18:23 -05:00
LICENSE.md Adds basic Flask, Connexion, and SpiffWorkflow structure 2019-11-19 15:57:46 -05:00
Pipfile Found a few errors in the sqlalchemy file definition that was causing failures, and had some consistency problems with the IRB Categories file name. The API was bailing out because we had restricted file types to bpmn,svg,or dmn in the connexion config file, I don't restrict this anymore we have plenty of checks elsewhere. Adding xlrd as a dependency - this didn't fail till a push to production. 2020-03-20 08:21:21 -04:00
Pipfile.lock Found a few errors in the sqlalchemy file definition that was causing failures, and had some consistency problems with the IRB Categories file name. The API was bailing out because we had restricted file types to bpmn,svg,or dmn in the connexion config file, I don't restrict this anymore we have plenty of checks elsewhere. Adding xlrd as a dependency - this didn't fail till a push to production. 2020-03-20 08:21:21 -04:00
README.md Updates in travis to do a push to docker hub, so our code can be deployed to various environments. 2020-02-05 15:53:52 -05:00
docker_push.sh Avoids failing build if pushed version matches current version 2020-02-28 11:46:30 -05:00
docker_run.sh Adds command line option to reset database 2020-02-06 21:08:49 -05:00
example_data.py Assure that reference file exists on data-reload. 2020-03-20 07:41:21 -04:00
fact_runner.py Creating a dependency on the SpiffWorkflow fork we created. and placing the command line script into this code base and demonstrating that our workflow processor works at least on that level. Removing all kinds of garbage that had piled up before to keep this thing clean. 2019-12-11 11:45:44 -05:00
run.py Merge pull request #1 from sartography/fred/dockerize 2019-12-20 14:37:14 -05:00
sonar-project.properties Adds sonar properties 2020-02-08 14:00:37 -05:00
wait-for-it.sh Scripts should be executable. 2020-02-06 09:02:02 -05:00

README.md

CrConnectFrontend

Build Status

CR Connect Workflow Microservice

Development Setup

Tools

These instructions assume you're using these development and tools:

  • IDE: PyCharm Professional Edition
  • Operating System: Ubuntu

Environment Setup

Make sure all of the following are properly installed on your system:

  1. python3 & pip3:
  2. pipenv:

Project Initialization

  1. Clone this repository.

  2. In PyCharm:

    • Go to File > New Project...
    • Click Pure Python (NOT Flask!!)
    • Click the folder icon in the Location field.
    • Select the directory where you cloned this repository and click Ok.
    • Expand the Project Interpreter section.
    • Select the New environment using radio button and choose Pipenv in the dropdown.
    • Under Base interpreter, select Python 3.6
    • In the Pipenv executable field, enter /home/your_username_goes_here/.local/bin/pipenv
    • Click Create Project Interpreter
  3. PyCharm should automatically install the necessary packages via pipenv. For me, the project interpreter did not set set up for me correctly on first attempt. I had to go to File -> Settings -> Project Interpreter and again set the project to use the correct PipEnv environment. Be sure that your settings like simliar to this, or attempt to add the interpreter again by clicking on the gear icon. Project Interpreter Settings screen

  4. With this properly setup for the project, you can now right click on the run.py and set up a new run configuration and set up a run configuration that looks like the following (be sure to save this run configuration so it doesn't go away.) : Run Configuration Screenshot

Running the Web API

Just click the "Play" button next to RUN in the top right corner of the screen. The Swagger based view of the API will be avialable at http://0.0.0.0:5000/v1.0/ui/

Testing from the Shell

This app includes a command line interface that will read in BPMN files and let you play with it at the command line. To run it right click on app/command_line/joke.py and click run. Type "?" to get a list of commands. So far the joke system will work a little, when you file it up try these commands in this order:

> engine  (this will run all tasks up to first user task and should print a joke)
> answer clock (this is the correct answer)
> next (this completes the user task)
> engine (this runs the rest of the tasks, and should tell you that  you got the question right)

You can try re-running this and getting the question wrong. You might open up the Joke bpmn diagram so you can see what this looks like to draw out.

Documentation

Additional Documentation is available on ReadTheDocs

Additional Reading

  1. BPMN Is the tool we are using to create diagrams of our business processes. It's is a beautiful concise diagramming tool. We strongly recommend you read this complete tutorial, as this notation is the foundation on which this project as well as many other software systems for businesses are built. Know it well.

Notes on Creating Good BPMN Diagrams in Comunda

  1. Be sure to give each task a thoughtful (but unique!) id. This will make the command line and debugging far far easier. I've tended to pre-fix these, so task_ask_riddle if a task is asking a riddle for instance.