# StartSequence

This direct method is used to start a vision sequence, that has already been configured.

### **Method Name:**

StartSequence

### **Payload:**

The direct command requires the id of the sequence to trigger. It also takes an initial state, if some parameters needs to be added to the workflow sequence instance. This could be folder names, ids, dates or other parameters specific to the sequence instance. In this example, a directory name and an id is defined.

```
{
    "startSequence": {
        "id": "Sequence1",
        "initialState":[
            "directory": "2023-05-09",
            "someid": "B3FFBE70-23CF-4B08-B3BC-91268222FA08"
        ]
    }
}
```

### **Return value**

The direct command returns an OperationResult that indicates either success or failure, including information about wether the sequence succeeded or failed. The result also includes a copy of the entire workflow state, as it looks at the end of the execution.

```
{
    "status": 200,
    "payload": {
        "status": "ok",
        "response": {
            "state": {
                "workflowid": "f463d4b4-07d7-465d-8953-1af6429cd8e2",
                "sequenceid": "Sequence1",
                "pixelformat": "BayerRG8",
                "imageheight": "3000",
                "imagewidth": "3000",
                "cameravendor": "SICK",
                "cameramodel": "I2D612C-2MCB71",
                "directory": "2023-05-09",
                "someid": "B3FFBE70-23CF-4B08-B3BC-91268222FA08"
            }
        }
    }
}
```

The workflow state always contains the "workflowid", which is an instance id of the sequence execution.\
The "sequenceid" always containes the name of the sequence workflow.\
The camera properties are also added to the workflow state, stating image properties and camera model and vendor.\
The values from the initial state is also present at the end of the sequence workflow execution ("directory" and "someid").


---

# Agent Instructions: 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:

```
GET https://docs.tricloudnexus.io/edge/nexus-modules/data-connector-modules/scenecontrollermodule/direct-commands/startsequence.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
