> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating and managing process definitions

> Learn how to create new process definitions and manage them using operations like export, duplicate, copy between projects, and view dependencies.

<video autoPlay controls loop src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/create_new_proc.mp4" />

## What is a process definition?

A process definition is the core building block of the FlowX.AI platform, serving as the blueprint for a business process. It's composed of nodes linked by sequences that define the path and logic of your application's workflow.

<Info>
  A complete process definition must include at least one [START](../../building-blocks/node/start-end-node#start-node) and one [END](../../building-blocks/node/start-end-node#end-node) node to mark where the process begins and concludes.
</Info>

<CardGroup cols={2}>
  <Card title="Executable Blueprint" icon="diagram-project">
    Process definitions can be instantiated, executed, and monitored within the platform
  </Card>

  <Card title="Business Logic Container" icon="gears">
    Houses all actions, decisions, user interfaces, and integrations for your business process
  </Card>

  <Card title="Event-Driven Flow" icon="sitemap">
    Nodes and sequences create a path for process tokens to follow based on conditions and events
  </Card>

  <Card title="Multi-Platform Support" icon="display">
    Process definitions can generate interfaces for web, mobile, and other platforms
  </Card>
</CardGroup>

## Creating a process definition

<Steps>
  <Step title="Access the Process Definitions Section">
    1. Open **FlowX.AI Designer** and navigate to your project
    2. Go to the **Processes** section within your project

    <Note>
      You must have already created a project before creating process definitions. Process definitions belong to projects and inherit project settings.
    </Note>
  </Step>

  <Step title="Create a New Process Definition">
    1. Click the **+ New Process** button in the top-right corner
    2. Enter a unique name for your process definition that clearly describes its purpose
    3. Optionally, add a description to provide context about what this process does
    4. Click **Create** to create the new process definition

    <Tip>
      Use a descriptive naming convention for your processes, such as "\[Department]-\[Function]-\[Action]" (e.g., "HR-Onboarding-Application").
    </Tip>

    <Frame>
      ![Process Definition Editor](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/create_new_process.png)
    </Frame>
  </Step>

  <Step title="Configure the Process Definition">
    After creating the process definition, you'll be automatically directed to the FlowX.AI Process Designer editor where you can start building your process flow.

    <Frame>
      ![Process Designer Empty Canvas](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/process_designer_empty.png)
    </Frame>
  </Step>

  <Step title="Add Start and End Nodes">
    Every process definition must have at least one START node and one END node:

    1. From the node palette on the left, drag a **START** node onto the canvas
    2. Configure the START node properties in the panel that appears
    3. Drag an **END** node onto the canvas
    4. Connect the nodes by clicking on the START node, selecting the arrow command, and then clicking on the END node

    <Warning>
      Without properly configured START and END nodes, your process won't be executable. The START node initializes the process, while the END node ensures proper process completion.
    </Warning>
  </Step>

  <Step title="Build Your Process Flow">
    Expand your process by adding additional nodes between the START and END nodes:

    1. Drag the appropriate node types from the palette onto the canvas
    2. Configure each node's properties and actions
    3. Connect nodes in the sequence they should execute
    4. Add conditions and gateways to create branching logic

    <CardGroup cols={3}>
      <Card title="Task Nodes" icon="list-check">
        For business rules and automated actions
      </Card>

      <Card title="User Task Nodes" icon="user-gear">
        For user interactions and UI components
      </Card>

      <Card title="Gateways" icon="code-branch">
        For decision points and parallel flows
      </Card>
    </CardGroup>
  </Step>

  <Step title="Save Your Process Definition">
    Regularly save your work by clicking the **Save** button in the editor toolbar.

    <Info>
      Process definitions are saved within your project but need to be included in a project version and build to be deployed to environments.
    </Info>
  </Step>
</Steps>

## Key node types

When building your process definition, you'll use various node types to model your business logic:

<AccordionGroup>
  <Accordion title="Start and End Nodes">
    **Start Node**: Marks the beginning of a process flow, defining how a process instance is initiated.

    **End Node**: Marks the conclusion of a process flow, ensuring proper cleanup and completion.

    <Note>
      A process can have multiple START nodes (with different conditions) and multiple END nodes depending on the possible outcomes.
    </Note>
  </Accordion>

  <Accordion title="Task Nodes">
    **Task Node**: Used for executing automated actions without user interaction.

    **User Task Node**: Configures the UI components and collects data from users.

    **Send/Receive Message Tasks**: Used for communication with external systems and services.
  </Accordion>

  <Accordion title="Gateway Nodes">
    **Exclusive Gateway**: Creates decision points where the flow follows only one path based on conditions.

    **Parallel Gateway**: Splits the process into multiple parallel branches that execute simultaneously.

    **Inclusive Gateway**: Allows multiple paths to be taken based on conditions, unlike the exclusive gateway.
  </Accordion>

  <Accordion title="Special Nodes">
    **Subprocess Run Node**: Enables you to run a subprocess within the main process.

    **Timer Events**: Schedule actions to occur at specific times or after delays.

    **Message Events**: Handle message-based communication between processes.
  </Accordion>
</AccordionGroup>

## Adding actions to nodes

Nodes can have actions associated with them to perform specific operations:

<CardGroup cols={2}>
  <Card title="Business Rules" icon="code">
    Execute logic, validate data, and make decisions
  </Card>

  <Card title="Data Operations" icon="database">
    Save, retrieve, and manipulate process data
  </Card>

  <Card title="Integration" icon="plug">
    Connect with external systems and services
  </Card>

  <Card title="UI Interactions" icon="display">
    Send data to and receive data from users
  </Card>
</CardGroup>

<Note>
  Actions can only be added to certain node types: task nodes, user task nodes, and send/receive message tasks.
</Note>

## Managing process definitions

After creating process definitions, you can manage them using the contextual menu available in the Processes list. Access this menu by clicking the three-dot icon (⋮) next to any process entry.

<Frame caption="Process contextual menu with management options">
  ![Process management menu](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.x/process_dsg_cm.png)
</Frame>

<Info>
  **Two contextual menus available:**

  This menu is accessible from the **Processes list view** (before opening a process). There's also a separate contextual menu available when you're **inside** a process definition that provides operations like Clear Cache, Audit Log, View History, and Delete.
</Info>

<Card title="Operations inside process definitions" href="../../building-blocks/process/process-definition#access-additional-operations" icon="pen-ruler">
  Learn about the contextual menu available while editing a process definition
</Card>

### Configure process settings

Open the process settings interface to configure process-level options including permissions, platform selection, task management integration, and data search indexing.

**To configure a process**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **Configure** from the menu
3. The settings panel opens, where you can modify:
   * Process name and general settings
   * Platform selection (Web, Mobile, Omnichannel)
   * Permissions and swimlane access control
   * Task management integration
   * Data search and indexing

<Card title="Process settings" href="../../building-blocks/process/process-definition#configure-process-settings" icon="sliders">
  Complete guide to all process configuration options
</Card>

### Export a process

Export a process definition to transfer it between environments, create backups, or share it with other teams.

**To export a process**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **Export**
3. The system generates a downloadable package containing:
   * Process definition JSON
   * Process metadata and manifest files
   * Version information
4. Save the export file to your local system

**Export structure**:

When you export a process, FlowX.AI creates a structured folder:

* Root export folder with unique identifier
* Process subfolder with `manifest.json` and `metadata.json`
* Version subfolder with the process definition JSON file

<Tip>
  Use a clear naming convention for exported files such as `[ProcessName]_[Version]_[Date].zip` to help identify exports later.
</Tip>

<Warning>
  Exported process definitions may contain environment-specific configurations. Review and adjust these settings when importing to a different environment.
</Warning>

<Card title="Export and import guide" href="./export-import-a-process-definition" icon="arrow-right-arrow-left">
  Learn about importing exported processes
</Card>

### Duplicate a process

Create a copy of an existing process definition within the same project. This is useful when you want to create a variant of a process or use an existing process as a template.

**To duplicate a process**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **Duplicate**
3. Enter a name for the duplicated process
4. Click **Confirm** to create the copy

**What gets duplicated**:

* Complete process flow with all nodes and sequences
* All node configurations and actions
* UI Designer configurations
* Data model structure
* Process settings (permissions, platform selection, etc.)

**What doesn't get duplicated**:

* Process instances and runtime data
* Audit history
* Version history

<Tip>
  Use duplication to create process variants for different departments or to test significant changes without affecting the original process.
</Tip>

<Info>
  The duplicated process is created in the current work-in-progress (WIP) version of your project. Remember to commit your changes when ready.
</Info>

### Copy to another project or library

Transfer a process definition to a different project or library within your FlowX.AI environment. This enables sharing reusable processes across multiple projects.

**To copy a process to another project**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **Copy to another project/library**
3. Choose the destination project or library from the list
4. Optionally adjust the process name for the destination
5. Click **Confirm** to complete the copy operation

**Use cases**:

* **Create reusable components**: Move common processes to a shared library
* **Share across teams**: Copy processes to other team projects
* **Promote to production projects**: Transfer tested processes to production-ready projects
* **Create process templates**: Build a library of standard process templates

<Warning>
  Ensure all dependencies (subprocesses, data types, integrations) exist in the destination project, or copy them separately. Missing dependencies will cause errors.
</Warning>

<Info>
  Copying a process creates an independent copy. Changes to the original won't affect the copied version and vice versa.
</Info>

### See used resources

View all resources and dependencies that the process definition uses. This helps you understand the process's connections to other components and identify potential impacts when making changes.

**To view used resources**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **See used resources**
3. Review the list of dependencies, which may include:
   * Subprocesses and workflows
   * UI templates and components
   * Data model types
   * Integration connectors
   * Business rules and scripts
   * Document templates
   * Notification templates

**Benefits**:

* **Impact analysis**: Understand what will be affected by changes
* **Dependency tracking**: Ensure all required resources are available before deployment
* **Documentation**: Map relationships between processes and resources
* **Troubleshooting**: Identify missing or misconfigured dependencies

<Tip>
  Review used resources before exporting or copying a process to ensure you include all necessary dependencies in the target environment.
</Tip>

### View audit log

Access the comprehensive change history for the process definition, showing who made changes, when, and what was modified.

**To view the audit log**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **Audit log**
3. Review the audit entries, which include:
   * Timestamp of each change
   * User who made the change
   * Application version
   * Event type and subject
   * Change status

**Audit log features**:

* **Filterable entries**: Search and filter by date, user, or event type
* **Complete audit trail**: Maintain compliance with regulatory requirements
* **Change tracking**: Identify when specific modifications were introduced
* **Troubleshooting**: Trace issues back to specific changes

<Card title="Audit documentation" href="../../platform-deep-dive/core-extensions/audit" icon="clock-rotate-left">
  Learn more about audit logging capabilities
</Card>

### View history

Access the version history of the process definition to see how it evolved across different committed versions.

**To view version history**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **View history**
3. Review the list of versions
4. Select two versions to compare changes side-by-side

**History capabilities**:

* **Version comparison**: See exactly what changed between any two versions
* **Change tracking**: Identify when specific features were added or modified
* **Rollback reference**: Understand previous configurations if you need to revert changes
* **Documentation**: Track the evolution of your process over time

<Info>
  Version history shows committed versions only. Changes in the current work-in-progress version appear after you commit the project version.
</Info>

<Card title="Project versioning" href="../../projects/managing-applications/versioning" icon="code-branch">
  Complete guide to version management
</Card>

### Delete a process

Remove a process definition from your project when it's no longer needed.

**To delete a process**:

1. Click the three-dot menu (⋮) next to the process name
2. Select **Delete**
3. Confirm the deletion in the dialog that appears

<Warning>
  **Use with extreme caution**: Deleting a process definition is a significant action with the following consequences:

  * The process definition is removed from the current work-in-progress (WIP) version
  * You cannot delete a process that's part of a committed version
  * Other processes that reference this one as a subprocess may break
  * The deletion can be recovered only from previous committed versions
</Warning>

**Before deleting a process**:

1. ✓ **Check for dependencies**: Use "See used resources" to identify processes that reference this one
2. ✓ **Review running instances**: Verify no critical process instances are currently active
3. ✓ **Backup if needed**: Export the process definition before deletion if you might need it later
4. ✓ **Update documentation**: Remove references to the deleted process from your documentation

**Impact of deletion**:

| Aspect                  | Impact                                                     |
| ----------------------- | ---------------------------------------------------------- |
| **Current WIP version** | Process is removed immediately                             |
| **Committed versions**  | Previous versions remain unchanged                         |
| **Running instances**   | Existing instances continue with their original definition |
| **Dependent processes** | May show errors or validation warnings                     |
| **Historical data**     | Process instance data in reporting is not affected         |

<Info>
  Deleted processes can be recovered by accessing previous committed versions through version history, but any uncommitted changes will be lost.
</Info>

## Best practices

<Tip>
  **Process Definition Design Tips**:

  * Start with a simple skeleton process with START and END nodes before adding complexity
  * Create a logical flow from left to right in your diagram for better readability
  * Group related activities into subprocesses to keep the main process clean
  * Use clear naming conventions for nodes and actions
  * Document your process design decisions within node descriptions
  * Test your process with simulated data before publishing
</Tip>

## Next steps

After creating your process definition, you can:

<CardGroup cols={2}>
  <Card title="Add Nodes to Your Process" icon="circle-plus" href="./adding-a-new-node">
    Learn how to add and configure different node types
  </Card>

  <Card title="Create User Interfaces" icon="palette" href="./creating-a-user-interface">
    Build interactive UIs for your process
  </Card>

  <Card title="Process Definition Deep Dive" icon="book" href="../../building-blocks/process/process-definition">
    Comprehensive guide to process configuration and settings
  </Card>

  <Card title="Export and Import" icon="arrow-right-arrow-left" href="./export-import-a-process-definition">
    Transfer processes between environments
  </Card>
</CardGroup>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Can a process have multiple START nodes?">
    Yes, a process definition can have multiple START nodes, each with different starting conditions as long as they are on different swimlanes. This allows the same process to be initiated in different ways depending on the context.

    <Info>
      Process definition cannot contain multiple start nodes on the same swimlane.
    </Info>
  </Accordion>

  <Accordion title="How do I modify an existing process definition?">
    To modify an existing process, navigate to the Processes section in your project, find the process you want to edit, and click on it. Then click the "Edit Process" button to open it in the Process Designer.
  </Accordion>

  <Accordion title="Can I reuse parts of a process definition?">
    Yes, you can create reusable components as subprocesses, which can then be called from multiple main processes. This promotes reusability and maintainability. You can also duplicate existing processes or copy them to other projects using the contextual menu operations described in the Managing process definitions section above.
  </Accordion>

  <Accordion title="Can I export or import process definitions?">
    Yes, FlowX.AI allows you to export and import process definitions. Use the **Export** option from the process contextual menu to create a downloadable package. The export includes the process definition JSON, metadata, and version information in a structured format. See the [Export a process](#export-a-process) section above for detailed instructions.
  </Accordion>

  <Accordion title="How do I see what resources my process uses?">
    Use the **See used resources** option from the process contextual menu to view all dependencies including subprocesses, UI templates, data model types, integrations, and more. This helps with impact analysis before making changes and ensures all dependencies are available when exporting or deploying the process.
  </Accordion>
</AccordionGroup>
