Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow_status to Create payload messages #5

Open
wants to merge 2 commits into
base: ryanlassigbanks-purchase-order-rfc
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions text/0025-purchase-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ IDs included in the `PurchaseOrder` should refer to the same organizations.
- `uid` - Unique identifier for Purchase Order
- `workflow_status` - Workflow status. Values are defined by the smart contract
workflows
- `workflow_type` - Workflow type. The name of the workflow that the Purchase
Order will proceed through.
- `buyer_org_id` - Grid Pike organization ID associated with the buying
organization defined by the XML in the purchase order's `order_xml_v3_4` field.
- `seller_org_id` - Grid Pike organization ID associated with the selling
Expand All @@ -444,12 +446,13 @@ accepted
message PurchaseOrder {
required string uid = 1;
required string workflow_status = 2;
string buyer_org_id = 3;
string seller_org_id = 4;
repeated PurchaseOrderVersion versions = 5;
string accepted_version_number = 6;
uint64 created_at = 7;
bool is_closed = 8;
required string workflow_type = 3;
string buyer_org_id = 4;
string seller_org_id = 5;
repeated PurchaseOrderVersion versions = 6;
string accepted_version_number = 7;
uint64 created_at = 8;
bool is_closed = 9;
}
```

Expand Down Expand Up @@ -561,12 +564,16 @@ message PurchaseOrderPayload {
UpdateVersionPayload update_version_payload = 6;
}

*`workflow_status` must refer to a valid workflow status for this purchase
order as defined by its workflow type.*

message CreatePurchaseOrderPayload {
string uid = 1;
uint64 created_at = 2;
string buyer_org_id = 3;
string seller_org_id = 4;
CreateVersionPayload create_version_payload = 5;
string workflow_status = 5;
CreateVersionPayload create_version_payload = 6;
}

message UpdatePurchaseOrderPayload {
Expand All @@ -576,11 +583,15 @@ message UpdatePurchaseOrderPayload {
string accepted_version_number = 4;
}

*`workflow_status` must refer to a valid workflow status for this purchase
order version as defined by its workflow type.*

message CreateVersionPayload {
string version_id = 1;
string po_uid = 2;
bool is_draft = 3;
PayloadRevision revision = 4;
string workflow_status = 4;
PayloadRevision revision = 5;
}

message UpdateVersionPayload {
Expand Down