# Workflow Rule Types

YouTrack supports various types of workflow rules. The rule type defines the general conditions that cause the rule to be executed. A rule can be included in an app or in a pure workflow.

When you write a pure workflow in the JavaScript editor, you add modules to the workflow that define each rule. The editor has different templates for each rule type. You can also write custom scripts that let you organize and structure your code. Use custom scripts to define your own functions and objects and use them in other rules and packages.

![The different workflow rule types you can add on the New Module page.](https://resources.jetbrains.com.cn/help/img/youtrack/workflow-module-types.png)

