useWorkspace.AI
Sign InGet Started

Predefined Process (Subroutine) Shape

Learn how to use the Predefined Process shape for subroutines and function calls in ISO 5807 flowcharts

Last updated: January 13, 2025
2 min read read

Predefined Process Shape

The Predefined Process shape (also called Subroutine) represents a process that is defined elsewhere, such as a function call, module, or subroutine.

What is a Predefined Process Shape?

The Predefined Process shape represents:

  • Function or method calls
  • Subroutines and procedures
  • External modules
  • Reusable processes
  • Library functions
  • Predefined operations

According to ISO 5807, this shape indicates a named process defined in detail elsewhere.

When to Use

Use the Predefined Process shape for:

  • Function calls: "ValidateEmail()", "CalculateTax()"
  • Modules: "AuthenticationModule", "PaymentProcessor"
  • Subroutines: "SortArray()", "SendNotification()"
  • API calls: "CallExternalAPI()", "FetchUserData()"
  • Reusable processes: Operations defined in other flowcharts

Visual Appearance

In DiagramKit.AI, the Predefined Process shape appears as:

  • Dimensions: 160×80 pixels
  • Color: Light blue (#eff6ff)
  • Border: Dark blue (#1e40af)
  • Shape: Rectangle with double vertical lines on sides

Best Practices

✅ Good Usage

[Start]
   ↓
[Get email input]
   ↓
[ValidateEmail(email)]
   ↓
<Valid?>
  ↙    ↘
Yes    No
 ↓      ↓
[Send  [Show
 Email()] error]
  • Use function-style names with parentheses
  • Indicate parameters when relevant
  • Show module names clearly
  • Reference external processes

❌ Avoid

  • ❌ Simple operations: "Add numbers" (use Process)
  • ❌ One-time steps: "Print message" (use Process)
  • ❌ Too vague: "Function" (which function?)
  • ❌ Inline processing (should be reusable)

Common Examples

Example 1: Authentication Flow

[Enter credentials]
   ↓
[ValidateCredentials(username, password)]
   ↓
<Valid?>
  ↙    ↘
Yes    No
 ↓      ↓
[Generate [Show
 Session()] error]

Example 2: Payment Processing

[Checkout]
   ↓
[ValidateCart()]
   ↓
[CalculateTotals()]
   ↓
[ProcessPayment(amount, card)]
   ↓
<Success?>
  ↙      ↘
Yes      No
 ↓        ↓
[Send    [Refund()]
 Receipt()]

Example 3: Data Processing

[Load data]
   ↓
[CleanData()]
   ↓
[TransformData()]
   ↓
[ValidateData()]
   ↓
[SaveToDatabase()]

AI Prompt Tips

add subroutine to validate email
insert predefined process for authentication
create function call to process payment

Related Shapes

Pro Tip: Use Predefined Process when you're calling a reusable function that's defined elsewhere. Use regular Process for one-time operations!