guides
Work packages
A work package sends work units from a project in your account to a vendor that has its own wxrks account. The vendor works on a copy of the project in its account. When the vendor delivers, the translations come back to your project.
The two accounts first connect with a handshake: you invite the vendor, and the vendor accepts.
| Who | Calls | Permission |
|---|---|---|
| Client (sends work) | invite, list and delete handshakes; send, follow, retry and cancel work packages | ACCOUNT_manage_work_package_connections for handshakes, TASK_assign for work packages |
| Vendor (receives work) | list, accept, update and delete handshakes; follow and deliver work packages | the same |
Account admins have both permissions. Project managers have TASK_assign.
1. Connect the accounts (once)
Client. Get the vendor's account UUID from the vendor. Then call Invite Account to Work Package Handshake with receiverAccountUuid. You can add a message that the vendor sees with the invitation. The handshake starts as PENDING.
Vendor. List Work Package Handshakes shows the invitations you received, marked receiver: true. Accept one with Accept Work Package Handshake:
{"orgUnitUuids": ["<org unit uuid>"], "projectNamePrefix": "ACME"}
orgUnitUuidsare org units of your account. The client's work packages create their projects there, and the client picks one of them for each work package.projectNamePrefix(optional, at most 50 characters) is put before the names of those projects.
Update Work Package Handshake changes the org units or the prefix later. Either account can end the connection with Delete Work Package Handshake. Work packages already sent are not affected.
2. Send a work package (client)
The source project must be APPROVED. Call Send Work Package:
{
"sourceProjectUuid": "<your project>",
"destAccountUuid": "<vendor account>",
"destClientUuid": "<org unit the vendor accepted>",
"workflows": ["TRANSLATION"],
"sendReferenceFiles": true
}
- Leave out both
workUnitUuidsandworkflowsto send the whole project.workUnitUuidslimits the send to some work units.workflowsthen keeps only those steps. - Every step you send must also exist, with the same code, in the vendor's step catalog (see Workflow steps and templates).
- The source tasks move to
ASSIGNED. To charge the work at a vendor user's rate, setvendorUserUuidto a vendor user of your account. That user is assigned to the source tasks and is never shared with the vendor account. sendInstructions: truesends the text ininstructionsalong with the work.
The response is the work package in state PENDING. wxrks then copies the files and translations to a new project in the vendor's org unit. When the copy finishes, the state becomes REPLICATED. Follow it with Get Work Package, or list a project's work packages with List Work Packages and sourceProject.
3. Work and deliver (vendor)
The new project is an ordinary project in your account. destProject in List Work Packages finds the work package behind it.
Assign and translate as usual. When you set the project to DELIVERED, wxrks copies the delivered work units back to the client's project and delivers the matching source tasks there. To return work units delivered earlier, call Deliver Work Package. A partial delivery keeps the state at REPLICATED. When every work unit is back, the state becomes DELIVERED.
4. States and recovery
| State | Meaning |
|---|---|
PENDING | Sent, content being copied to the vendor |
REPLICATED | The vendor has the work, and deliveries can come back |
DELIVERED | Every work unit came back |
FAILED | The copy or a delivery failed |
CANCELLED | Cancelled by either side |
- Retry Work Package runs a
FAILEDwork package again: the copy if it never finished, or the delivery otherwise. - Cancel Work Package stops a work package that is not
DELIVEREDorCANCELLED. It removes the copied content and the temporary TM and glossary in the vendor account. Cancelling the project on either side does the same.
Deliver, retry and cancel run in the background and answer 202. Check the result with Get Work Package.