Skip to content

Commit

Permalink
Docs: fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenabell committed Dec 14, 2016
2 parents e17a56f + efe8990 commit a5ade9f
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 14 deletions.
55 changes: 52 additions & 3 deletions docs/source/2pc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,64 @@

.. _tender-2pc:

Creating tender with 2 Phase Commit
Mechanism of the 2-phase commit
--------------------------------

The 2-phase commit provides a mechanism for CDB to publish only the tenders that clients are able to control and duplicates of which they have rights to cancel.

The reason for duplicated tenders can be cases when the requester did not receive a response from the server about tender creation and, therefore, repeated the request. Removing such tenders requires administrative intervention.

Creating tender with single-phase commit
----------------------------------------

Sending a single-phase request for a tender creation (POST /tenders) according to the "old" mechanism, that creates a tender already in the ``active.enquiries`` status:

.. include:: tutorial/tender-post-attempt-json-data.http
:code:

Creating tender with 2-phase commit
-----------------------------------

Let's create tender in draft status:
Tender becomes available after the successful completion of the following requests:

1. Creation of the tender in the ``draft`` status.
2. Transfer of the tender to ``active.enquiries`` status through a separate request (publication).


Creation of a tender
~~~~~~~~~~~~~~~~~~~~

A request `POST /tenders` creates a tender in status ``draft``. As a result, an ``acc_token`` is passed for the further tender management.

.. include:: tutorial/tender-post-2pc.http
:code:

And now switch to `active.enquiries` status:
Tender with the ``draft`` status is "invisible" in the `GET /tenders` list. Chronograph does not "see" it, therefore, does not switch statuses.


Publication of a tender
~~~~~~~~~~~~~~~~~~~~~~~

The request `PATCH /tenders/{id}?acc_token=...` ``{“data”:{“status”:”active.enquiries”}}`` changes status of tender (according to the request), therefore, publishes it ("visualizes" it in the `GET /tenders list`).

.. include:: tutorial/tender-patch-2pc.http
:code:

All tenders created in the CDB but not yet published will not be displayed on the web platform and, therefore, will not lead to their announcement.

Repeating of the request for publication in case of problem with receiving a response from the server will not cause errors.

The new mechanism is available along with the "old" one. The "old" is likely to be turned off in one of the later releases.

Work with errors
----------------

In case of unsuccessful request and/or 5xx errors you should check modified object data (tender, bid, award, etc.), since 5xx error response does not necessarily guarantee that request has not been performed. You should repeat this request with some interval until successful result.

You can view more detailed error description :ref:`here <errors>`.

Here is an example of incorrectly formed request. This error indicates that the data is not found in the body of JSON.

.. include:: tutorial/tender-post-attempt-json.http
:code:

Binary file modified docs/source/locale/uk/LC_MESSAGES/2pc.mo
Binary file not shown.
153 changes: 142 additions & 11 deletions docs/source/locale/uk/LC_MESSAGES/2pc.po
Original file line number Diff line number Diff line change
@@ -1,27 +1,158 @@
#
#
msgid ""
msgstr ""
"Project-Id-Version: openprocurement.api 0.12a1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-05 14:15+0300\n"
"PO-Revision-Date: 2016-05-05 14:21+0300\n"
"POT-Creation-Date: 2016-12-14 15:39+0200\n"
"PO-Revision-Date: 2016-12-14 15:41+0200\n"
"Last-Translator: Zoriana Zaiats <sorenabell@quintagroup.com>\n"
"Language-Team: Ukrainian <support@quintagroup.com>\n"
"Language-Team: Ukrainian <info@quintagroup.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
"Language: uk\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<"
"=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 2.0\n"

msgid "2 Phase Commit"
msgstr "Двофазний коміт"

msgid "Creating tender with 2 Phase Commit"
msgid "Mechanism of the 2-phase commit"
msgstr "Механізм створення двофазного коміта"

msgid ""
"The 2-phase commit provides a mechanism for CDB to publish only the "
"tenders that clients are able to control and duplicates of which they "
"have rights to cancel."
msgstr ""
"Двофазний коміт пропонує механізм, завдяки якому в ЦБД будуть "
"опубліковані тільки ті закупівлі, над якими майданчик має контроль і "
"змогу самостійно скасувати їх дублікати."

msgid ""
"The reason for duplicated tenders can be cases when the requester did not"
" receive a response from the server about tender creation and, therefore,"
" repeated the request. Removing such tenders requires administrative "
"intervention."
msgstr ""
"Причиною виникнення дублікатів закупівель є ситуації, коли автор запиту "
"на створення закупівлі не отримував відповіді від сервера про її "
"створення, і, відповідно, повторював спробу, що призводило до дублювання "
"закупівлі. Видалення таких закупівель вимагало адміністративного "
"втручання."

msgid "Creating tender with single-phase commit"
msgstr "Створення закупівлі за допомогою однофазного коміта"

msgid ""
"Sending a single-phase request for a tender creation (POST /tenders) "
"according to the \"old\" mechanism, that creates a tender already in the "
"``active.enquiries`` status:"
msgstr ""
"Відсилання однофазного запиту на створення закупівлі (`POST /tenders`), "
"за “старим” механізмом, після якого закупівля створюється одразу в "
"статусі ``active.enquiries``:"

msgid "Creating tender with 2-phase commit"
msgstr "Створення закупівлі за допомогою двофазного коміта"

msgid "Let's create tender in draft status:"
msgstr "Створимо закупівлю у статусі `draft`:"
msgid ""
"Tender becomes available after the successful completion of the following"
" requests:"
msgstr ""
"Закупівля стає доступною після успішного та послідовного виконання двох "
"наступних запитів:"

msgid "Creation of the tender in the ``draft`` status."
msgstr "Створення закупівлі у статусі ``draft``."

msgid ""
"Transfer of the tender to ``active.enquiries`` status through a separate "
"request (publication)."
msgstr ""
"Переведення закупівлі в статус ``active.enquiries`` окремим запитом "
"(публікація)."

msgid "Creation of a tender"
msgstr "Створення закупівлі"

msgid "And now switch to `active.enquiries` status:"
msgstr "Переключимо у статус `active.enquiries`:"
msgid ""
"A request `POST /tenders` creates a tender in status ``draft``. As a "
"result, an ``acc_token`` is passed for the further tender management."
msgstr ""
"При запиті `POST /tenders` передається закупівля зі статусом ``draft``. В"
" результаті виконання запиту віддається ``acc_token`` для подальшого "
"управління закупівлею."

msgid ""
"Tender with the ``draft`` status is \"invisible\" in the `GET /tenders` "
"list. Chronograph does not \"see\" it, therefore, does not switch "
"statuses."
msgstr ""
"Закупівля зі статусом ``draft`` \"невидима\" в переліку `GET /tenders`. "
"Її, зокрема, не помічає хронограф і не перемикає статуси."

msgid "Publication of a tender"
msgstr "Публікування закупівлі"

msgid ""
"The request `PATCH /tenders/{id}?acc_token=...` "
"``{“data”:{“status”:”active.enquiries”}}`` changes status of tender "
"(according to the request), therefore, publishes it (\"visualizes\" it in"
" the `GET /tenders list`)."
msgstr ""
"Запит `PATCH /tenders/{id}?acc_token=...` "
"``{“data”:{“status”:”active.enquiries”}}`` змінює статус закупівлі "
"(згідно із запитом) і, відповідно, цим публікує її (“візуалізує” її в "
"переліку `GET /tenders`)."

msgid ""
"All tenders created in the CDB but not yet published will not be "
"displayed on the web platform and, therefore, will not lead to their "
"announcement."
msgstr ""
"Всі закупівлі, які були створені в ЦБД, але не опубліковані, не будуть "
"відображатись на майданчику і, відповідно, не будуть призводити до їх "
"оголошення."

msgid ""
"Repeating of the request for publication in case of problem with "
"receiving a response from the server will not cause errors."
msgstr ""
"Повторення запиту на публікацію, у випадку проблем з отриманням відповіді"
" від сервера, не буде спричиняти помилок."

msgid ""
"The new mechanism is available along with the \"old\" one. The \"old\" is"
" likely to be turned off in one of the later releases."
msgstr ""
"Новий механізм доступний паралельно зі “старим”. “Старий”, імовірно, буде"
" вимкнено в одному з наступних release-ів."

msgid "Work with errors"
msgstr "Робота з помилками"

msgid ""
"In case of unsuccessful request and/or 5xx errors you should check "
"modified object data (tender, bid, award, etc.), since 5xx error response"
" does not necessarily guarantee that request has not been performed. You "
"should repeat this request with some interval until successful result."
msgstr ""
"У випадку неуспішності запиту та/або 5xx помилки, перевірте модифікований"
" об'єкт (закупівлю, пропозицію, контракт і т.п.), оскільки 5xx помилка не"
" обов'язково означає, що запит не відбувся. Варто повторювати запит з певним"
" інтервалом, доки він не пройде успішно."

msgid "You can view more detailed error description :ref:`here <errors>`."
msgstr ""
"Детальніший опис помилок та рекомендацій щодо дій при їх виникненні описаний"
" у розділі :ref:`Коди стану <errors>`."

msgid ""
"Here is an example of incorrectly formed request. This error indicates "
"that the data is not found in the body of JSON."
msgstr ""
"Ось приклад помилки неправильно сформованого запиту. Ця помилка вказує, "
"що `data` не знайдено у тілі JSON."

0 comments on commit a5ade9f

Please sign in to comment.