ECMind blue client: Workflow
Helper modules for the ecmind_blue_client to ease the work with workflows, models and organisations. See discussion here: https://hub.ecmind.ch/t/119
Installation
pip install ecmind_blue_client_workflow
Usage
from ecmind_blue_client.tcp_client import TcpClient as Client
from ecmind_blue_client_workflow import workflow
client = Client(hostname='localhost', port=4000, appname='test', username='root', password='optimal')
print(workflow.get_organisations(client, only_active=True))
Monitoring
Check for failed workflows
Check all active workflow models for suspended processes.
from ecmind_blue_client.tcp_client import TcpClient as Client
from ecmind_blue_client_workflow import workflow
client = Client(hostname='localhost', port=4000, appname='test', username='root', password='optimal')
orgs = workflow.get_organisations(client, only_active=True)
for org_id in orgs:
workflows = workflow.admin_get_workflow_list(client, org_id)
for workflow_id in workflows:
processes = workflow.admin_get_process_list(client, org_id, workflow_id=workflow_id)
for process_id in processes:
process = processes[process_id]
if process['state'] == workflow.State.SUSPENDED or process['state'] == workflow.State.SYSSUSPENDED:
print(f'Process with id {process_id} and name {process["name"]} is suspended')
Running processes statistics
List all aktive workflow models with the count of running processes.
from ecmind_blue_client.tcp_client import TcpClient as Client
from ecmind_blue_client_workflow import workflow
client = Client(hostname='localhost', port=4000, appname='test', username='root', password='optimal')
orgs = workflow.get_organisations(client, only_active=True)
for org_id in orgs:
workflows = workflow.admin_get_workflow_list(client, org_id)
for workflow_id in workflows:
wf = workflows[workflow_id]
print(f'Workflow {wf["name"]} has {wf["process_count"]} running processes')
Metadata
Release files for ecmind-blue-client-workflow 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ecmind_blue_client_workflow-0.0.3.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ecmind_blue_client_workflow-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / ecmind_blue_client_workflow-0.0.3.tar.gz
| Download URL | ecmind_blue_client_workflow-0.0.3.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea6350188fd88d0e099e7fbe4cdcb574e89275c28abdd9d2f34d8600f469d522
|
|
BLAKE2b-256 checksum How to use checksums |
f429b51b125a7d5be07d06075335f32916ab05c4d87b3aeb3b602ba2f8845bfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / ecmind_blue_client_workflow-0.0.3-py3-none-any.whl
| Download URL | ecmind_blue_client_workflow-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e1a447e833aa9b5de0eb5b85c0fd205e4d086d51f965b2de7885acbf3bddf80
|
|
BLAKE2b-256 checksum How to use checksums |
bc24b4c131d5d6c17df8c9dcaf099a2af7fe4da01cd40c76529f3f243a9f14d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|