Program Elements
What is a Program Element?
Program Elements are user-created NLPs to perform a specific task.
Why do we need a Program Element?
FireFlink provides an extensive number of NLPs. But, at times, the user might need extra NLP to perform some tasks. In such a case, the user needs to create the NLP’s as per their need. FireFlink provides you the option to create your NLP’s.
Create Program Element
In this section, we will cover the basics of program Element creation. Here, we will be explaining how to create a Program Element.
Prerequisites
- To create a Program Element, at least one Package should be available.
- Familiarity with Programming Languages to create Program Elements.
Navigation
Login >> Repository >> Program Elements
Steps to create a Package
Once you log into the FireFlink, you will see a Project searchable dropdown. From the dropdown select the project you had previously created or the project which is allocated for you. In the left navigation menu, click on the Repository menu and click on the Program Elements tab. You will land on the Package Tree Page.
The container for Program Elements is Package. You should create the required Program Element under Packages. You cannot create Program Elements until you create at least one Package.
1. To create a Package, click on the “+ Package” button. Initially, when you have not created any Package, the “+ Package” button is provided at the center of the screen, as shown below.
2) Now Create Package pop-up appears as shown below.
3) Enter valid data into the Name and description text field. The Name text field and Parent Package dropdown are mandatory. If you are creating a Package for the first time, the Root Package is selected by default in the Parent Package searchable dropdown. In case you have already created packages, you need to select the parent Package. Then click on the create button Package and it will be created. You can see the Package created successfully banner message.
4) The created Package will appear on the Root Package Screen. A table is provided under the program element tab, similar to the screen below.
Steps to create sub-package
1. To create a sub-package, you can hover the mouse on the package “+” icon that appears beside the package. Click on the “+” icon” and it will display the “Add Package “, and “Add Program Element” options.
2. Now click on the Add-Package option. A Create Package popup appears as shown below.
3) Enter valid data into the Name and description text field. The Name text field and Parent Package dropdown are mandatory. The package on which the user hovers will be selected under the Parent Package dropdown by default. This is disabled. Click on the create button. The sub-package is created under the selected parent package. You can see the Package created successfully with a notable message.
Note:
- Users cannot create multiple packages with the same name under the same parent package.
Steps to create Program Element
1. To create a “Program Element”, click on the “+ Program Element” button as shown below. The “+ Program Element” button is disabled when there are no created packages.
2. Then the ‘Create Program Element’ page appears as shown below.
3. Enter valid data into the Class Name, NLP Description, Pass Message, and Fail Message text fields. Here, the Class Name text field, NLP Description text field, Pass Message, and Fail Message text field are mandatory fields.
4. When you enter text into the NLP Description that will be populating in the pass message and fail message text field, you can edit at your convenience. This passes messages and the failure message is displayed while executing the script.
5. Select Parent Package under which package you want to create the Program Element. This is a mandatory field.
6. Hover the mouse on the package. Click on the “+” icon beside the package and select Add Program Element Option. It will display the created Program Element page as shown below. The package on which the user hovers will be selected under the Parent Package dropdown by default and it will be disabled.
7. In the editor you can see the default code present. You can write the code in the editor based on your needs.
8. The name in the Class Name text field, class name in the editor, and component value in the editor should be the same. If it is not the same, that displays the message as the Class Name value is not matching with the given class name.
9. After writing the code along with filling the mandatory fields with valid data click on the Create button.
10. When clicked on the Create button, the code in the editor is compiled and saved. If the compilation is successful without any errors, the Program Element is created. You can see the Program Element created successfully with a banner message.
11. When clicking on the “Create button”, the code in the editor will get compiled and saved. If the compilation fails, then the display compilation errors are in the Console text area, and the program element is not created.
12. When clicking on the Clear button, the compilation error will be cleared from the console. You can edit the code in the editor. Once the code is error-free, you can click on the Create button, and the code is compiled. If the compilation is successful without errors, the program element is created under the selected package. You can see the Program Element created successfully with a banner message.
- You can’t create multiple program elements with the same class name under the same parent package.
- You can’t create multiple program elements with the same NLP description under the same parent package.
Note 1: If the user writes a code that doesn’t support default jars that are in the FireFlink product, then the user has to import the jars in the Externally Library section.
Note 2: In Create Program Element popup users can create Global and Project Environment variables by clicking on the “+ Variable” button. The created Variables are stored in the Variables section.
Note 3: You can also use Global and Project Environment variables in the editor using the “$” symbol.
Table details which are under the program elements tab:
- Package: This column contains all the created packages, sub-packages, root packages, and program element names.
- Modified by: This column by default displays the username who has created the package or program element. If the column is modified, the column then displays the username who has recently modified the package or program element.
- Actions:
1. When the user hovers the mouse on the root package or packages under this column, it displays Edit, Deletes & More menu icons.
2. When the user hovers the mouse on the program Elements under this column, it displays Impact List, Edit, Delete & More menu icons.
Edit, Delete & Details of Package:
When you hover the mouse on Package under the Action column, it will display Edit, Delete & More menu icons, as shown below. The Edit and Delete icons are disabled for the root package.
1. Edit Package
To edit the package, click on the Edit icon under the action column. Edit Package popup appears, as shown below.
Edit the required information on fields and click on the Update button. You can see the Edited successfully banner message.
Note:
- You cannot change the parent package while editing the package.
- You cannot edit the Root Package.
2. Delete Package
To delete the package, you have to click on the Delete icon under Actions Column. A “Warning Delete popup” appears as shown below.
Click on the Delete button and the package is deleted. The Deleted successfully banner message will be displayed.
Note:
- You cannot delete the package if the package contains only sub-packages.
- You cannot delete the package if the package contains only program elements.
- You cannot delete the package if the package contains both sub-package and program elements.
- You cannot delete the root package.
3. Package Details
To view the details of the package, click on the More menu icon under the actions column. It will display Details & History options, as shown below.
Click on the details option. A Package Details popup displays, as shown below.
You can view details for the Root package by clicking on the details option as well. The Root package displays the details popup, as shown below.
Attributes of package details popup:
In the package details popup, all the attribute values are non-editable.
- Name: This attribute displays the Name of the package which is given while creating the package. If you have updated the package name, it displays the updated package name.
For the root package, the display name is Root Package. - Description: This attribute displays the description which is given while creating the package. It displays a one-line description when hovered with a mouse; this display has a complete description in the tooltip.
While creating the package, if the description is not given, it will display as “–”.
For the Root package, it will display the description as “–”. - Project Name: This attribute displays the project name under which the project package is created.
- Path: This attribute displays the path of the package.
Ex: The login package contains the home package. In the home package, the popup displays the path as login/home.
For the root package, the display path is “Root Package”. - Total Packages: This attributes displays the aggregated count of sub-packages that the package has.
- Total Program Elements: This attribute displays the aggregated count of program elements that the package has.
- Created by: This attribute displays the username who has created the package. For the root package, the display is- Created by N/A.
- Created On: This attribute displays the Date & Time on which the package was created. For the root package, the display is- Created On N/A.
- Modified by: This attribute displays the username who recently modified the package. For the root package, the display is- Modified N/A.
- Modified On: This attribute displays the Date & Time on which the package was recently modified.
Edit, Delete, Impact List & details of Program Element:
When you hover the mouse Program Element under the Action column, it will display Edit, Delete, Impact list & More menu icons, as shown below.
1. Edit Program Element
- To edit Program Element, you have to hover the mouse on Program Element under the action column. It will display the Edit icon.
- Click on the Edit icon. Edit the Program Element pop-up that appears, as shown below.
- Edit the required information on fields and click on the update button. The code is compiled. If the code is error-free, the program element gets updated and you can see the Program element edited successfully banner message.
- Edit the required information on fields and click on the update button. The code in the editor is compiled. If the code has some errors, it displays errors in the Console text area. When clicking on the Clear button error, it will be cleared from the console. You can edit the code in the editor. Once the code is error-free if you click on the Update button. The code will be compiled and the program element is created under the selected package. You can see the Program Element edited successfully banner message.
- You cannot edit the parent package. The Parent package dropdown is disabled.
Note: In the Edit Program Element popup user can create Global and Project Environment variables by clicking on the “+ Variable” button. The created Variables are stored in the Variables section.
- You cannot edit the parent package. The Parent package dropdown is disabled.
2. Delete Program Element
To delete the Program Element, you have to click on the Delete icon for the Program Element under Actions Column. A warning Delete popup appears, as shown below.
When clicked on the Delete button, the Program Element gets deleted. You can see the deleted successful banner message.
3. Program Element Details
Users can view the program element details in two ways:
First way:
- To view the details of the Program Element, click on the More menu icon under the actions column. This will display Details & History options, as shown below.
- Click on the details option. The Program Element Details popup displays, as shown below. Here, you can view the details of the Program Element.
Second way
- Another way to view the details of the Program element is when you single click on the Program Element name you will land on the Program Elements Details Page, as shown below.
Attributes of Program Element details popup/page:s
In Program Element details, all the attribute values are non-editable.
- Class Name: This attribute displays the class name which is given while creating the Program Element. If you have updated the class name, it displays the updated Program Element name.
- NLP Description: This attribute displays the NLP description which is given while creating the Program Element. It displays a one-line description. When hovered with the mouse, it displays a complete NLP description in the tooltip.
- Project Name: This attribute displays the project name under which the project Program Element is created.
- Path: This attribute displays the path of the Program Element.
Ex: The login package contains Save Program Element in Save Program Element. The details popup displays the path as login/Save. - Created by: This attribute displays the username who has created the Program Element.
- Created On: This attribute displays the Date & Time on which the Program Element was created.
- Modified by: This attribute displays the username who recently modified the Program Element.
- Modified On: This attribute displays the Date & Time on which the Program Element got was recently modified.
- Editor: The editor displays the code that is written while creating the program element. If the user has updated the code, then it will display the updated code.
4. Impact List of Program Element
When the user hovers the mouse on <<program element name>> and clicks on the Impact List option under the Action column, it displays Scripts and Steps Groups as options, as shown below.
If you single-click on Package, then you will be navigating to a new package under the same tab and the content as shown below.