Developer Concepts
Introduction
The term "asset" is used often, and has many different meanings in different industries and even in different areas of the same production facility. In TACTIC, an asset is an atomic entity with metadata and files associated with it. To avoid confusion, the TACTIC assets are called "searchable objects," shortened to sObjects.
sTypes and sObjects
In TACTIC, sObjects are the atomic entities (or assets) that TACTIC uses to manipulate data and check in files. An sObject can be any entity required in a production. Examples of sObjects include shots, textures, users, tasks, production notes, and so on.
Every sObject must belong to a search type, also known as sType. Search types are a set of unique string entities that serve to classify all variations of sObjects. Search types are registered in the "search_object" table in the "sthpw"(Southpaw) database. This table defines the properties for each search type, and is used to ensure that sObjects adhere to their search type properties. For instance, in a custom project, you may have a custom/shot sType created for shot. Once it’s registered, you can add shot entries in the shot table that it generates. The shot entries are the shot sObjects.
TACTIC Portal
On TACTIC Portal, which is accessed through the URL:
https://portal.southpawtech.com
There are a number of predefined sTypes which can be accessed:
- Jobs (workflow/job)
- Job Asset (workflow/job/asset)
- Asset (workflow/asset)
- Task (sthpw/task)
- Snapshot (sthpw/snapshot)
In general, when working with data in TACTIC, you are doing so exclusively through sObjects. Each sObject has a data structure determined by its sType. TACTIC Project defines a set of related sTypes which are useful for managing assets and the workflows associated with them.
Each sType has a named identifier which is of the form 'namespace'/'type'. For example, to search for jobs, you would use the search type "workflow/job".
In relation to code, the search would look something like:
server = TACTIC.get()
jobs = server.query("workflow/job", [['status','Complete']])
This snippet queries for all complete jobs.
The returned values for any query will be a list of dictionaries which represent the data elements for each item. You can simply iterate through the list to get to the desired data:
names = [];
for job in jobs:
name = job.get("name")
names.append(name)
Search Key
There are a couple of data items which have a key of the form
For example, the search_key date item is a unique identifier for any given sObject. Many of TACTIC's API functions take the search_key as an argument to indicate which sObject to operate on. However, most functions will also take a dictionary as long as the search_key item in the dictionary is identified.