Skip to main content

Application Process

Overview

An Enactor Application Process is a core design element that represents the Controller in the Model-View-Controller (MVC) architecture used by the Enactor ToolSet. It is responsible for driving and controlling the execution flow of applications within the Enactor Runtime Framework.

In this architecture:

  • Entities represent the Model.

  • User Interfaces serve as the View.

  • Application Processes manage the coordination and logic, acting as the Controller.

In this tutorial, a new Application Process will be created as a call process to the existing SignOn process.

In the created application process, a popup message displaying the current user will be implemented.

What you will learn

  • How to add an Application Process

Adding a call process to Application Process

Create the following directory paths relative to the Process directory, Training/Pos/SignOn

Next, open the resource library by navigating Window -> Show View -> Other -> Resource Library.

On the search bar, search for the SignOn process in the POS/Pos Project using p:Signon

Double click an open the SignOn process on the Package Explorer.

Right click the process on the Package explorer, navigate to Enactor menu and select Copy Resource

Navigate back to the newly created SignOn folder.Right click, navigate to Enactor menu and select Paste Resource so that the SignOn process is added to the folder.

info

By copying the SignOn Process, a process override using the Process set mechanisms was used. More details can be in the Process Set Tutorial

Open the SignOn Process

From the Outline view, expand the Actions group and search for the action SignOnCompletedExtension

From the Palette, expand the Actions Group, Drag and drop a new Call Process action near SignOnCompletedExtension action.

Move the link from Success outcome of SignOnCompletedExtension to the new Call Process Action.

From the Palette, click the Link tool and then add a link from the Success outcome on the new action connecting it to the SignedOn state.

Right click the new Call Process action and select Show Properties

Set the Action ID to DisplayLoggedinUser

Set the Execute Process ID to Training/Pos/Customer/DisplayLoggedinUser

In order to add the User input to the new call process, drag the User input from the SetAutoTimeout action to the input section of the new call process.

(Else you can double click on the input section of the call process and add a new input with the name enactor.coreUI.User and enter type as com.enactor.core.signOn.ISignedOnUser)

Save the Process.

Creating a new Application Process

Navigate to the directory path Training/Pos/SignOn

Create a new Application Process with an ID of DisplayLoggedinUser in the SignOn folder, Right click the SignOn directory, select New -> Other

From the Select a wizard dialog, Expand the Enactor Development Group and select Application Process

Click Next >

Enter DisplayLoggedinUser as the Process ID.

Ensure Register in Packages is selected.

Click Finish

On the new process, double click on the input section and add a new input with the name enactor.coreUI.User and enter type as com.enactor.core.signOn.ISignedOnUser

Then, from the Palette, expand the States group, select and drag on a new State, placing it under the Process figure

Right click the State and select Show Properties

For the State ID enter Start

Edit the Events property, add a StateEntered event

Click OK

From the Palette add a new Message State, dropping it to the right of the Start state

In order to add the User input to the new message state, double click on the input section of the message state and add a new input with the name enactor.coreUI.User and enter type as com.enactor.core.signOn.ISignedOnUser

Set the State ID to ShouldPromptForLoggedinUser

Set the URL Property to /Message/PopUpModalOK

info

you can select the value from the drop down menu

Set the Message Text Property as follows.

You are logged in as ''{user.displayName}''
info

A translatable message can be provided using the Message Base and Message Text Properties

Edit the Events property by adding OKPressed event.

Click OK

Add a link from the StateEntered event of the Start State connecting to the newly created state ShouldPromptForLoggedinUser

From the Palette expand the Actions group, add an End Process Action

Edit the Properties for End Process Action:

Set the Action ID to End Process Success

Set the Process Outcome to Success by selecting the value from the drop down menu

Link both the events from the ShouldPromptForCustomer State to the End Process Success Action

Save the Process

Re-Launch the Pos application. After you sign in, a dialog should now be presented with the message You are logged in as 'UserName' and with Ok option.

Further Reading

Refer Application Process