Author: |
Diogo Duarte |
License: |
no license |
Branch: |
master |
Repository: |
odoogap/work |
Dependencies: |
project |
Languages: |
Markdown (49, 4.8%),
Python (579, 57.2%),
and
XML (384, 37.9%) |
Other branches: |
10.0,
and
joao |
<h1>Odoo Workflow Orchestration Engine</h1>
<p>Workflow Orchestration Engine is a centralized orchestration server for
running tasks from several different task runner client components.</p>
<h2>Components</h2>
<p><strong>Tasks:</strong> Definition of a job that needs to be accomplished and managed
<strong>Workflow:</strong> Set of tasks and rules that implement a certain chain of execution
<strong>Workflow Orchestration Server:</strong> Centralized management of all workflow
definition as well as all workflow execution.
<strong>Task Runner Client:</strong> Component responsible for the asynchronous execution
of the tasks defined in one or several orchestration engines.</p>
<p><code>text
Orchestration Orchestration
Server(OCS) Server(OCS)
+ + + +
| | | |
| | | |
Task | | Task | | Task
Runner 1 <------+ +-> Runner 2 <------+ +--> Runner 3
</code></p>
<p>It's always the responsibility of the Task Runner to communicate with the
Orchestration server(OCS). OCS will implement processes to monitor the workitems
but it will avoid to interfere with the execution of the Tasks.</p>
<h2>Install</h2>
<p><code>bash
./odoo/odoo-bin shell -d database -i
</code></p>
<h3>Requirements</h3>
<ul>
<li>Python 2.7</li>
<li>Odoo - 10.0</li>
</ul>
<h2>Running a Workflow</h2>
<p>Create a test file:</p>
<p>test-1.py:</p>
<p>```python</p>
<h1>!/bin/python</h1>
<h1>Workflow has a start parametes json</h1>
<p>values = """
{
"project<em>id": 189,
"name": "This is a test task",
"uid": 1
}
"""
env['work.workflow'].search([('id', '=', 1)]).run</em>workflow(values, debug=True)</p>
<p>env.cr.commit()
```</p>
<p>Use the test file to start the workflow:</p>
<p><code>bash
$> ./odoo/odoo-bin shell -d database < test-1.py
</code></p>