In this tutorial, you will focus on data authoring use cases to optimize the interactions that business users have with your application.

What you'll learn

Before you start

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

The estimated duration of this unit is about 1 hour and 45 minutes.

Steppers are started when users select 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 the business view menu. They allow a user to take action on one or more records.

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

In the next steps, you will:

Let's change the EmployeeForm and the AuthorEmployee stepper to add support for creating education records in the same activity.

Modify the Employee form

  1. Open the HRTutorial model in the Application Builder.
  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. Select the General finger tab of the Properties view, and then select Read-Only.

Modify the Employee stepper

You will now modify the Employee stepper to:

  1. Expand the Steppers node under the Employee entity, and then double-click the AuthorEmployees stepper.

  1. Select the ContactInfo step in the Steps tree table, and then deselect Enable Finish in the Name and Definition finger tab of the Properties view.

  1. Select the HR step in the Steps tree table. Select the Reference Selection finger tab in the Properties view, and then 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 then 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 then 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 and then 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. 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 on 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

Let's now create a new employee to see the new stepper.

  1. Open your application from the Welcome Page.

  1. Select Employees in the Navigation Drawer. Open the actions menu, and then select Create.

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

  1. Enter the new employee information, and then 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 new employee authoring is now complete. Click FINISH.

  1. Wait until the toaster at the bottom-left corner of the screen indicates "Changes successfully applied", and then select CLICK TO REFRESH:

  1. Click the Filter button above the Employees collection to open the filter panel. Enter 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.

In the next step, you will create a new form and stepper to cover another use case.

In this section, you will design a simple contract termination use case. The goal is to add 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 that focuses primarily on setting an end date for an employee.

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

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

  1. Select the Form tab of the editor. Expand the first Form container in the General Form tab, select the FormCollection: Education in the tree view and then click the Delete selection button.

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

  1. Select the Form section you just added. In the Name and Definition finger tab of the Properties view, set the Name to TerminateContract.

  1. Select the Display Properties finger tab in the Properties view and set the Relative Width to 30.

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

  1. Select the EndDate Form field in the tree view. In the Display Properties finger tab of the Properties view, make sure the Component Type is set to Date Picker.

  1. Drag and drop the HireDate attribute into the TerminateContract section after the EndDate field.

  1. Select the HireDate Form field in the tree view. In the Display Properties finger tab of the Properties view, make sure the Component Type is set to Date Picker.

  1. In the General finger tab, select Read-Only.

  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. In the General finger tab of the Properties view, select Read-Only.

  1. In the Label finger tab, select Label Visible.

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

  1. Select the FDN_Manager Form field. In the General finger tab of the Properties view, select Read-Only.

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

  1. Expand the container you just moved. Drag and drop the ID Form field above the Name field.

  1. Select the Subsidiary Form field in the tree view. Select Read-Only in the General finger tab.

  1. Select the Hired and Ended fields (hold Ctrl and select both fields), and then click the Delete selection button. Confirm the deletion.

  1. Select the second container within the General Form tab. Empty the Relative Width property in the Display Properties finger tab of the Properties view.

  1. Select the Picture Form field. Select Read-Only in the General finger tab of the Properties view.

  1. Select the Contact Form tab and click the Delete button. Confirm the deletion.

  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 that will use the ContractTerminationForm you have just designed.

The stepper will be a fairly simple one-step stepper with a minimum set of validations enabled.

  1. Navigate to Entities > Employee > Steppers in the Model Design View. Right-click the Steppers node and select Add Stepper.

  1. Enter the following values and then click Next:

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

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

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

  1. Save your work.

Your stepper is complete. Now it's time to trigger it with an action.

Create the Terminate Contract conditional action

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

  1. Expand the Action Sets node under the Employee entity and then double-click the EmployeeActionSet.

  1. Click the Add Action button in the editor.

  1. Enter the following values in the wizard and then 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 for the EditTerminateContractStepper action to Terminate Contract.

  1. In the Name and Definition finger tab of the Properties view, click the Select Image button next to the Icon property.

  1. Search for calendar-remove and select the mdi/calendar-remove.svg picture.

  1. 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 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 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. Select Employees in the Navigation Drawer.

  1. Search for consultants: click the Filter button, enter consult in the Search Text field, and then click APPLY.
  2. Select the Jack Livingston record by clicking its avatar and then open the actions menu. Observe the Terminate Contract action is disabled because this employee is inactive.

  1. Now select Amit Banda. See that the Terminate Contract action is enabled for this active employee in the actions menu, and then select this action.

  1. The action takes you to the new ContractTerminationForm. Using the date picker, set the End Date to any date that is after the Hire Date and then click FINISH.

  1. Wait until the toaster at the bottom-left corner of the screen indicates "Changes successfully applied", and then select CLICK TO REFRESH:

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

Congratulations

You have successfully created a new stepper and action to handle the use case of contract termination.

In the next step, you will learn more about actions.

Actions define what business users can do on records. They are organized in action sets.

Action sets can be assigned to business views. In addition some actions (such as create or import) are available as standalone application actions, triggered from the Navigation Drawer.

Data authoring actions

Possible authoring actions, depending on the entity type, 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 which 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

In this section, you will clean up the actions in each action set and organize them more intuitively.

  1. In the Application Builder, navigate to Entities > Employee > Action Sets in the Model Design View. Expand the Action Sets node and then double-click EmployeeActionSet.

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

  1. Select and move the ImportAuthorEmployees action between Delete and Export.

  1. Navigate to Entities > Education > Action Sets in the Model Design View and open the EducationActionSet.

  1. Select and move the ImportAuthorEducations between the Delete and Export actions in the Actions table.

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

  1. Navigate to Entities > Department > Action Sets in the Model Design View and open the DepartmentActionSet.

  1. Select and move the ImportAuthorDepartments between the Delete and Export actions in the Actions list.

  1. Save your work.

Refresh and see your changes in the application

As you have not created or modified any entity or job, you do not need to deploy the model

As you did not change any rules in your model besides the action sets, you do not need to re-deploy your model but only need to 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 your application from the Welcome Page.

  1. Open the user menu on the top-right corner, and then select Refresh Application.

  1. Select Employees in the Navigation Drawer. Select the first record, Alexis Bull, by clicking its avatar, and then open the actions menu. Observe that actions are now displayed in the expected order.

Congratulations

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

In the next step, you will learn about the import and export features.

In this step, you will use the import and export features.

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

What you'll learn

Use import and export

  1. Open your application from the Welcome Page.
  2. Select Employees in the Navigation Drawer.

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

  1. Open the actions 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, select a style. 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. Open the actions 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.

  1. Review your data changes and scroll down to see Albert Einstein. 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

Congratulations. You now know how to export and import data to/from Excel.

What we've covered

In the next step, 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 evaluated by designers when it comes to record deletion:

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

In this step, you will configure and use the delete feature.

What you'll learn

Configuring delete

View the default configuration

  1. Go to the Application Builder.
  2. Open your main diagram: expand the Diagrams node in the Model Design View and double-click MainDiagram.

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

  1. Select the self-reference relationship from Employee to Employee. Open the Delete Propagation drop down in the Name and Description finger tab from the Properties View, which defines how deletes propagate through this reference:

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

Create and try to delete a record

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

  1. Select Employees in the Navigation Drawer.

  1. Select Create in the actions menu.

  1. Enter the following values and then click NEXT:

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

  1. Enter the following values of a first education record and then click GO TO LIST:

  1. Click FINISH.

  1. Wait until the toaster at the bottom-left corner of the screen indicates "Changes successfully applied", and then select CLICK TO REFRESH:

  1. Click the Filter button above the Employees collection to open the filter panel. Enter hellen in the Search Text field and then click APPLY.

  1. Select the record found by clicking its avatar. Open the actions menu and select 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 marked as Restrict. Click CLOSE to return to the collection.

Change the delete configuration

  1. Return to the Application Builder and open the MainDiagram again.
  2. Select the reference relationship from Education to Employee. 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 then select Validate. The validation report should raise no error.

  1. Go to the Management perspective of 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.

Delete the employee and its education record in cascade

  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. Select the record by clicking its avatar and select Delete in the actions menu.

  1. Click DELETE to confirm the deletion.
  2. Observe that the delete is not rejected anymore. Wait until the toaster at the bottom-left corner of the screen indicates "Record(s) successfully deleted", and then select CLICK TO REFRESH. The search no longer returns the record.

Hard Delete vs Soft Delete

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

Semarchy xDM allows you to perform either Hard or Soft deletes on entities.

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

To see how Hard vs Soft deletes are configured, process as follows:

  1. In the Application Builder, navigate to Entities > Employee > Action Sets in the Model Design View. Expand the Action Sets node and then double-click EmployeeActionSet.

  1. Select the Delete action in the Actions table and then select the Action Configuration finger tab in the Properties view. Observe that the Delete Type property was set to Hard Delete by default and can be set to Soft Delete.

Congratulations

You have completed the last part of this unit by configuring deletes and learning about Hard vs Soft deletes.

What we've covered

Excellent job following this tutorial! With this unit, you learned how to customize your applications with steppers and action sets. You also learned how to import, export and delete data in Semarchy xDM.

What we've covered

What's next?

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