> For the complete documentation index, see [llms.txt](https://workflow.govstack.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://workflow.govstack.global/7-data-structures.md).

# 7 Data Structures

## 7.1 Resource Model

The full resource model is described in detail in the [API Specification](https://github.com/GovStackWorkingGroup/bb-workflow/blob/23Q4/api/swagger.yaml), but the following is a high-level diagram of the key entities.

![Diagram Source](/files/BDLlxQlMZfMcBECBXq38)

## 7.2 Data Elements

The data elements listed below provide detail for the resource model defined by the swagger specification. This section lists the required fields for each resource. The data elements listed are extensible in order to respond to specific use cases, however, the data elements listed below are a minimum requirement.

### 7.2.1 Process

**Description:** Represents a process that has been successfully created in a Workflow engine. This object contains important reference details like the generated process UUID (universally unique identifier), which is required to perform further operations on the process.

| Name              | Type                                          | Description                                 | Notes                                |
| ----------------- | --------------------------------------------- | ------------------------------------------- | ------------------------------------ |
| id                | integer                                       | generated by a system surrogate primary key | Required: false. Restrictions: none. |
| processDefinition | [ProcessDefinition](#7.2.2-processdefinition) | none                                        | Required: false. Restrictions: none. |

### 7.2.2 ProcessDefinition

**Description:** Reference to a blueprint of a process. Contains all the fields required to create a new process for a workflow engine.

| Name         | Type                                        | Description                                                                                              | Notes                                |
| ------------ | ------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| name         | string                                      | name of a process                                                                                        | Required: true. Restrictions: none.  |
| type         | string                                      | none                                                                                                     | Required: true. Restrictions: none.  |
| version      | string                                      | none                                                                                                     | Required: true. Restrictions: none.  |
| isExecutable | boolean                                     | Specifies whether the Process is executable                                                              | Required: false. Restrictions: none. |
| isClosed     | boolean                                     | whether Messages and Events, not modeled in Process, can occur when the Process is executed or performed | Required: false. Restrictions: none. |
| description  | string                                      | none                                                                                                     | Required: false. Restrictions: none. |
| processBody  | [ListOfProperties](#7.2.5-listofproperties) | none                                                                                                     | Required: false. Restrictions: none. |

### 7.2.3 ProcessInstance

**Description:** Used to list a single or list of process instances that are in various states like active, suspended or stopped, in a Workflow engine.

| Name           | Type    | Description                                 | Notes                                |
| -------------- | ------- | ------------------------------------------- | ------------------------------------ |
| id             | integer | generated by a system surrogate primary key | Required: false. Restrictions: none. |
| processRef     | integer | reference to the process definition         | Required: false. Restrictions: none. |
| initTime       | string  | Initiation Timestamp                        | Required: false. Restrictions: none. |
| state          | string  | see BPMN specification v.2.0 section 13.2.2 | Required: false. Restrictions: none. |
| lastChangeTime | string  | last change Timestamp                       | Required: false. Restrictions: none. |

### 7.2.4 ProcessInstancePayload

**Description:** Initiates a process execution or creates a process instance. Contains the ability to capture input values that may be required to start a new process instance.

| Name             | Type                                        | Description | Notes                                |
| ---------------- | ------------------------------------------- | ----------- | ------------------------------------ |
| processStartedBy | string                                      | none        | Required: true. Restrictions: none.  |
| instanceValues   | [ListOfProperties](#7.2.5-listofproperties) | none        | Required: false. Restrictions: none. |

### 7.2.5 ListOfProperties

| Name  | Type   | Description | Notes                                |
| ----- | ------ | ----------- | ------------------------------------ |
| code  | string | none        | Required: false. Restrictions: none. |
| value | string | none        | Required: false. Restrictions: none. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://workflow.govstack.global/7-data-structures.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
