This tutorial will concentrate on data authoring scenarios to enhance the interactions between business users and your application.

Learning outcomes

Learning track

This tutorial is the fifth unit of the Data Authoring track. Make sure to complete the first four units before starting this tutorial:

If you have not completed these prerequisites, return to the Tutorials menu.

GO TO TUTORIALS

Also, if you have not already done so, click the button below to download resources such as the images and data sets that will be used within this tutorial.

DOWNLOAD TUTORIAL RESOURCES

Steppers are started when users perform a Create, Edit, Copy, Import, or Mass-Update action. They define a wizard-like sequence of steps that drive the user through an authoring operation.

Actions are grouped in action sets and appear in a business view's Options menu. They allow a user to perform an action on one or more records.

Actions can be enabled or disabled depending on the selected data.

Next, you will:

We will change the EmployeeForm form and the AuthorEmployee stepper to add support for creating education records in the same activity.

Modify the Employee form

  1. In the Application Builder, open the HRTutorial model.
  2. Navigate to Entities > Employee > Forms in the Model Design view and then double-click EmployeeForm.

  1. Select the EndDate form field in the tree view. In the General section of the Properties view, from the Authoring Mode drop-down list select force-read-only.

Modify the Employee stepper

You will now modify the Employee stepper to:

  1. In the Employee entity, expand the Steppers node and double-click the AuthorEmployees stepper.

  1. In the Steps tree table, select the ContactInfo step.
  2. In the Name and Definition finger tab of the Properties view, deselect the Enable Finish checkbox.

  1. In the Steps tree table, select the HR step.
  2. Select the Reference Selection finger tab in the Properties view and click the Refresh References button to make the FDN_Manager reference appear in the table.

  1. Select the FDN_Manager reference in the table and then click the Edit Expression button in the Picker Filter column.

  1. Enter the following expression in the SemQL Editor and click OK.
(Record.FID_Department is null)
OR (Record.FID_Department = Referenced.FID_Department)

  1. Select the first row in the Steps tree list and click the Add Collection Step button.

  1. Enter the following values and click Next:

  1. Select the EducationForm > Education form container, and then click Finish.

  1. Select the On Parent Create finger tab in the Properties view.
  2. Select Skip To Child Creation On Parent Create.

  1. Apply on data change all the validations defined for the Education entity:

  1. Make the same validations blocking for this step:

  1. In the Stepper editor, scroll down to the Validations section.
  2. Select all validations for the Education entity, right-click the selection, and then select Block.

  1. Save your work.

Deploy the model changes

  1. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and then select Validate.
    The validation report should raise no error.

  1. Go to the Management perspective of the Application Builder.

  1. Right-click the EmployeeTutorial data location and select Deploy Model Edition.

  1. Click Finish in the wizard to deploy your model changes.

Create an employee with the new stepper

We are going to create a new employee to see the new stepper.

  1. Open your application from the Welcome page.

  1. In the navigation drawer, select Employees.
  2. In the Options menu, click Create.

  1. Observe that the stepper has one additional step to author the Education records.

  1. Enter the new employee information and click Next:

  1. Enter the following information for the HR step and then click Next:

  1. Create a first Education record and then click Add another:

  1. Enter the following details for the second education record and then click Go to list:

  1. The process of authoring a new employee is now finished. Click Finish.

  1. When the toaster on the bottom left corner of the screen indicates "Changes successfully applied," click Click to refresh.

  1. Click the Filter button above the Employees collection to open the filter panel.
  2. Type cameron in the Search Text field, and then click Apply.

  1. Select the record and observe the updated browsing form showing the education records.

Congratulations!

You have optimized your data authoring user experience by customizing the Employee form and stepper to support the creation of Education records.

Next, you will create a new form and stepper to cover another use case.

You are now going to design a straightforward use case for contract termination. The goal is to introduce a new action called Terminate Contract when selecting an employee. The action should be disabled when an employee already has an end date.

You will:

Create the contract termination form

To get started, you need to create the ContractTerminationForm form that focuses primarily on setting an end date for an employee.

  1. In the Application Builder, expand the Entities > Employee > Forms node.
  2. Right-click the EmployeeBrowsingForm and click Duplicate.

  1. Double-click EmployeeBrowsingForm2 in the Model Design view. Select the Overview tab of the editor, and set the Name to ContractTerminationForm.

  1. Select the form tab of the editor.
  2. Expand the first form container in the General form tab.
  3. Select the FormCollection: Education in the tree view and click the Delete selection button.

  1. Confirm the deletion.
  2. Drag the Add Form Section button and and drop it into the first container of the General form tab.

  1. Select the form section you just added.
  2. In the Properties view, enter the following values:

  1. Drag the EndDate attribute and and drop it from the Attributes list into the TerminateContract form section.

  1. Select the EndDate field in the tree view and in the General section of the Properties view. Make sure the Component Type is set to Date Picker.

  1. Drag the HireDate attribute and drop it into the TerminateContract section, below the EndDate field.

  1. Select the HireDate form field in the tree view and in the General section of the Properties view:

  1. Expand the third container within the General form tab. Drag and drop the FDN_Department field into the TerminateContract section, after the HireDate field.

  1. Select the FDN_Department form field.

  1. Drag the FDN_Manager form field from the Contact form tab and drop it into the TerminateContract section, after FDN_Department.

  1. Select the FDN_Manager form field and in the General section of the Properties view, in the Authoring Mode drop-down list, select force-read-only.

  1. Drag and drop the second form container after the TerminateContract section.

  1. Expand the container you just moved.
  2. Drag the ID form field and drop it above the Name field.

  1. Select the Subsidiary form field in the tree view and in the General section of the Properties view, in the Authoring Mode drop-down list, select force-read-only.

  1. Delete the Hired and Ended fields.

  1. Select the second container within the General form tab. Empty the Relative Width property in the Properties view.

  1. Select the Picture form field. In the General section of the Properties view, in the Authoring Mode drop-down list, select force-read-only.

  1. Delete the Contact form tab.

  1. Save your work.

Your form is complete and ready to be used in a stepper.

Create the contract termination stepper

It is now time to create the TerminateContractStepper stepper that will use the ContractTerminationForm form you have just designed.

The stepper will contain a single step with a minimum set of validations enabled.

  1. Expand the Entities > Employee node.
  2. Right-click the Steppers node and select Add Stepper.

  1. Enter the following values and click Next:

  1. Select the General tab of the ContractTerminationForm form you created earlier and click Finish.

  1. Select the General step in the Steps tree table.
  2. In the Properties view, open the Form Validations finger tab, and select On Data Change for the CheckEndDate validation.

  1. In the Step Transition Validations finger tab, right-click the CheckEndDate validation, and select Block.

  1. Save your work.

Your stepper is complete. You can now trigger it with an action.

Create the Terminate Contract conditional action

You will now create the Terminate Contract action in the EmployeeActionSet actions, and link it to the TerminateContractStepper stepper.

  1. Expand the Entities > Employee > Action Sets node and double-click the EmployeeActionSet.

  1. Click the Add Action button in the editor.

  1. Enter the following values in the wizard and click Finish:

  1. In the Actions list, select the EditTerminateContractStepper action and use the Move Up button to move it between EditAuthorEmployees and MassUpdateAuthorEmployees.

  1. Set the Label to Terminate Contract.

  1. In the Name and Definition finger tab of the Properties view, set the Icon property to images://mdi/calendar-remove.svg.
  2. In the Action Configuration finger tab, click the Edit Expression button next to the Condition property.

  1. Add the following SemQL Condition and click OK:
EndDate is null

  1. Save your work.

Validate and deploy your changes

  1. In the Application Builder, right-click the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and then select Validate.
    The validation report should raise no error.

  1. Go to the Management perspective in the Application Builder.

  1. Right-click on the EmployeeTutorial data location and select Deploy Model Edition.

  1. Click Finish in the wizard to deploy your model changes.

You are now ready to see your changes.

See your changes in the application

  1. Open your application from the Welcome page.

  1. In the navigation drawer, select the Employees business view.

  1. Search for consultants: click the Filter button, type consult in the Search Text field, and click Apply.
  2. Select Jack Livingston and open the Options menu.
  3. Notice that the Terminate Contract action is disabled because this employee is inactive.

  1. Select Amit Banda and open the Options menu.
  2. Notice that the Terminate Contract action is enabled for this active employee.
  3. Click Terminate Contract.

  1. The action takes you to the newly added ContractTerminationForm form. Set the End Date to any date later than the Hire Date, and click Finish.

  1. When the toaster on the bottom left corner of the screen indicates "Changes successfully applied," click Click to refresh.

  1. Observe that Amit Banda is now marked as inactive.

Congratulations!

You have successfully generated a new stepper and action to manage the contract termination scenario.

Next, you will learn more about actions.

Actions define what business users can do on records. They are organized in action sets, which can be assigned to business views. Additionally, some actions (such as Create or Import) are available as standalone application actions, and can be triggered from the navigation drawer.

Data authoring actions

Depending on the entity type, possible authoring actions include:

Actions that create or modify records (Create, Edit, Mass-Update, Copy, and Import) require a stepper or a workflow to perform the operation.

Actions that change data (Edit, Mass-Update, Copy, and Delete) can be conditionally restricted based on the selected records.

Create, Edit, Copy, and Delete actions can be configured to accept one or multiple records.

Reorganize actions

You are now going to organize the actions in each action set.

  1. In the Application Builder, expand Entities > Employee > Action Sets node and open EmployeeActionSet.

  1. Select the CopyAuthorEmployees action in the Actions table and use the Move Up button to move it between EditTerminateContractStepper and MassUpdateAuthorEmployees.

  1. Move the ImportAuthorEmployees action between Delete and Export.

  1. Save your work.
  2. Expand the Entities > Education > Action Sets and open EducationActionSet.

  1. In the Actions table, move the ImportAuthorEducations between the Delete and Export actions.

  1. Click the Label of the CreateAuthorEducations action and set it to Add Educations.

  1. Save your work.
  2. Expand the Entities > Department > Action Sets node and open the DepartmentActionSet.

  1. In the Actions list, move the ImportAuthorDepartments between Delete and Export.

  1. Save your work.

Refresh and observe your changes in the application

Since you have not created or modified any entity or job nor changed any rules, you do not need to re-deploy the model. Simply refresh your application.

  1. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and then select Validate.
    The validation report should raise no error.

  1. Open the Employee Tutorial application from the Welcome page.

  1. In the user menu on the top-right corner, click Refresh Application.

  1. In the navigation drawer, select Employees.
  2. Select Alexis Bull land open the Options menu.
  3. Observe that the actions are now displayed in the expected order.

Congratulations!

You have successfully enhanced user experience within your application by customizing action sets.

Next, you will delve into the import and export functionalities.

You are now going to use the import and export features.

These actions are very useful for business users. They can load data coming from other sources into xDM, export data from xDM for sharing, or even use Excel as a data authoring tool in conjunction with xDM.

Learning outcomes

Use the import and export features

  1. Open your application from the Welcome page.
  2. In the navigation drawer, select Employees.

  1. Click the Filter button and search for consultants: enter consult in the Search Text field and click Apply.

  1. Open the Options menu and select Export.

  1. Select the following values and then click Export:

  1. When the download is complete, open the exported Excel file.
  2. Click the Format as Table button in the Excel toolbar.
  3. Select a style.
  4. Make sure the My table has headers option is selected on the Format as Table dialog, and then click OK.

  1. Edit some records in the Excel file:
  1. Add a new line to the Excel file with the following values:

  1. Save the Excel file.
  2. Return to your application.
  3. Open the Options menu of the Employees collection and select Import.

  1. Select the edited Excel file.
  2. Click Continue on the first page.

  1. Click Continue on the "Define Mappings" page.

  1. Click Finish on the "Import Summary" page.

  1. Review your data changes and scroll down to see Albert Einstein's record.
  2. Select this record by clicking its display card.

  1. Review the imported data and finally click the Close button to cancel the import.

  1. Click Discard all to discard your changes and keep your tutorial data clean.

Congratulations!

You have learned to export and import data to and from an Excel spreadsheet.

To summarize:

Next, you will learn about record deletion.

Deleting data is often a complex task, both on the data governance side and on the technical side.

The following aspects must be considered by designers when it comes to record deletion:

Semarchy xDM uses a flexible framework that allows you to plan for:

In this section, you will configure and use the deletion feature.

Learning outcomes

Configuring delete

View the default configuration

  1. In the Application Builder, open the main diagram: expand the Diagrams node in the Model Design view and double-click MainDiagram.

  1. Select the Employee entity on your diagram.
  2. Observe that the Delete Enabled checkbox is selected in the Name and Description finger tab of the Properties view. This means that the delete action is enabled by default for all new entities.

  1. Select the self-reference relationship from Employee to Employee.
  2. In the Name and Description finger tab of the Properties view, open the Delete Propagation drop-down. Here is how deletion propagates through this reference:

  1. Keep the default value (i.e., Restrict) for the Delete Propagation property of EmployeesReportsToEmployee.
  2. Select the reference relationship from Education to Employee.
  3. Observe in the Properties view that the Delete Propagation property is also set to Restrict. This relationship should therefore prevent an employee record from being deleted if education records are found.

Create a delete action and try to delete a record

  1. Return to the Welcome page and open your application.

  1. In the navigation drawer, select the Employees business view.

  1. In the Options menu, click Create.

  1. Enter the following values and click Next:

  1. Enter the following values for the HR step and click Next:

  1. Enter the following values of a first education record, and click Go to list:

  1. Click Finish.

  1. When the toaster on the bottom left corner of the screen indicates "Changes successfully applied," click Click to refresh.

  1. Click the Filter button above the Employees collection to open the filter panel.
  2. Type hellen in the Search Text field and click Apply.

  1. Select the record found.
  2. In the Options menu, click Delete.

  1. Click Delete to confirm the deletion.

  1. Observe that the delete fails because this employee has one education record while the reference relationship between Education and Employee is set to Restrict.
  2. Click Close to return to the collection.

Change the deletion configuration

  1. Return to the Application Builder and open MainDiagram again.
  2. Select the reference relationship from Education to Employee.
  3. Set the Delete Propagation property to Cascade in the Properties view.

  1. Save your work.

Validate and deploy your changes

  1. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model and select Validate.
    The validation report should raise no error.

  1. Open the Management perspective in the Application Builder.

  1. Right-click the EmployeeTutorial data location and select Deploy Model Edition.

  1. Click Finish in the wizard to deploy your model changes.

You are now ready to view your changes.

Cascade delete the employee and education records

  1. Open your application from the Welcome page.

  1. Select Employees in the navigation drawer.

  1. Open the filter panel and search again for hellen.
  2. Select the record by clicking its avatar, and select Delete in the Options menu.

  1. Click Delete to confirm the deletion.
  2. Observe that the delete is not rejected anymore.
  3. When the toaster on the bottom left corner of the screen indicates "Record(s) successfully deleted," click Click to refresh. The search no longer returns the record.

Hard delete and soft delete

Deleting records of a given entity in xDM involves two database tables:

Semarchy xDM allows you to perform either hard or soft delete actions on entities.

Therefore, xDM allows you to configure the deletion behavior to match your regulatory compliance requirements.

To see how hard and soft delete actions are configured, proceed as follows:

  1. In the Application Builder, expand the Entities > Employee > Action Sets and open EmployeeActionSet.

  1. In the Actions table, select the Delete action.
  2. Select the Action Configuration finger tab in the Properties view.
  3. Observe that, by default, the Delete Type property is set to Hard Delete. It can be set to Soft Delete.

Congratulations!

You have configured the deletion behavior and learned about hard and soft delete operations.

To summarize:

You have learned how to customize your applications with steppers and action sets. You also learned how to import, export, and delete data in Semarchy xDM.

Learning recap

Next steps

The next unit, Search and application configuration, will focus on customizing a better search experience and on building an elegant and productive navigation experience.

GO TO TUTORIALS

Thank you for completing this tutorial.