# Workflow

## Customizing

### Customizing Folders

#### Using folders for entities and folder types

The adaptation of folders to company-specific conditions are useful for:

- Integrating new, customer-specific entities (e.g. entity name "ENTITY", ID "APP")
- Extension by a customer specifictype (e.g. folder type "TYPE', ID "XYZ")

To avoid interference with the existing data model and existing userexits, please observe the following topics:

#### Existing definitions

The following definitions were made by Agile Software:

Folder Master Table

Entity | Table | List | Form
EDB-PACKET | T_PAC_DAT | EDB-PAC-SLI | EDB-PAC-SFR

Folder Entity Relation

The following entity-specific n:m relations with the unique view "MUL" were defined:

Entity | View | Table | Ref-List | Agg-List
EDB-PROJECT | MUL | T_PAC_MUL | EDB-PAC-PRO-RLI | EDB-PAC-PRO-ALI
EDB-ARTICLE | MUL | T_PAC_MUL | EDB-PAC-ART-RLI | EDB-PAC-ART-ALI
EDB-DOCUMENT | MUL | T_PAC_MUL | EDB-PAC-DOC-RLI | EDB-PAC-DOC-ALI
EDB-FILE | MUL | T_PAC_MUL | EDB-PAC-FIL-RLI | EDB-PAC-FIL-ALI

Elements (data records) from the following entities can be used for the folder:

- Projects (EDB-PROJECT)
- Items (EDB-ARTICLE)
- Documents (EDB-DOCUMENT)
- Files (EDB-FILE)

All elements of a folder are saved based on the reference table T_PAC_MUL.

Customer-specific extensions

Folders can be extended customer-specific in two ways:

- Adding another Folder - Entity - Relation

  This enables the allocation of data records of other entities than projects, items, documents and files.

- Definition of specific folder types

  The definition of a specific folder type defines application-specific attributes for folders and all entered elements.

Adding another Folder - Entity - Relation

Besides the Folder - Entity - Relations, relations to other customer-specific entities can be defined.

For the existing entity EDB-PACKET the following entry must be contained in the list of the entity relation:

Entity | View | Table | Ref-List | Agg-List
ENTITY | MUL | T_PAC_MUL | EDB-PAC-APP-RLI | EDB-PAC-APP-ALI

Make sure to use a unique view name "MUL" and a unique three-digit application entity ID "APP" in the mask name!

The Refine Reference List EDB-PAC-APP-RLI must be created with the same mask and field userexits as used in the reference lists (e.g. EDB-PAC-ART-RLI). Please observe eventually existing mask-specific field defaults.

The Aggregate Reference List EDB-PAC-APP-ALI is only required if you want to check the usage of an element of the entity ENTITY in a folder.

Further extensions are required in Selections and Menus:

- The existing selection menu EDB-PAC-REL-SET must be extended by a new selection "EDB-CRM-PAC-REL-APP" for a new entity.
- The existing selection menu EDB-PAC-MUL-CHO-ENT must be extended by a new selection "MUL_ENTITY' for the additional entities.

Following entries must be added to the Userexit control (USX-Toolbox) for these entities:

- For going to the entity-specific selection list automatically when inserting in folders, an entry MCR_ENTITY must be defined analog to the existing ones.
- For transferring the entity-specific attributes to calculated common attributes, each attribute requires the entry MUL_ENTITY analog to the existing ones.

Please note, that Agile e6 must be restarted after changes in the Userexit control so that the changes come into effect.

Definition of specific folder types

The definition of a specific folder type is useful when application-specific attributes are required to describe a folder (the entry in EDB-PACKET) or the elements in a folder.

Example:

The folder is the basis to collect documents for a plot order. This requires additional attributes for the folder (which is the plot order) and for the documents contained in the order. As these attributes are only used for the plot order, it is better to define your own folder type instead of adding attributes to the standard.

To define a new folder type, enter the following information in the list of types for the existing entity EDB-PACKET:

Type | Table | List | Form
TYP | T_PAC_XYZ | EDB-PAC-XYZ-TLI | EDB-PAC-XYZ-TFR

Besides the application-specific attributes, the table T_PAC_XYZ_MUL needs the same attributes as the table T_PAC_MUL:

- I_ORDNO
- POS_NO
- C_ENTITY
- MUL_DUMMY
- ACT_REF
- NTM_REF
- RES_REF

It is also necessary to define type-specific relations for relations required by the application (e.g. plot orders require documents):

Entity | View | Table | Ref-List | Agg-List
EDB-PROJECT | XYZ | T_PAC_XYZ_MUL | EDB-PAC-PRO-XYZ-RLI | EDB-PAC-PRO-XYZ-ALI
EDB-ARTICLE | XYZ | T_PAC_XYZ_MUL | EDB-PAC-ART-XYZ-RLI | EDB-PAC-ART-XYZ-ALI
EDB-DOCUMENT | XYZ | T_PAC_XYZ_MUL | EDB-PAC-DOC-XYZ-RLI | EDB-PAC-DOC-XYZ-ALI
EDB-FILE | XYZ | T_PAC_XYZ_MUL | EDB-PAC-FIL-XYZ-RLI | EDB-PAC-FIL-XYZ-ALI
ENTITY | XYZ | T_PAC_XYZ_MUL | EDB-PAC-APP-XYZ-RLI | EDB-PAC-APP-XYZ-ALI

Make sure to use a three-character type-specific view name "XYZ"!

When extending the folder by additional entity relations, make sure to use a unique, three-character application entity Id "APP" in the mask name!

The refine relation list(s) must be created analog to the existing relation lists of the usual folder (e.g. EDB-PAC-ART-RLI). Please observe existing mask-specific field defaults.

Enter the following mask userexits, different from the existing relation lists:

- Edit-Action-Userexit: xrel_edt_act
- Pre-Action-Userexit: xrel_ref_xba

The Aggregate Relation List(s) are only required when testing the usage of an element of the respective entity for this folder type.

Analog to the existing standard multi list EDB-PAC-MUL-RL, create the type-specific mufti list EDB-PAC-MUL-XYZ-RLI for these folders. Please observe existing mask-specific field defaults.

Enter the following mask userexits, different from the existing standard multi list:

- Pre-Mask-Userexit: LIST xrel_set_rel(ENTITY) & xrel_upd_mul

whereas enter the name of the respective entity used in this folder type for ENTITY.

Last, copy the existing entries (Userexit ''MCR% l MUL%", Mask name "EDB-PAC-MUL-RLI") for the multi list EDB-PAC-MUL-XYZ-RLI of the new folder type in the Userexit control (USX-Toolbox).

### Customizing Work Items

It is not possible to customize the mask EDB-WFL-Template to e.g. a combined form with tabs, but it is possible to add further fields to the template which are then automatically generated. Problems may occur with the layout of the template (size, structure) since this varies with the usage of the template (via work order/ work request or started directly, with or without process variables). These variations take place automatically and can't be affected by the user. The free places wich are not concerned must be searched.
Furthermore, it is possible to write pre-mask triggers and copy them to the already existing templates which are also generated. The already existing triggers mustn't be removed or changed. Therefore, it is conceivable to create a link to a self-defined mask (customized) in an additional, self-defined field, whereas the content of the field is only filled by the pre-mask trigger of the template. A prerequesite to use triggers at the mask EDB-WFL-TEMPLATE is the adaption of the Business Service configuration file ABS_<environment>.ini.
In the masks derived from EDB-WFL-Template wdh_upd_lis userexits are executed implicitly. Entering an own userexit, the wdh_upd_lis userexit has to be executed explicitly behind it.