Search 1.9 billion lines of Odoo code on GitHub

work

Author: Diogo Duarte
License: no license
Branch: joao
Repository: odoogap/work
Dependencies: project
Languages: Markdown (49, 4.8%), Python (581, 57.3%), and XML (384, 37.9%)
Other branches: 10.0, and master

<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 &lt;------+ +-&gt; Runner 2 &lt;------+ +--&gt; Runner 3 </code></p> <p>It&#39;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 = &quot;&quot;&quot; { &quot;project<em>id&quot;: 189, &quot;name&quot;: &quot;This is a test task&quot;, &quot;uid&quot;: 1 } &quot;&quot;&quot; env[&#39;work.workflow&#39;].search([(&#39;id&#39;, &#39;=&#39;, 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 $&gt; ./odoo/odoo-bin shell -d database &lt; test-1.py </code></p>