The openIMIS Backend workflow reference module.
Project description
openIMIS Backend workflow reference module
This repository holds the files of the openIMIS Backend Workflow reference module. It is dedicated to be deployed as a module of openimis-be_py.
Services
- Workflow service
- register
- get systems/groups/workflows
Registering workflow systems
Workflow service can be extended with custom adaptors to integrate with new workflow systems. Any adaptor have to
extend workflow.systems.base.WorkflowAdaptor
and return triggers as implementations of
workflow.systems.base.WorkflowHandler
.
WorkflowService.register_system_adaptor(CustomWorkflowAdaptor)
Querying workflows
Querying available workflows can be done using WorkflowService.get_workflows
service. All registered workflow systems
have to implement filtering workflows by group and name.
workflows_result = WorkflowService.get_workflows(group='default', name='example')
if workflows_result['success']:
workflow_handlers = workflows_result['data']['workflows']
Executing workflows
Workflow handlers are self contained triggers for a specific workflow in a given system. the WorkflowHandler.run
method allows perform a workflow run with a given payload.
payload = { ... }
result = handler.run(payload)
Depending on the system, workflow runs can be synchronous and will return result of the workflow, or asynchronous and will return necessary info to check workflow status in a given workflow system.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openimis_be_workflow-1.0.1.tar.gz
.
File metadata
- Download URL: openimis_be_workflow-1.0.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3ef854fe0e3a2edab31a21964f79f87570acf6a389e34bc271b1099ae7458c1 |
|
MD5 | a8fc9898676efdf4ebf2ffd6854bdddc |
|
BLAKE2b-256 | 67608c3515dde9519952d13dd10a060d0e3d83e6bc82eabd6f1da1106c2e7eae |
File details
Details for the file openimis_be_workflow-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: openimis_be_workflow-1.0.1-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49ac9fb3102d3f12d028548b50a26bbb105c3265d61d72b49a797f8c1fe16bc6 |
|
MD5 | 99b80a37a941b84792431dfb2886cdf2 |
|
BLAKE2b-256 | 8f1132ceb49171f7753ff5e8289014db8e63a1f7e274f2131c0c38ba13dd1089 |