Create a Machinery process

You can create a new process by choosing New Process in Machinery, or from the Dependents section of your object type in Ontology Manager. You will be prompted to choose one of the following setup options:

  • Implement a process: Choose this option if all the components of your process are in Foundry, meaning there is no external changelog. The components of a process are the Process object type, Actions, and Automations. You may have already have some of these, otherwise you can generate them as part of the setup workflow.

  • Mine an existing process: Choose this option if you want to understand and monitor an external process. The main required input is a changelog dataset tracking changes of process objects over time. As Machinery is Ontology-aware, you can either provide the Process and a Process Log object types or allow Machinery to generate them for you.

  • Manual Setup: If you already maintain an object type that tracks changes over time, and that fulfills Machinery's specification, you can choose the manual setup. Selecting this option skips the configuration dialog, so you can directly start drawing and configure your Ontology at any time later.

Process creation dialog

Machinery currently supports a read-only view for external processes. If you also want to define Actions on the process in Foundry, the external and internal changes need to be reconciled, which Machinery will support soon. If your use case requires this today, choose the manual setup or contact Palantir Support.

Requirements

When you configure object types in Machinery, you can map your properties (with their names) to the required fields.

Process object type

The object type that represents entities going through the process.

  • Process ID (string) [required]: The primary key of the process entity
  • State (string) [required]: The current state of the process entity

Changelog dataset

This configuration is only needed for the Mine an existing process setup option. It represents your measurement of the external process. Each row in the dataset denotes a change to a process object at a given time.

  • processId (string) [required]: A unique identifier of the process entity.
  • state (string) [required]: The new state the the process has entered.
  • timestamp (timestamp) [required]: The timestamp at which the transition occured.
  • isDeleted (boolean) [optional]: Property that flags an entity as deleted. If isDeleted of the latest log is True, that object will not appear in the Ontology.

Process Log object type

A Log represents a transition from old state to new state at timestamp T. The Process Log object type is typically created and maintained by Machinery. If you choose the manual setup option, you must provide the following properties. If optional properties are missing, some of Machinery's functionality will not be available.

  • Log ID (string) [required]: The primary key of the Log object.
  • Process ID (string) [required]: The primary key of the process object that is being tracked. Use when setting up an Ontology link between the Process object and the Log object.
  • Old State (string) [required]: The start state of the transition.
  • New State (string) [required]: The end state of the transition.
  • Timestamp (timestamp) [required]: Timestamp of entering the end state.
  • isLatest (boolean) [optional]: True if this log is the most recent for the Process object, otherwise False.
  • Duration (long) [optional]: Duration in milliseconds since entering the old state.
  • Path (string) [optional]: A list of all states encountered so far, including the current state. Must be a serialized JSON string.

Generate process graph

Machinery is where you outline your process - detailing what can or should occur. You should define the following components of a process which are represented as nodes and edges on the Machinery graph:

  • Allowed states
  • Possible state transitions
  • Actions that are responsible for state transitions
  • Actions that can occur automatically based on reaching a declared input state

Drawing

You can use the clicking and drawing interactions to create new states and actions. Linking state and action nodes through connecting lines determines the possible state transitions. By dragging nodes on the graph, you can set their positions, or choose the auto-layout feature from the control bar.

Drawing interactions

Mining

Alternatively, once the Log object type has successfully indexed and has data, you can obtain the set of states and transitions by mining historical data. This is the most common workflow for processes backed by a changelog dataset. Choose Mine from the Actions menu.

Value Types

The state IDs in Machinery are equivalent to the state values in your data. To avoid typing errors or diverge otherwise, you can back your state property by an enumeration Value Type. This will guarantee that the data in the Ontology can only assume a predefined set of values. Machinery will discover that setup and keep the process states in sync.

Expected transitions

When mining states and transitions from historical logs, data health issues can often lead to unexpected transitions. For instance, you may notice a Patient going from in treatment into the admitted state, which is not a sound transition. By switching to the Expected Transitions mode, you can define the edges that you expect. This filter is used in the Machinery widgets to show only the relevant portion of the graph.