All Projects → faxad → Activflow

faxad / Activflow

Licence: other
Generic, light-weight & extensible Workflow Engine for agile automation of Business Processes | Django, Python

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Activflow

Viewflow
Reusable workflow library for Django
Stars: ✭ 2,136 (+318.82%)
Mutual labels:  django, workflow
Kogito Examples
Kogito examples - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
Stars: ✭ 96 (-81.18%)
Mutual labels:  bpm, workflow
Workflower
A BPMN 2.0 workflow engine for PHP
Stars: ✭ 540 (+5.88%)
Mutual labels:  bpm, workflow
River Admin
🚀 A shiny admin interface for django-river built with DRF, Vue & Vuetify
Stars: ✭ 55 (-89.22%)
Mutual labels:  django, workflow
Kogito Runtimes
Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
Stars: ✭ 188 (-63.14%)
Mutual labels:  bpm, workflow
Django Lb Workflow
Reusable workflow library for Django
Stars: ✭ 153 (-70%)
Mutual labels:  django, workflow
Jbpm
a Business Process Management (BPM) Suite
Stars: ✭ 1,226 (+140.39%)
Mutual labels:  bpm, workflow
Loonflow
基于django的工作流引擎,工单(a workflow engine base on django python)
Stars: ✭ 1,153 (+126.08%)
Mutual labels:  django, workflow
Camunda Bpm Platform
Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Spring, Spring Boot, CDI.
Stars: ✭ 2,390 (+368.63%)
Mutual labels:  bpm, workflow
Workflowserver
Workflow Server is a ready-to-use Workflow Engine-based application that you can deploy into your infrastructure. It can be integrated with NodeJS, PHP, Ruby, .NET, or Java applications via a REST API. Workflow Server is a key component for managing the lifecycle of business objects within your enterprise.
Stars: ✭ 124 (-75.69%)
Mutual labels:  bpm, workflow
Django River
Django workflow library that supports on the fly changes ⛵
Stars: ✭ 609 (+19.41%)
Mutual labels:  django, workflow
tumbleweed
Lightweight workflow engine microservice implement BPMN 2.0
Stars: ✭ 23 (-95.49%)
Mutual labels:  workflow, bpm
Smartflow Sharp
基于C#语言研发的Smartflow-Sharp工作流组件,该工作流组件的特点是简单易用、方便扩展、支持多种数据库访问、高度可定制化,支持用户按需求做功能的定制开发,节省用户的使用成本
Stars: ✭ 594 (+16.47%)
Mutual labels:  bpm, workflow
Workflow
审批王,华炎魔方内置BPM工作流引擎,低代码快速开发平台。
Stars: ✭ 111 (-78.24%)
Mutual labels:  bpm, workflow
Flor
a workflow engine
Stars: ✭ 190 (-62.75%)
Mutual labels:  bpm, workflow
Rails workflow
Check Wiki for details
Stars: ✭ 295 (-42.16%)
Mutual labels:  bpm, workflow
Create Pull Request
A GitHub action to create a pull request for changes to your repository in the actions workspace
Stars: ✭ 473 (-7.25%)
Mutual labels:  workflow
Dj Rest Auth
Authentication for Django Rest Framework
Stars: ✭ 491 (-3.73%)
Mutual labels:  django
Git Pr Release
Release pull request generator
Stars: ✭ 475 (-6.86%)
Mutual labels:  workflow
Django Ordered Model
Get your Django models in order
Stars: ✭ 476 (-6.67%)
Mutual labels:  django

activflow

Build Status Coverage Status Codacy Badge FOSSA Status

Introduction

ActivFlow is a generic, light-weight and extensible workflow engine for agile development and automation of complex Business Process operations.

Developers can emphasize towards mapping the Business Process model as ActivFlow workflow without having to worry about implementing the core workflow processing logic. The generic implementation of the workflow engine manages the automation of the Business Processes from start to finish in accordance with the defined flow.

What is an ActivFlow workflow?

  • Business Process flow mapped as ActivFlow configuration
  • Definition of data to be captured for each activity (state)
  • Business Roles mapped to workflow activities
  • Rules applied on transitions between activities

alt tag

Technology Stack

  • Python 2.7x, 3.4x, 3.5x, 3.6x
  • Django 1.9x, 1.10x, 1.11x
  • Bootstrap 3.x

Usage & Configuration

Step 1: Workflow App Registration

  • A Business Process must be represented in terms of a Django app
  • All apps must be registered to WORKFLOW_APPS under core/constants
WORKFLOW_APPS = ['leave_request']

Step 2: Activity Configuration

  • Activities (States/Nodes) are represented as Django models
  • Activity must inherit from AbstractInitialActivity/AbstractActivity respectively
  • Custom validation logic must be defined under clean() on the activity model
  • Custom field specific validation should go under app/validator and applied to the field as validators attribute
from activflow.core.models import AbstractActivity, AbstractInitialActivity, AbstractEntity
from activflow.leave_request.validators import validate_initial_cap

class SampleRequest(AbstractInitialActivity):
    """Sample leave request details"""
    employee_name = CharField("Employee", max_length=200, validators=[validate_initial_cap])
    from = DateField("From Date")
    to = DateField("To Date")
    reason = TextField("Purpose of Leave", blank=True)

    def clean(self):
        """Custom validation logic should go here"""
        pass

class Itinerary(AbstractEntity):
    """Itinerary details"""
    request = ForeignKey(RequestInitiation, related_name="itineraries")
    destination = CharField("Destination", max_length=200)
    date = DateField("Visit Date")

    def clean(self):
        """Custom validation logic should go here"""
        pass

class ManagementReview(AbstractActivity):
    """Management review/approval"""
    approval_status = CharField(verbose_name="Status", max_length=3, choices=(
        ('APP', 'Approved'), ('REJ', 'Rejected')))
    remarks = TextField("Remarks")

    def clean(self):
        """Custom validation logic should go here"""
        pass

Step 3: Flow Definition

  • A flow is represented by collection of Activities (States/Nodes) connected using Transitions (Edges)
  • Rules are applied on transitions to allow routing between activities, provided, the condition satisfies
  • Business Process flow must be defined as FLOW under app/flow
  • As a default behavior, the Role maps OTO with django Group (developers, feel free to customize)
from activflow.leave_request.models import SampleRequest, ManagementReview
from activflow.leave_request.rules import validate_request

FLOW = {
    'sample_leave_request': {
        'name': 'Sample Request',
        'model': SampleRequest,
        'role': 'Submitter',
        'transitions': {
            'management_review': validate_request,
        }
    },
    'management_review': {
        'name': 'Management's Review',
        'model': ManagementReview,
        'role': 'Approver',
        'transitions': None
    }
}

INITIAL = 'sample_leave_request'

Step 4: Business Rules

  • Transition rules and conditions must be defined under app/rules
def validate_request(self):
    return self.reason == 'Emergency'

Step 5: Configure Field Visibility & Custom Forms (Optional)

  • Include config.py in the workflow app and define ACTIVITY_CONFIG as Nested Ordered Dictionary to have more control over what gets displayed on the UI.
  • Define for each activity model, the visibility of fields, for display on templates and forms
    • create: field will appear on activity create/initiate form
    • update: field will be available for activity update/revise operation
    • display: available for display in activity detail view
from collections import OrderedDict


ACTIVITY_CONFIG = OrderedDict([
    ('Foo', OrderedDict([
        ('Fields', OrderedDict([
            ('subject', ['create', 'update', 'display']),
            ('employee_name', ['create', 'update', 'display']),
            ('from', ['create', 'update', 'display']),
            ('to', ['create', 'update', 'display']),
            ('reason', ['create', 'update', 'display']),
            ('creation_date', ['display']),
            ('last_updated', ['display'])
        ])),
        ('Relations', OrderedDict([
            ('Itinerary', OrderedDict([
                ('destination', ['create', 'update', 'display']),
                ('date', ['create', 'update', 'display'])
            ])),
            ...
        ]))
    ])),
    ...
])

# register fields that need WYSIWYG editor

WYSIWYG_CONFIG = {
    'RequestInitiation': ['reason']
}

# register custom forms

FORM_CONFIG = {
    'RequestInitiation': 'CustomRequestForm'
}

Step 6: Access/Permission Configuration (Optional)

The core logic to restrict access is defined as AccessDeniedMixin under core/mixins which developers can customize depending on the requirements

Demo Instructions

Execute the below command to configure ActivFlow for demo purpose

python demo.py

Alternatively, launch the docker containers by simply running

docker-compose up

Submitter: john.doe/12345, Reviewer: jane.smith/12345

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].