# uip rules refresh

> Syntax and options for `uip rules refresh`, which regenerates a Business Rules project's entry points and bindings from its `.dmn` files.

`uip rules refresh` regenerates `entry-points.json` and `bindings_v2.json` from the `.dmn` files at the top level of a Business Rules project. Each entry point keeps the `uniqueId` it already has in `entry-points.json`, so processes and workflows bound to the rule stay bound. Only the files whose content changes are written.

Run it after you edit a `.dmn` file outside Studio Web, before [`uip solution pack`](./uip-solution-pack.md).

## Synopsis

```
uip rules refresh <project-path>
```

## Arguments

| Name | Required | Purpose |
|---|---|---|
| `<project-path>` | yes | Path to the Business Rules project directory. The directory must contain `project.uiproj`. |

## Example

```bash
uip rules refresh ./LoanEligibilitySolution/LoanEligibility
```

## Data shape (--output json)

```json
{
  "Code": "RulesRefresh",
  "Data": {
    "Status": "Updated business rules package files",
    "ProjectPath": "/workspace/LoanEligibilitySolution/LoanEligibility",
    "DmnFiles": ["Business rule.dmn"],
    "WrittenFiles": ["entry-points.json"],
    "UnchangedFiles": ["bindings_v2.json"]
  }
}
```

`Status` is `Business rules package files are up to date` when no file needed rewriting.

## Exit codes

Refer to [Exit codes](./exit-codes.md) for the shared contract. The command exits `1` in these cases:

| Condition | `ErrorCode` |
|---|---|
| The project has no `.dmn` file at its top level. | `not_found` |
| A `.dmn` file cannot be read. No file is written. | `invalid_argument` |

## Related commands

- [`uip rules validate`](./uip-rules-validate.md) reports `RULES_ENTRY_POINTS_STALE` when `entry-points.json` needs a refresh.
- [`uip solution pack`](./uip-solution-pack.md) packs the solution after the refresh.

## See also

- [`uip rules`](./uip-rules.md) for the tool overview and project layout.
