LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • Getting Started
    • What is Kognitos?
    • Logging In
    • Account Setup
    • Quick Start Guide
    • Core Concepts
  • Writing Automations
    • Automation Basics
      • Defining Data
      • Comments
      • Conditionals
      • Keywords
      • Loops
    • Calling Other Processes
      • Calling A Subprocess
      • Invoking a Subprocess
      • Starting Parallel Runs
    • Validating Data
    • Context Based Learning
    • Using the Debugger
  • Books
  • Automation Management
    • Scheduled Processes
    • Email Triggers
  • Enterprise Dashboard
  • Exception Handling
    • Providing Guidance
    • Resolving Common Exceptions
    • Learnings
  • Account Management
    • API Keys
    • User Roles & Permissions
Powered by GitBook
On this page
  • Overview
  • Mechanisms
  • Comparison

Was this helpful?

Export as PDF
  1. Writing Automations

Calling Other Processes

Learn how one process can call another process in Kognitos.

Last updated 2 days ago

Was this helpful?

Overview

In Kognitos, one process can call and run another process. The called process is referred to as a subprocess. There are many advantages of using subprocesses:

  • Modularity: Decomposing automations into smaller processes enhances structure and organization.

  • Readability: Well-organized automations are easier to read and understand.

  • Scalability: Automations can be scaled to handle multiple tasks.

  • Maintainability: Isolated processes simplify debugging and updating individual components.

Mechanisms

There are several ways to call another process in Kognitos:

  1. This method is ideal for single-run scenarios where you need to capture the result and status of a subprocess.

  2. This method is useful for scenarios where the parent process can continue executing without waiting for the subprocess's status or completion.

  3. This method provides control over parallel execution when handling multiple subprocesses simultaneously.

Comparison

Aspect
Calling a Subprocess
Invoking a Subprocess
Starting Parallel Runs

Syntax

Execution Style

Sequential Processing

Sequential Processing

Parallel Processing

Performance

Slower overall (each subprocess runs separately)

Slower overall (each subprocess runs separately)

Faster for many items (since runs happen in parallel)

General Usage

When tasks or items are independent and you want the result / status of a run

When tasks or items are independent and you don't need the result / status or a run

When tasks or items are dependent or rely on one another

Document Processing

Use when each document is independent and can be processed in isolation

Use when each document is independent and can be processed in isolation

Use when documents are dependent on one another, or the final outputs need to be aggregated

Example

run <procedure name>
invoke <procedure name>
start a run where
    the procedure is <procedure name>
run "to process the sales order"
    the attachment
invoke "to process the sales order" with
    the file is the document
get the attachments
process each attachment as follows
  start a run where
    the procedure is "to process the sales order"
    the attachment
wait for the runs
get the runs's results as the sales orders
Calling a Process:
Invoke:
Starting Parallel Runs: