Skip to content

JavaScriptΒΆ

The business entity, JavaScript is used to create and manage the JavaScript files.

You can create new JavaScript files based on the requirements and then associate them with the platform based on the business requirement.

Viewing JavaScriptΒΆ

The javascript entity associated with each flow will appear within that flow.

  1. Navigate to App Studio > Applications - open application name > Process Flow - process flow name > Open.
  2. Click JavaScript on the left side panel for viewing the JavaScript entities for the flow module.

    JavaScript entity and details

Creating New JavaScriptΒΆ

  1. Navigate to App Studio > Applications - open application name > Process Flow - process flow name > Open.
  2. Click JavaScript. The JavaScript entity list appears.

    Creating a new JavaScript entity

  3. Click +Create New. The Info Actions panel appears as Create JavaScript.

  4. Enter the Basic details in the Create JavaScript panel as explained below.

    Field Description
    Name* Enter the name of the JavaScript entity.
    Character limit: 50.
    Data type: Alphanumeric and underscore.
    Scope* The scope of an entity is always local as the entities are created at the flow level.
    Javascript File Uploads the required JavaScript file (.JS file).
    - Click inside the dotted box. The browser window opens.
    - Select the javascript file as per your requirement (or you can drag a .JS file and drop it into the box).
    .JS file
    - Click Download to download the JavaScript file.
    - Click Remove to remove the mapping of the JavaScript file.
    Description Enter a description for the JavaScript file.
  5. Click Create. JavaScript entity with the provided details is created.

Viewing and Editing JavaScriptΒΆ

Make sure to unlock the application before editing if you want to edit the details of an entity that is not created by you.

  1. Navigate to App Studio > Applications - open application name > Process Flow - process flow name > Open.
  2. Click JavaScript. The JavaScript entity list appears.
  3. Click the JavaScript card for viewing the details of the selected JavaScript entity. The details of the JavaScript appear in the Info Actions panel (Edit JavaScript).

    Viewing and editing JavaScript

  4. Edit the JavaScript details as needed.

!!! note
If you upload a new JavaScript file, you need to deploy the process flow for updating the JavaScript file.

  1. Click Save.

Viewing JavaScript AssociationsΒΆ

  1. Navigate to App Studio > Applications - open application name > Process Flow - process flow name > Open.
  2. Click JavaScript. The JavaScript entity list appears.
  3. Hover over any JavaScript entity card. Three dots appear on the upper right side of the card.
  4. Click the three dots. More Actions appear.

    Viewing associations

  5. Click Associations. The association of the JavaScript entity with the application, flow modules and activities are displayed in a pop-up.

    JavaScript associations

    • Application - The application in which the JavaScript entity is utilized.
    • Flow - The flow in which JavaScript is utilized.
    • Activity/Entity - The entity or activity name in which JavaScript is utilized.
    • Type - The type of entity or activity.

Duplicating JavaScriptΒΆ

Make sure to unlock the application before duplicating an entity that is not created by you. When you duplicate a JavaScript entity, the associations are not duplicated.

  1. Navigate to App Studio > Applications - open application name > Process Flow - process flow name > Open.
  2. Click JavaScript.
  3. Click a JavaScript entity. The JavaScript entity list appears.
  4. Hover over any JavaScript entity card. Three dots appear on the upper right side of the card.
  5. Click the three dots. More Actions appear.

    Duplicating JavaScript entity

  6. Click Duplicate. A confirmation pop-up appears.

    Duplicate confirmation

  7. Click Ok for duplicating the JavaScript entity (or you can click Cancel to cancel the duplicate action). A Success message appears on the successful duplication of the JavaScript.

    Duplicate success message

  8. Click Ok. A duplicate copy of the JavaScript entity appears on the JavaScript page with the same name suffixed with β€œ_copied”.

    The duplicated JavaScript entity

Deleting JavaScriptΒΆ

Make sure to unlock the application before deleting an entity that is not created by you. Also, you cannot delete the entity if it is associate with any activity.

  1. Navigate to App Studio > Applications - open application name > Process Flow - process flow name > Open.
  2. Click JavaScript. The JavaScript entity list appears.
  3. Click the JavaScript name card that is to be deleted. The lower-right of the page displays Delete.

    Deleting JavaScript entity

  4. Click Delete. A Confirmation pop-up for delete appears.

    JavaScript Entity delete confirmation

  5. Click Ok for deleting the JavaScript entity.
    Or
    Click Cancel to cancel the action.

Alternatively, you can follow the below steps to delete the JavaScript entity:

  1. Click the Burger menu and navigate to App Studio > Application > {Process flow} > JavaScript.
  2. Hover over the JavaScript card. Three dots appear on the upper right side of the card.
  3. Click the three dots. More Actions appear.
  4. Click Delete and follow step 5 in the above procedure.

    Delete action in More Actions

Utilizing JavaScript EntityΒΆ

Mapping JavaScript Files in FormsΒΆ

You can map the entity, JavaScript to the Forms.

  1. Navigate to App Studio > Applications - open application name > Process Flow - process flow name > Open.
  2. Navigate to the entity, Forms.
  3. Click Create Form (you can select Form type as Custom JSP or HTML).

Mapping JavaScript file to the Form

  1. Upload the JavaScript file that you created through the JavaScript entity.