View this page in the latest version of Appian. Process Modeling Tutorial Share Share via LinkedIn Reddit Email Copy Link Print On This Page This tutorial will guide you through the steps to create a process model that application users can start from a record list action. The process model we're creating in this tutorial will allow users to create or update employees in the Employee record type. The form for Employee information contains several inputs that are saved into a process variable so we can use them later. We'll add a process flow that lets the user cancel their request to add an new employee. For the last step, we'll set up an automatic email to the HR manager letting them know a new employee was added to the system. Tip: Appian can automatically configure your processes for you when you generate a record action. Tutorial requirements To complete this tutorial, you need: Appian Tutorial application. Complete the Application Building Tutorial to store the process model used in this tutorial. AT Employee record type: Complete the Create the AT Employee record type section of the Record Type Tutorial, including the Generate a database table subsection. AT_employeeForm interface: Complete the Interface Tutorial to create the AT_employeeForm interface that you'll use as the start form in this process tutorial. Appropriate group membership. You must be a member of the Process Model Creators system group. If you're unsure about your group membership, contact your system administrator. Create the process model Once you complete the prerequisites, we'll start by creating the process model object. To create the process model: In the Appian Tutorial application, go to the Build view. Click NEW > Process Model. In the Create Process Model dialog, configure the following properties: Leave Create from Scratch selected. For Name, enter AT Create or Update Employee. For Description, enter Process to create or update an employee. For Save In, keep the default AT Process Models folder. For Tags, leave this blank. Click CREATE. In the Review Process Model Security dialog, update the default security as follows: For AT Users, set the Permission Level to Initiator. For AT Administrators, keep the Permission Level as Administrator. Click SAVE. The Appian Process Modeler opens automatically and displays the AT Create or Update Employee process. Configure process model properties Next, we'll configure the start form that will kick off the process. Since the process can be run multiple times, we'll also configure a unique name for each process instance. To configure these process model properties: From the menu bar, click File > Properties. Go to the Process Start Form tab. For Interface, select AT_employeeForm. On the Create Process Parameters dialog, click Yes. The employee, isUpdate, and cancel process variables are created. You can see these variables if you go to the Variables tab. Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close Go to the General tab. Next to Process Display Name, click Edit as Expression. In the Expression Editor, enter the following expression. This expression will specify whether the process instance is creating or updating an employee and which employee it was. If the action is canceled, we'll indicate that in the process instance name. 1 2 3 4 5 6 7 8 9 = if( pv!isUpdate, "Update Employee", "Create Employee" ) & if( pv!cancel, " (Canceled)", ": " & pv!employee[recordType!AT Employee.fields.firstName] ) Replace the record type reference in this expression with a reference to the record type in your environment. Click SAVE AND CLOSE. Click OK. From the menu bar, click File > Save & Publish. Your process model will look like this: Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close Add a cancel flow Now that the process model properties are configured, we'll add a cancel flow to our process for when users want to cancel the workflow. A cancel rule input is part of the AT_employeeForm interface. When we chose the interface as the process start form, a corresponding cancel process variable was automatically created. At this point though, nothing in the workflow uses that variable. If a user clicks CANCEL, ri!cancel is set to true and the process is started with pv!cancel also set to true. Now, we just need to add a gateway to direct the process flow based on the value of pv!cancel. Add a gateway node Gateways let you route the flow to different paths of your process model based on logic you define. In this case, the gateway will use the value of pv!cancel to select the appropriate workflow path. To add a gateway node: In the process model, drag an XOR node from the palette to the canvas, and drop it on top of the existing connector between the Start Node and End Node. The connector turns blue to indicate that you can add the node to the existing flow. Click the label of the new XOR gateway and change it to Cancel?. Drag an End Event node from the palette to the bottom of the Cancel? gateway. A red dot appears indicating that these two nodes will be connected. Drop the End Event node on the red dot. The two nodes are now connected. Rename this node Cancel End Event. Double-click the flow connector between the Cancel node and the Cancel End Event node, and set the Label property to Yes. Click OK to close the Flow Properties dialog. Double-click the flow connector between the Cancel node and the End Node, and set the Label property to No. Click OK. The process model should look like this: Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close Configure the decision logic Now let's define the logic within the Cancel? gateway using the cancel process variable. To configure the gateway decision logic: Double-click the Cancel? node. On the Configure Cancel? dialog, go to the Decision tab. Click NEW CONDITION. Configure properties for the new condition: For Condition, enter pv!cancel. For Result, in the go to dropdown list, select Cancel End Event. Configure properties for the Else if none are TRUE condition: For Result, in the go to dropdown list, select End Node. Click OK. In the menu bar, click File > Save & Publish. Configure the end nodes It's a best practice to formally terminate a process when it reaches an end event node. We'll configure both the End Node and the Cancel End Event to terminate the process on completion of the node action. In the process model, do the following for each of these nodes: Double-click the node. Go to the Results tab. Click Terminate Process. Click OK. Your end nodes should now look like this: Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close From the menu bar, click File > Save & Publish. Write employee data Next, we'll add a Write Records smart service to the process model so any new or updated data is written to the database that backs the Employee record type. We'll also store the output of the smart service so we can share which employee was created or updated in an email notification later in our process. Configure a Write Records node To configure a Write Records node: In the palette, search for the WRITE RECORDS node. Drag the WRITE RECORDS node to the canvas and drop it on the connector between the Cancel? (XOR) node and End Node. Click the label and change it to Write Employee Record. Double-click the Write Employee Record node. Go to the Setup tab. For Records Input, select employee. By default, the Record Type for Events property populates with the Employee record type. Since this record type doesn't have record events configured, no events will be written. Click OK. From the menu bar, click File > Save & Publish. Test the Write Employee Record node configuration: From the menu bar, click File > Start Process for Debugging. Enter sample data in the form and click CREATE. Click Refresh to see the process flow complete. The process should follow this flow: Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close In the process model, close the tab called Create Employee: First Name (Monitoring). Store the output Later in this tutorial, we'll configure a Send E-mail node to notify managers when a new employee is added. But first, we need to store the output of the Write Employee Record node so we can pass the employee information to the next part of the process. To store the Write Employee Record output: In the AT Create or Update Employee process model, double-click the Write Employee Record node. Go to the Data tab. Go to the Outputs tab. Click Records Updated. For the Target field, click New Process Variable. In the New Process Variable dialog, keep the default Name RecordsUpdated. For Type, enter AT and select AT Employee (Record Type) from the list of options. Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close Click OK. To close the Configure Write Employee Record dialog, click OK. From the menu bar, click File > Save & Publish. Send an email notification Now that we have new employee information stored in a process variable, we can configure a Send E-mail node to notify managers when an employee is created or updated. To configure the Send E-mail node: In the palette, search for the SEND E-MAIL node. Drag the SEND E-MAIL node to the canvas and drop it on the connector between the Write Employee Record node and End Node. Double-click the Send E-Mail node. In the Configure Send E-Mail dialog, go to the Setup tab. For From, select Process Initiator from the dropdown list. This sends the email as the user who created the new employee record. This way, the manager knows which member of their team completed the form. For To, click Edit as Expression. In the expression editor, enter toemailaddress() and set your email address as the value (for example, toemailaddress("first.last@example.com")). Note: We're manually setting our own email for testing purposes. In a production application, you could select Appian users by entering their names in the To field. Click SAVE AND CLOSE. For Subject, click Edit as Expression. In the Expression Editor dialog: Enter "New Employee Created: " & . On the Data tab, expand the Process Variables and RecordsUpdated lists. Click firstName to add the record field reference to the expression. Enter & " " &. From the RecordsUpdated list, click lastName. Click SAVE AND CLOSE. Click OK. Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close In the Configure Send E-Mail dialog, click OK. From the menu bar, click File > Save & Publish. Create a record list action Now that we've built the process model, we'll configure a new record list action so users have a way to initiate the process. To create the record list action: In the Build view of the Appian Tutorial application, open the AT Employee record type. In the record type, go to Actions. Under Record List Actions, click CONFIGURE NEW ACTION MANUALLY. The Create New Action dialog appears. Configure the following properties: Property Action Display Name Enter New Employee. Key Keep the default value populated from the display name. Icon Keep the default plus icon. Description Keep the blank default. Dialog Height Select Auto. Dialog Width Keep the default Medium plus. Process Model Enter AT Create or Update Employee Click DONE. Click SAVE. Test the full workflow Now let's see what happens when we click the record list action. To test out the action: In the record type, go to List. Under the Record List section, click the URL. The record list opens in a new tab. Click + NEW EMPLOYEE. You should see the following: Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close Complete the form. For example, you could enter: Field Value First Name Deborah Last Name Geary Department Sales Title Account Executive Phone Number 123-555-0987 Start Date any future date Click CREATE. Return to the Appian Tutorial application, and click Monitor in the navigation pane. Go to PROCESS ACTIVITY to view the list of processes. In the list, click the process instance with the name Create Employee: Deborah. This action opens the monitoring view of the process instance in the Process Modeler. The flow that your process instance followed is highlighted in blue. Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close In the toolbar, click Process Details. By default, the Variables tab is active. This tab displays the values that Appian populated to the process variables based on your field inputs. Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close Click CLOSE. Close the monitoring view for this process instance. Success! Your process model now writes new and updated employee data, and alerts the HR manager that the data has been created or updated. Feedback Was this page helpful? SHARE FEEDBACK Loading...