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
Hashes for openimis-be-workflow-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24352e168d98521ee0b9cf45163de664a33f6c55ead203f8733228d7618cc0e6 |
|
MD5 | 8de984589006b5514ec9cc6767ba61bc |
|
BLAKE2b-256 | 52d76f4804b7a84e152b632920b364d76a05f67fbdb75e3a27ee2339f7282bff |
Hashes for openimis_be_workflow-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a0540d306d54d50ece01a6837a12f746101b14f828436e5a7b2f5c4ff045b92 |
|
MD5 | 407be7b0d25b2ba7ae36540a84912e9e |
|
BLAKE2b-256 | c33ad4a3d7d769d8f1d7fbd31baea8baf1b3e0dbbe4f93ebfa2abec8f41344e1 |