# Epicor BPM Data Directives and the Workflow Designer: When to Use Each, With an Example

> Source: https://netray.co/erp-help/epicor-bpm-data-directive-vs-workflow-designer-worked-example
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

Searches for an Epicor BPM data form usually mean the Data Directive, which fires when a table row is added, updated or deleted, designed on the BPM Workflow Designer canvas. A Method Directive fires around a business object method such as Update or GetNew. Use a Data Directive for rules about the data itself and a Method Directive for rules about the action.

## Kind

how-to

## System

epicor

## Erp

Epicor Kinetic

## Module

BPM / Data Directives / Workflow Designer

## Query

epicor bpm data form

## Alternate Queries

- epicor bpm data form designer
- epicor bpm workflow designer
- epicor bpm form

## Applies To

Epicor Kinetic and Epicor ERP 10 Business Process Management; directive types and designer layout can differ slightly by version

## Steps

### How to build a data directive in the Workflow Designer

**Items:**

- Open BPM Directive Maintenance from the menu and choose New Directive, then select Data Directive.
- Pick the table the directive applies to, for example Part, and choose the trigger such as a row being added or updated.
- Open the Workflow Designer for the directive; the start shape represents the trigger.
- Add condition shapes, for example a check that a field is empty, and connect the true and false paths.
- On the path that needs action, add an action such as Raise Exception, Set Field, Send Email or a Custom Code block.
- Save, set the directive to Enabled and Group or company as needed, and run a test update that should be blocked.
- Review the BPM Audit log or exception message, and then promote the directive to production using export and import.

## Sections

### Data directive versus method directive

**Body:**

A Data Directive is tied to a table. It reacts to row changes, regardless of which program made them, so a rule such as a product code is required on every part holds for Part Maintenance, DMT, REST calls and integrations. This is its main advantage for data integrity.

A Method Directive is tied to a method of a business object, such as Update on Part or SubmitForApproval. It runs before or after the method, or in place of base processing, and sees the whole dataset passed to the method. Use it for rules that depend on what the user did rather than what the data became, and for adding behavior after a specific action.

### The Workflow Designer canvas

**Body:**

The Workflow Designer is the visual editor for the logic of a directive. You place shapes for conditions and actions, connect them and set properties on each. For complex logic, a Custom Code block lets you write C# against the dataset, and Epicor Functions allow you to call shared logic.

Keep the canvas simple. One directive with a short chain of conditions is easier to support than a large tree. Name shapes meaningfully, and put long logic in a function so it can be tested and reused.

### Worked example: block a part without a product code

**Body:**

Create a Data Directive on the Part table triggered when a row is added or updated. Add a condition that tests whether ProdCode is blank. On the true path add a Raise Exception action with a clear message, such as Product code is required. The save is rejected for every entry route, including imports.

Test with Part Maintenance and with a DMT load of one row. If you only want the rule for new parts, restrict the condition to added rows. If the rule must not block system processes, add a condition on the user or the calling program.

## Pitfalls

- Building a method directive for a data rule, so imports and APIs bypass it.
- Using a data directive to do heavy work on every update of a busy table.
- Raising generic exception messages that do not tell the user what to fix.
- Leaving directives enabled in the wrong company or group.
- Editing production directives directly instead of promoting from test.

## Ai Angle

An assistant grounded in your BPM definitions can list which directives fire on a table, in what order, and which one raised a given exception message, which is the usual starting point when users report a blocked save. It reads definitions and logs and leaves changes to your developers.

## Faq

### What is an Epicor BPM data form?

**Answer:** There is no separate object by that name in common use. People usually mean the Data Directive, a BPM rule triggered by changes to a table, built in the BPM Workflow Designer.

### When should I use a data directive instead of a method directive?

**Answer:** Use a data directive when the rule is about the data and must hold for every entry route. Use a method directive when the rule depends on a specific action or method call.

### Can a data directive stop a DMT import?

**Answer:** Yes, because the directive fires on the table change, whichever program causes it. Raised exceptions reject the row and appear in the import results.

### Can I write code in the Workflow Designer?

**Answer:** Yes. A Custom Code block accepts C# and can access the dataset for the directive. For reusable logic, call an Epicor Function.

## Search terms

epicor bpm data form, epicor bpm data directive, epicor bpm workflow designer, epicor bpm form, epicor data directive example, epicor bpm raise exception, epicor bpm data directive vs method directive, epicor bpm custom code block

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
