Skip to main content

Bootstrap

The CETA platform can extend itself using forms, pages, and flows. These extensions can be injected at the project level or the PBC level by adding menu items to utilize the extended functionalities.

1. Locate the CETA Project

https://ceta-dev.test.bizops.com.cn/icp-ui/center/project/-1/pbc is the access path. Replace https://ceta-dev.test.bizops.com.cn with the corresponding environment's host, and -1 is the projectId for CETA.

Path

2. Forms

  1. Forms must be checked as master data with the data type set to CETA Mate Data Security Level - Project.
  2. There must be a Single Line Text type InputField with the ID projectId, and its default value should be :params.projectIdFormEntity
  3. If extending functionality for a PBC, you can use :params.pbcId in the default value to obtain the pbcId from the URL path parameters.

3.Page

  1. If there is a "New" button, after selecting the form in the "Form" tab, switch to the "Custom" tab and prefix the link address with ./../../, for example, ./../../form/project-form/layout/default. Page
  2. If the Table has a "View" or "Edit" button, configure the link address similarly by adding the ./../../ prefix.
  3. If the Page is for a project-level menu and contains only one Table, it is recommended to set the Table height to calc(100vh - var(--app-header-height) - var(--pbcm-main-head-height) - var(--assume-project-level1-tabs-height) - var(--pbcm-button-bar)).
  4. If the Page is for a project sub-menu and contains one Tab Group and one Table, it is recommended to embed these two components into a Vertical Stack. Set the style height of the Vertical Stack to calc(100vh - var(--app-header-height) - var(--pbcm-main-head-height) - var(--assume-project-level1-tabs-height) - var(--pbcm-button-bar)), set the style of the Tab Group to flex: 0 (occupying fixed space), and set the style of the Table to flex: 1 (filling the remaining space).
  5. Configure buttons to hide based on project permissions. In the button configuration, use :context.projectReadonly to determine if the button should be hidden.

4. Flow

  1. If the Flow node type is Form (form operations: create, edit; approval operations: approve), the permissions are configured the same as in 2. Forms.

  2. If it is a Rest Flow, an SDK must be added to check user project permissions. The input and output parameters of the SDK are as follows:

    Input Parameters:

    • User ID: Obtain using $CURRENT_USER.id.
    • Application ID: Passed through the REST request parameters, for example: /flow/api/flow-rest/rest-flow-permission?projectId=:params.projectId. You can obtain projectId using $1.restTrigger.requestParams.projectId.
    • Permission Type: view / edit / owner, representing read-only, edit, and full permissions, respectively.

    Output Parameters:

    • hasPermission: true or false, where true indicates permission.

Check user project permission

5. Project Data Isolation

  1. For project-level data isolation, configure projectId ==:params.projectId, which is mandatory.
  2. For PBC-level data isolation in addition to project-level isolation, add the configuration pbcId=:params.pbcId.

Example:

Data isolation

6. Menu Configuration

6.1 Configure the Corresponding Menu Level

  1. Application is at the project level. You can choose the insertion position; if not selected, it will be appended to the end.
  2. Component is at the PBC level.Menu level

6.2 Effect of Menu Configuration

1.Application:

Project menu

2.Component:

Pbc menu