Skip to content

Commit

Permalink
RC 3.1.0 Changes (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhilash-aot authored Dec 17, 2020
1 parent e536c85 commit ee18457
Show file tree
Hide file tree
Showing 163 changed files with 12,007 additions and 9,786 deletions.
35 changes: 29 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
# Changelog for formsflow.ai
Mark items as `Added`, `Changed`, `Fixed`, `Removed`
Mark items as `Added`, `Changed`, `Fixed`, `Removed`, `Untested Features`, `Upcoming Features`

## Future Release
* Render the form workflow association in readonly and give option to edit
* Show task navigation in workflow diagram
* Support to access formsflow.ai solution in mobile
## 3.1.0 - 2020-12-17
`Modified`
* Formio upgraded to latest version-2.0.0.rc34 (Component : forms-flow-forms)
* In application & task dashboard, the process diagram navigation is highlighted on the diagram (Component : forms-flow-web)
* Made cosmetic changes to menu icons (Component: forms-flow-web)
* Update on swagger documentation (Component: forms-flow-api)
* For the designer's edit scenario, by default the workflow selection & association is rendered as read-only with an option to toggle and edit(Component: forms-flow-web)

## 3.0.0 - 2020-10-10
`Untested Features`
* Support to associate an unique form at every manual task in workflow process (Component: forms-flow-bpm)

`Fixed`
* Support to access forms-flow-ai solution in mobile(Component: forms-flow-web)
* Forms flow Edit/submission Routing Fix for User with Multiple Role (Component: forms-flow-web)

`Upcoming Features`
* Refactoring python api to use module *flask-resk-jsonapi* (Component: forms-flow-api)
* Enhanced sorting, searching and pagination (Component: forms-flow-web)

`Known Issues`
* Custom component (Text Area with analytics) not retaining the value after submission
* Cosmetic changes to show success message after loading is completed

## 3.0.1 - 2020-10-08
`Modified`
* In application dashboard, the "Application Status" column search component has been enhanced to show all possible values in dropdown (Component : forms-flow-web)
* In application dashboard, the button label has been modified to show as "Acknowledge" for status "Awaiting Acknowledgement" (Component : forms-flow-web)

## 3.0.0 - 2020-10-07
`Added`
* Logo & UI Styling
* Introduced Applications menu
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p align="center"><img src=".images/logo.png"/><br/><img src="https://img.shields.io/badge/release-v3.0.0-blue"/></p>
<p align="center"><img src=".images/logo.png"/><br/><img src="https://img.shields.io/badge/release-v3.1.0-blue"/></p>
<hr/>

**formsflow.ai** is an open source solution framework developed and maintained by [AOT Technologies](https://www.aot-technologies.com/). The framework combines selected open source Forms, Workflow, Analytics, and Security products with custom-built integration code to provide a seamless solution that provides a viable alternative to expensive, enterprise software products.
Expand Down
5 changes: 5 additions & 0 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ Docker
#### Full Deployment
Follow the instructions on [docker installation guide](./docker)

Openshift
------------------
#### Full Deployment
Follow the instructions on [openshift installation guide](./openshift)

## Verifying the Installation status
* The following applications will be started and can be accessed in your browser.
* http://localhost:7000 - Redash analytics
Expand Down
4 changes: 3 additions & 1 deletion deployment/docker/docker-compose-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ services:
MONGO_INITDB_ROOT_PASSWORD: ${FORMIO_MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${FORMIO_MONGO_DATABASE}
volumes:
- ./../../forms-flow-forms/mongo_entrypoint/001_user.js:/docker-entrypoint-initdb.d/001_user.js:ro
- ./mongodb/data/db/:/data/db/
- ./mongodb/data/log/:/var/log/mongodb/
- ./mongodb/mongod.conf:/etc/mongod.conf
Expand All @@ -76,9 +77,10 @@ services:
- ./:/app:rw
environment:
DEBUG: formio:*
NODE_CONFIG: "{\"mongo\":\"mongodb://${FORMIO_MONGO_USERNAME}:${FORMIO_MONGO_PASSWORD}@forms-flow-forms-db:27017/formio?authSource=admin\"}"
NODE_CONFIG: "{\"mongo\":\"mongodb://${FORMIO_MONGO_USERNAME}:${FORMIO_MONGO_PASSWORD}@forms-flow-forms-db:27017/${FORMIO_MONGO_DATABASE}?authSource=admin\"}"
ROOT_EMAIL: ${FORMIO_ROOT_EMAIL}
ROOT_PASSWORD: ${FORMIO_ROOT_PASSWORD}
FORMIO_DOMAIN: ${FORMIO_DEFAULT_PROJECT_URL}
stdin_open: true # -i
tty: true # -t
networks:
Expand Down
4 changes: 3 additions & 1 deletion deployment/docker/docker-compose-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ services:
MONGO_INITDB_ROOT_PASSWORD: ${FORMIO_MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${FORMIO_MONGO_DATABASE}
volumes:
- ./../../forms-flow-forms/mongo_entrypoint/001_user.js:/docker-entrypoint-initdb.d/001_user.js:ro
- mdb-data:/data/db/
- ./mongodb/data/log/:/var/log/mongodb/
- ./mongodb/mongod.conf:/etc/mongod.conf
Expand All @@ -76,9 +77,10 @@ services:
- ./:/app:rw
environment:
DEBUG: formio:*
NODE_CONFIG: "{\"mongo\":\"mongodb://${FORMIO_MONGO_USERNAME}:${FORMIO_MONGO_PASSWORD}@forms-flow-forms-db:27017/formio?authSource=admin\"}"
NODE_CONFIG: "{\"mongo\":\"mongodb://${FORMIO_MONGO_USERNAME}:${FORMIO_MONGO_PASSWORD}@forms-flow-forms-db:27017/${FORMIO_MONGO_DATABASE}?authSource=admin\"}"
ROOT_EMAIL: ${FORMIO_ROOT_EMAIL}
ROOT_PASSWORD: ${FORMIO_ROOT_PASSWORD}
FORMIO_DOMAIN: ${FORMIO_DEFAULT_PROJECT_URL}
stdin_open: true # -i
tty: true # -t
networks:
Expand Down
6 changes: 4 additions & 2 deletions forms-flow-api/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# formsflow.ai Rest API
# formsflow.ai API

![Python](https://img.shields.io/badge/python-3.8-blue) ![Flask](https://img.shields.io/badge/Flask-1.1.1-blue) ![postgres](https://img.shields.io/badge/postgres-latest-blue)

**formsflow.ai** has built this adaptive tier for correlating form management, BPM and analytics together.

The goal of the REST API is to provide access to all relevant interfaces of
the system. It's build using Python 🐍.
the system. It's build using Python :snake: .

## Table of Content
* [Prerequisites](#prerequisites)
Expand Down Expand Up @@ -99,6 +99,8 @@ Content-Type : application/json
Authorization: Bearer {access token}
```

* Checkout out the API documentation which can be accessed at **/swagger** endpoint.

## Steps for enabling Sentiment Analysis component

One of the unique features of the formsflow.ai framework is Sentiment Analysis. It can
Expand Down
43 changes: 26 additions & 17 deletions forms-flow-api/migrations/env.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig

import logging
from logging.config import fileConfig

from sqlalchemy import engine_from_config
from sqlalchemy import pool

from alembic import context

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
Expand All @@ -18,8 +22,9 @@
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
from flask import current_app
config.set_main_option('sqlalchemy.url',
current_app.config.get('SQLALCHEMY_DATABASE_URI'))
config.set_main_option(
'sqlalchemy.url', current_app.config.get(
'SQLALCHEMY_DATABASE_URI').replace('%', '%%'))
target_metadata = current_app.extensions['migrate'].db.metadata

# other values from the config, defined by the needs of env.py,
Expand All @@ -41,7 +46,9 @@ def run_migrations_offline():
"""
url = config.get_main_option("sqlalchemy.url")
context.configure(url=url)
context.configure(
url=url, target_metadata=target_metadata, literal_binds=True
)

with context.begin_transaction():
context.run_migrations()
Expand All @@ -65,21 +72,23 @@ def process_revision_directives(context, revision, directives):
directives[:] = []
logger.info('No changes in schema detected.')

engine = engine_from_config(config.get_section(config.config_ini_section),
prefix='sqlalchemy.',
poolclass=pool.NullPool)
connectable = engine_from_config(
config.get_section(config.config_ini_section),
prefix='sqlalchemy.',
poolclass=pool.NullPool,
)

connection = engine.connect()
context.configure(connection=connection,
target_metadata=target_metadata,
process_revision_directives=process_revision_directives,
**current_app.extensions['migrate'].configure_args)
with connectable.connect() as connection:
context.configure(
connection=connection,
target_metadata=target_metadata,
process_revision_directives=process_revision_directives,
**current_app.extensions['migrate'].configure_args
)

try:
with context.begin_transaction():
context.run_migrations()
finally:
connection.close()


if context.is_offline_mode():
run_migrations_offline()
Expand Down
76 changes: 48 additions & 28 deletions forms-flow-api/src/api/models/form_process_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,48 @@ class FormProcessMapper(AuditDateTimeMixin, AuditUserMixin, BaseModel, db.Model)
form_id = db.Column(db.String(50), nullable=False)
form_name = db.Column(db.String(100), nullable=False)
form_revision_number = db.Column(db.String(10), nullable=False)
process_key = db.Column(db.String(50), nullable=True)
process_name = db.Column(db.String(100), nullable=True)
process_key = db.Column(db.String(50), nullable=False)
process_name = db.Column(db.String(100), nullable=False)
status = db.Column(db.String(10), nullable=False)
comments = db.Column(db.String(300), nullable=True)
tenant_id = db.Column(db.Integer, nullable=True)

application = db.relationship('Application', backref='form_process_mapper', lazy=True)
application = db.relationship(
"Application", backref="form_process_mapper", lazy=True
)

@classmethod
def create_from_dict(cls, mapper_info: dict) -> FormProcessMapper:
"""Create new mapper between form and process."""
if mapper_info:
mapper = FormProcessMapper()
mapper.form_id = mapper_info['form_id']
mapper.form_name = mapper_info['form_name']
mapper.form_revision_number = mapper_info['form_revision_number']
mapper.process_key = mapper_info['process_key']
mapper.process_name = mapper_info['process_name']
mapper.status = mapper_info['status']
mapper.comments = mapper_info['comments']
mapper.created_by = mapper_info['created_by']
mapper.tenant_id = mapper_info.get('tenant_id')
mapper.form_id = mapper_info["form_id"]
mapper.form_name = mapper_info["form_name"]
mapper.form_revision_number = mapper_info["form_revision_number"]
mapper.process_key = mapper_info.get("process_key")
mapper.process_name = mapper_info.get("process_name")
mapper.status = mapper_info["status"]
mapper.comments = mapper_info.get("comments")
mapper.created_by = mapper_info["created_by"]
mapper.tenant_id = mapper_info.get("tenant_id")
mapper.save()
return mapper
return None

def update(self, mapper_info: dict):
"""Update form process mapper."""
self.update_from_dict(
['form_id', 'form_name', 'form_revision_number',
'process_key', 'process_name', 'comments',
'modified_by'],
mapper_info)
[
"form_id",
"form_name",
"form_revision_number",
"process_key",
"process_name",
"comments",
"modified_by",
],
mapper_info,
)
self.commit()

def mark_inactive(self):
Expand All @@ -60,41 +69,52 @@ def mark_inactive(self):
@classmethod
def find_all(cls, page_number, limit):
"""Fetch all active form process mapper."""
return cls.query.filter(FormProcessMapper.status == FormProcessMapperStatus.Active.value) \
.paginate(page_number, limit, False).items # pylint: disable=no-member
return (
cls.query.filter(
FormProcessMapper.status == FormProcessMapperStatus.Active.value
)
.paginate(page_number, limit, False)
.items
) # pylint: disable=no-member

@classmethod
def find_by_id(cls, form_process_mapper_id) -> FormProcessMapper:
"""Find active form process mapper that matches the provided id."""
return cls.query.filter(
and_(FormProcessMapper.id == form_process_mapper_id,
FormProcessMapper.status == FormProcessMapperStatus.Active.value)).first() # pylint: disable=no-member
and_(
FormProcessMapper.id == form_process_mapper_id,
FormProcessMapper.status == FormProcessMapperStatus.Active.value,
)
).first() # pylint: disable=no-member

@classmethod
def find_by_form_id(cls, form_id) -> FormProcessMapper:
"""Find active form process mapper that matches the provided form_id."""
return cls.query.filter(
and_(FormProcessMapper.form_id == form_id,
FormProcessMapper.status == FormProcessMapperStatus.Active.value)).first() # pylint: disable=no-member
and_(
FormProcessMapper.form_id == form_id,
FormProcessMapper.status == FormProcessMapperStatus.Active.value,
)
).first() # pylint: disable=no-member

@classmethod
def find_by_application_id(cls, application_id: int):
"""Fetch form process mapper details with application id."""
where_condition = ''
where_condition = ""
where_condition += f""" app.id = {str(application_id)} """

result_proxy = db.session.execute(f"""select
result_proxy = db.session.execute(
f"""select
mapper.id,mapper.process_key,mapper.process_name
from application app, form_process_mapper mapper
where app.form_process_mapper_id=mapper.id and
{where_condition}
""")
"""
)

result = []
for row in result_proxy:
info = dict(row)
result.append(info)

return result[0]


return result[0]
5 changes: 2 additions & 3 deletions forms-flow-api/src/api/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ def specs_url(self):
}

API = CustomApi(
title='FORMIO API',
title='formsflow.ai API',
version='1.0',
description='The API for FORMIO',
description='The API for formsflow.ai. Checkout: formsflow.ai to know more',
security=['apikey'],
authorizations=AUTHORIZATIONS, doc='/swagger/')


@API.errorhandler(BusinessException)
def handle_business_exception(error: BusinessException):
"""Handle Business exception."""
Expand Down
Loading

0 comments on commit ee18457

Please sign in to comment.