Open topic with navigation

TIBCO iProcess® Engine 11.10.0

# flag_table

The `flag_table` table provides a locking mechanism which controls access to the four areas of iProcess administrative data - users, lists, roles and TIBCO iProcess® Engine tables. iProcess administrative data is maintained in two sets of tables:

| • | The main system data, which iProcess references during normal operation, is stored in tables without a prefix (for example, user_names or dbs_fields).

| • | A copy of this data, containing users’ edits that have not yet been released for use by the system, is stored in identical tables which have the same name prefixed by `tsys_` (for example, tsys_user_names or tsys_dbs_fields).

The `flag_table` table contains a row for each area of iProcess administrative data, and is used to prevent multiple users from editing the same data at the same time.

When a user edits the data in a particular row (for example, using User Manager to edit user data), the `area_locked` flag is set while editing takes place. On completion of the edit, the `area_locked` flag is cleared. If changes have been made, the `area_changed` flag is set.

When a user requests a Move System Information, the `move_req` flag is set on any rows that have the `area_changed` flag set. When the background process sees a row with `move_req` flagged that is not locked, it locks the area and updates the main system data tables from the `tsys_` tables. When the Move System Information operation completes, all the flags are cleared.

## Structure

The `flag_table` table has the following structure:

    TABLE flag_table (
    	area_id		INTEGER		NOT NULL,
    	area_locked	INTEGER		NOT NULL,
    	area_changed	INTEGER		NOT NULL,
    	move_req	INTEGER		NOT NULL,
    	user_name	VARCHAR(64))

Column | Description
`area_id` | Unique ID of this area of iProcess administrative data: Either Users (`1`), iProcess Tables (`2`), Lists (`3`) or Roles (`4`).
`area_locked` | Flag that defines whether (`1`) or not (`0`) the specified `area_id` is locked. The flag is set by:
| • | an editor (for example, User Manager) when a user is editing the specified area, to prevent other users from editing the same data.
| • | the background process while it is updating the system data, to prevent any users from editing the same data.
`area_changed` | Flag that defines whether (`1`) or not (`0`) the `tsys_` tables for the specified `area_id` contain modified data.
`move_req` | Flag that defines whether (`1`) or not (`0`) the specified `area_id` needs to be updated by a Move System Information operation.
`user_name` | Name of the user currently altering data in the given area, as defined in the user_names table. This is either:
| • | the name of the user doing the editing, or
| • | `swpro` if the background process has the area locked.

## Primary Key

The following primary key is defined for this table.

Key Name | Column(s)
`pk_flag_table` | `area_id`

## Foreign Keys

None.

## Indexes

None.

## Table Activity

The `flag_table` table always contains 4 rows - one row for each area of iProcess administrative data (users, lists, roles and TIBCO iProcess® Engine tables).

The table is populated when the iProcess Engine is installed.

Rows are added, updated and deleted in the following situations.

A row is... | When...
added | never.
updated | either:
| • | a Move System Information operation either starts or completes.
| • | an edit of a data area either starts or completes.
deleted | never.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO iProcess® Engine