Start
  • 02 Jun 2023
  • 6 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Start

  • Dark
    Light
  • PDF

Article Summary

The Start node is the initial point of entry for tasks in your process or state diagram. When a task is sent to the Start node, the process or diagram begins processing it according to your design.

It's important to note that every process and State diagram in Corezoid includes precisely one Start node. This means that every diagram has one designated entry point for task processing.

In essence, the Start node is a webhook endpoint to which you can forward your tasks for processing from a multitude of sources.

Sources from which a Start node can receive tasks

There are several sources from which a Start node can receive tasks (see Picture 1).

Start.png

Picture 1. Task sources for a Start node

View Mode/Debug Mode - Here you can add tasks manually, one at a time. Adding tasks manually can be an excellent way to test and debug a process, initiate recursive or looped processes, or add configuration parameters and authentication credentials to be stored in a state diagram.

Import from CSV - This method is for storing pre-existing data in a file that you need to process.

Webhook - subscribe to receive tasks from either your own or third-party webhooks.

Copy task node - allows you to send a copy of a task to a start node of another process.

Call process node - allows you to call a process in the same way you would call a function.

Corezoid API - a way to connect your app to the Corezoid platform. You can use it to access and perform any task available through the Corezoid interface.

Node Settings

Process ID - a unique identifier that allows you to direct your tasks to a specific process from any other process within Corezoid.

API key - enables you to specify or create an API key with a login and secret key.

Direct url for tasks upload - The generated endpoint URL is the value you need to specify when subscribing to a webhook. Pick the format in which you expect to receive the data

Supported input formats

JSON, XML, NVP

Connect to Messenger - automatically configures your process to receive messages from messengers. Currently, Telegram, Facebook Messenger, and Viber are supported.

Examples

View Mode: Manually adding tasks to a process

This is the fastest and easiest way to create a new task in Corezoid.

To create a new task:

  1. Switch to View mode.
  2. Click on the New Task button.
  3. The New Task panel will appear, allowing you to specify the necessary task parameters and their corresponding values.

One of the settings in the panel is the REF field, which comes with an auto-generated reference number. You can change this to any value you prefer, as long as it is not already in use by another task in the same process.

Switch to View Mode.gif

Picture 2. New task creation in View mode

In Picture 2, we demonstrate the process of creating a new task in View Mode. In this example, we created a task with a single parameter named "Message," to which we assigned the value "Hello." We left the REF ID unchanged.

Once we clicked the "Add Task" button, the task was sent to the Start node of the process, and from there it proceeded to the next node.

Import from CSV

If you have data stored in a file that you want to turn into tasks, you can easily do so using the "Import from CSV" option in View mode. This feature allows you to quickly import large amounts of data and create tasks from it.

Simply select the file you wish to import and follow the prompts to map the data to the corresponding task parameters (see Picture 3).

Start-CSV.gif

Picture 3. Task import from a csv file
The GIF demonstrates how to use the "Import from CSV" option in Corezoid to turn a data file into individual tasks.

First, we click on the "Import from CSV" button to upload the file. Then we select the appropriate divider type and encoding. Each row in the CSV file will be converted into its own task.

It's important to note that if your process has required parameters, the CSV file must have columns for these parameters, or the upload will fail. You can select any column as the task reference(REF) and specify the data type for each column, such as string or number.

From a Webhook

In Corezoid, every Start node serves as an endpoint with its own unique URL. This endpoint URL can be used to subscribe to webhooks, allowing you to receive external data and trigger your Corezoid processes automatically (see Picture 4).

Untitled design 2.png

Picture 4. Using a Start node URL

Getting the endpoint URL of a Start node in Corezoid is simple. Just click the "Copy Webhook" button that corresponds to the format in which you expect to receive the payload. The endpoint URL will be generated and copied to your clipboard. It will look something like this:

JSON

https://www.corezoid.com/api/1/json/public/0060000/*8b568f9c430f045b0c207ff8221

XML

https://www.corezoid.com/api/1/xml/public/0060000/*8b568f9c430f045b0c207ff8221

NVP

https://www.corezoid.com/api/1/nvp/public/0060000/*8b568f9c430f045b0c207ff8221

It's important to note that the only difference between the endpoint URLs generated by Corezoid is the payload format. Otherwise, the URLs are identical.

By selecting the appropriate payload format when copying the webhook URL, you can ensure that the data received by your Start node is properly formatted and can be processed by your Corezoid process.

When subscribing to a webhook from a third-party service, you usually only need to provide the endpoint URL of your Corezoid Start node. However, it's always a good idea to check with your service provider or developer for further details on how to subscribe to their specific service.

Unchecking the Direct URL for tasks upload checkbox will permanently delete the endpoint URL

If you uncheck the Direct URL for tasks upload checkbox, the endpoint will be turned off. If you check it back on, a new endpoint URL will be generated, and you will need to update your webhook subscription.

From Nodes in Other Processes

In Corezoid, it's possible to send tasks from one process to another using the Copy Task node or the Call Process node.

The Copy Task node allows you to create a duplicate of a task and send it to a different process. On the other hand, the Call Process node lets you invoke another process as you would a function in programming (see Picture 5).

Untitled design 3.png

Picture 5. Using Copy Task and Call a Process as task sources for a Start node

To send tasks from one process to another in Corezoid, you'll need to specify the process ID of the destination process. There are two ways to do this:

  1. You can obtain the process ID by opening the Start node panel and copying it into the process field of either the Copy Task node or the Call Process node.

  2. Alternatively, you can select the destination process directly through the UI by clicking the selection button in the process field of either node.

It's important to keep in mind that the Copy Task node and the Call Process node in Corezoid have distinct behaviors. It's crucial to understand these differences to choose the right node for your specific use case.

Corezoid API

With the Corezoid API (asynchronous), you can easily send a task to the start node of a process from anywhere on the internet. To do this, you'll need to specify the type as "create" and the object as "task" in the body of the request. You will also need to provide the process ID, which can be found in the Start node side panel under CONV_ID.

See our API documentation and task creation example for more details.

    "ops": [
        {
            "type": "create",
            "obj": "task",
            "conv_id": {{CONV_ID}},
            "ref": {{REFERENCE}},
            "data": {
                "param": 1
            },
            "company_id": {{COMPANY_ID}}
        }
    ]

Error handling & troubleshooting

When an error occurs in the node, the following fields are added to the initial task depending on the error and node type:

Error parameter nameParameter description
__conveyor_node_type_return_type_error__Error type: hardware (system error), software (error in a node logic/settings)
__conveyor_node_type_return_type_tag__Error tag
__conveyor_node_type_return_type_description__Error description in human-readable language. Can be static or dynamic
ProblemCauseSolution
Process is not receiving tasksProcess is pausedSwitch process to Active
Process is in Debug modeSwitch process to Active
Direct URL for task upload is uncheckedCheck the box and update webhooks with new URL
RPS limit was exceededCheck activity monitor

What's Next