DTXS API Use cases Task planning, risk assessment and output analysis Activity 2: Plan task

Activity 2: Plan task

Introduction

In this activity, we will configure the task (its title, duration, linkage to the 3D model or other properties) and upload all documents necessary to perform risk assessment, task plan inspection or task execution.

Before starting working on this activity, you should know about:

Expected output

Detailed plan of the decommissioning task, saved to the DTXS server as:

Steps

1
Upload the 3D model

This task will be associated with the 3D model for better risk identification and plan inspection.

Let's upload the 3D model first. We will upload the model into the root folder.

Important Uploading a document will return UID of this document. This UID and all other UIDs generated in further steps, will be important - you shall save them in some notepad for the future use.

python dtxs-client.py config.json upload-document test-db ~/sample-3d-model.ifc root {"class": "Assets.Intangibles.Documents", "name": "sample-3d-model.ifc" } Received access token, length: 1165 bytes Document uploaded. UID = d78022e0-4b56-11f0-a491-f4ee08cb8a79

Do not forget to save the returned UID of the document for the future use.

2
Upload own metadata for the 3D model

To better describe the 3D model that we have uploaded now, it is good to upload some additional information. Other experts working on this task will value this.

Let's create a record of class ndc:Assets.Intangibles.Documents.

Important Creating a record will return UID of this new record. This UID and all other UIDs generated in further steps, will be important - you shall save them in some notepad for the future use.

python dtxs-client.py config.json create-record test-db ndc:Assets.Intangibles.Documents { "Type": "IFC 3D model", "FileName": "sample-3d-model.ifc", "description": "3D model of the room where the robotic measurement task should be carried out.", "DocumentId": "[UID_OF_THE_UPLOADED_DOCUMENT]", } Received acces token, length: 1165 bytes Document uploaded. UID = 79175798-6a72-468c-b3cf-02cd2e90ec84

Do not forget to save the returned UID of the document for the future use.

3
Create worker roles

In later steps, we will be specifying team doing the task. But before, we need to prepare few other things.

Each member of a team (e.g., worker or robot) can have one or more roles assigned. For example, John can work as a robot operator in one team and a project manager in the second team. A role is a record of class ndc:Actors.Roles.

We will now create several roles to be used later in definition of a team.

python dtxs-client.py config.json create-record test-db ndc:Actors.Roles { "Name": "Radiation protection expert" } Received access token, length: 1165 bytes Record created. UID = a3a3736c-c881-48a7-b1aa-17d36a832995 python dtxs-client.py config.json create-record test-db ndc:Actors.Roles { "Name": "Robot operator" } Received access token, length: 1165 bytes Record created. UID = 80db3cdd-5f95-4149-bec1-e3e13d96da27

Do not forget to save the returned UID of each role for the future use.

4
Add workers and robots

Team consists of its members; members can be of different nature. In this tutorial we will use Persons and Robots. Create few records of class ndc:Actors.Persons or ndc:Actors.Robots.

Note: We will create two records of class Actors.Persons and one record of class Actors.Robots

python dtxs-client.py config.json create-record test-db ndc:Actors.Persons { "GivenName": "Jupiter", "FamilyName": "Jones" } Received access token, length: 1165 bytes Record created. UID = 90ad37ab-2a53-482f-a493-bb98904d562b python dtxs-client.py config.json create-record test-db ndc:Actors.Persons { "GivenName": "Peter", "FamilyName": "Crenshaw" } Received access token, length: 1165 bytes Record created. UID = fd546bbd-b662-48ed-aa02-4635af13001c python dtxs-client.py config.json create-record test-db ndc:Actors.Robots { "Name": "Husky A300", "ManufacturerName": "Clearpath" } Received access token, length: 1165 bytes Record created. UID = 54b9d5e1-0649-4602-be0a-a334cc5cbe07

Do not forget to save the returned UID of the team for the future use.

5
Create a team

Now we have everything ready to create team: roles, workers and robots. Let's create a team now.

The team will be:

  • Jupiter Jones as Radiation protection expert
  • Peter Crenshaw as Robot operator
  • RadEye as the robot doing the measurements

Create record of class ndc:Actors.Teams.

Important We will be using UIDs of previously generated records for roles, workers and robots. In the command below, you will have to replace the UID placeholders with the UIDs that you received earlier.

python dtxs-client.py config.json create-record test-db ndc:Actors.Teams { "Name": "Remote robotic measurement team", "MemberIds": [ "MemberType": "Actors.Persons", "MemberId": "[UID_OF_JUPITER_JONES]", "RoleId": "[UID_OF_RADIATION_PROTECTION_EXPERT_ROLE]" ], [ "MemberType": "Actors.Persons", "MemberId": "[UIF_OF_PETER_CRENSHAW]", "RoleId": "[UID_OF_ROBOT_OPERATOR_ROLE]" ], [ "MemberType": "Actors.Robots", "MemberId": "[UIF_OF_HUSKY_ROBOT]" ] } Received acces token, length: 1165 bytes Record created. UID = b4b3069e-345a-4f39-b179-d3d8a15506c8

Do not forget to save the returned UID of the team for the future use.

6
Finally, create the task

Tasks are stored as records of the class ndc:Tasks. Create the task now and store the returned UID of the task for the future use.

python dtxs-client.py config.json create-record test-db ndc:Actors.Tasks '{ "Name": "Remote measurement", "Number": "T-001", "StartPlanned": "2025-07-01", "TeamId": "[UID_OF_THE_TEAM]", "DocumentIds": [ "[UID_OF_THE_RECORD_WITH_DOCUMENT_METADATA]" ] }' Received access token, length: 1165 bytes Record created. UID = 8efc2169-4b58-11f0-a491-f4ee08cb8a79

Do not forget to save the returned UID of the task for the future use.

Conclusion

In this activity, we've learned how to upload documents (3D models) and create records.

We have created a plan for the task:

If you have access to the Aquila Twinlab tool, you should see all the data there.

Now, continue to the Next activity: Identify risks.

(C) wai.blue | Rendered using GuideVis