[go: up one dir, main page]

0% found this document useful (0 votes)
302 views24 pages

Appian StepbyStep 5 (Process Models)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
302 views24 pages

Appian StepbyStep 5 (Process Models)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Appian Step-by-Step #5

Exercise to Accompany
Process Modeling: Automate Your Business Processes

The Appian Step-by-Step series consists of 10 exercises that accompany


the courses in the Appian Developer learning path. Exercises build upon
each other. Complete exercises in order and keep the app and all
objects until you are done with the project.

1 Manage Users and Groups

2 Manage Data Easily with Custom Data Types

3 Expressions: Transform Your Data

4 Interfaces 101: Build Forms and Other Interfaces

5 Process Modeling: Automate Your Business Processes

6 Query Data from RDBMS

7 Design Appian Records

8 Reports: Build Basic Charts and Grids

9 Sites: Create a Custom and Focused User Experience

10 Interfaces 102: Build Interfaces Using an Expression

© Appian Corporation, 2021


Introduction 2
How to Complete the Exercises in this Guide? 2
What Will I Build? 2
How Can I Get a Practice Environment? 2
Use Initials in a Shared Environment 2
Save Often 2
Additional Resources 3

1 - Create a Process Model Diagram 4


Create the Process Model Folder and Diagram 4
Configure the Diagram 4

2 - Set Up the Add Vehicle Process Model 6


Create the Process Model 7
Add Process Variables 7
Configure Alerts 8
Configure Data Management 9

3 - Add the Process Start Form 9


Test the Process 10

4 - Add the User Input Task 11


Add the User Input Task 12
Name the Task Dynamically 12
Assign the Task and Add a Form 14
Map the Data 15
Test the Process 17

5 - Add the Write to Data Store Entity Smart Service 17


Run the Process as a Process Designer 20

6 - Add a Process Gateway 21

Notice of Rights

This document was created by Appian Corporation, 7950 Jones Branch Dr, Tysons, Virginia 22102.
Copyright 2021 by Appian Corporation. All rights reserved. Information in this document is subject
to change. No part of this document may be reproduced or transmitted in any form by any means,
without prior written permission of Appian Corporation. For more information on obtaining
permission for reprints or excerpts, contact Appian Training at academyonline@appian.com.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 1
How to Complete the Exercises in this Guide
This guide offers a series of exercises that will teach you how to build a functional Appian
application, step-by-step. Please use this guide to support your learning throughout the
Appian Developer online curriculum.

To understand specific Appian concepts and features, we recommend that you first view our
online courses (access our curriculum at academy.appian.com), and then complete the
associated exercises before moving to the next course in the path.

What Will I Build?


You will build the Vehicle Fleet Management (VFM) application that will automate the process
of registering a new vehicle in the fleet. This app will be designed for two personas: Registrars
and Supervisors. Registrars will use the VFM application for entering the new vehicle
information into an online form, which will be then sent to Supervisors for approval. After
approval, the new vehicle will be written to the database. After you build all key design
objects, you will assemble them into a user-friendly Site that Registrars and Supervisors will
use for adding and approving vehicles and for accessing all fleet-related reports.

How Can I Practice?


Sign up for Appian Community Edition here:
https://community.appian.com/p/my-learning-journey/. This free, unlimited-time Appian
instance comes with the pre-built VFM application that you can use to reference while building
your own version.

If you already have access to a practice environment, you will need a user account with either
System Administrator access, or an account for a Basic User who is a member of the
Designers and Process Model Creator groups. Request access from your site’s System
Administrator.

Use Initials in a Shared Environment


If you work in a shared environment, prefix all application objects with your initials to avoid
naming conflicts. For example, if your initials are JJ, name your group JJ VFM All Users.

Save Often
Appian does not automatically save updates, so save your objects frequently.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 2
Additional Resources

Appian provides a plethora of training resources for novice Appian developers. The following
resources are particularly popular with our learners:

Academy Online - Appian’s online courses provide useful survey courses, step-by-step
tutorials, and some additional practice exercises. Explore these resources at your own pace.
Survey courses will help you with developing a better grasp of the range of topics you need to
learn about. Video and print tutorials will help you with getting the hands-on experience with
Appian.
Appian Documentation - Appian’s product documentation will provide you with the overview of
key Appian features, newest release information, additional tutorials, and helpful patterns and
recipes to implement in your app.
Community Discussions for New Users - Join our community of experts to ask questions and
find answers from past discussions.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 3
1 - Create a Process Model Diagram

In this exercise, we will create a high-level diagram for the process of adding new vehicles to
the fleet. Diagrams are helpful when you want to brainstorm the process before you start
building an actual process model. Our process for adding a vehicle will include the following
steps:

● The Registrar fills out the Add Vehicle form, which then goes to the Supervisor for
approval.
● If the Supervisor approves the vehicle, the vehicle info is written to the database, and a
news post appears in the company newsfeed.
● If the vehicle is rejected, the process ends.

Create the Process Model Folder and Diagram


Follow the steps below to create a sample high-level diagram:

1. From within the VFM app, click New, and select Folder from the dropdown list. In the
dialog box, select the Process Model Folder radio button, name it VFM Process
Models, and provide a brief description: “Parent folder for all process models in the
Vehicle Fleet Management application.” Click Create.

2. To set security to this parent folder, click Add Users and Groups, and add VFM All
Users as Viewers, and VFM Admin as Admins.

3. Now, let’s create the diagram. Click New, and select Process Model from the
dropdown menu. Type VFM Add Vehicle Workflow Diagram in the Name field, and
add a description: “Process documentation for the VFM Add Vehicle process.” Make sure
to save this object into the VFM Process Models folder. Click Create.

4. To configure this object’s security. click Add Users or Groups, and add VFM Admins
with the Administrator permission level. Also add VFM Registrars and VFM
Supervisors with the Viewer permission level. Please remember that, unlike other
folder-ed design objects, process models do not inherit security from the parent folder.

Configure the Diagram


Now, let’s configure the diagram to represent the Add Vehicle process:

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 4
1. Because this diagram is the draft of an actual process model that we will create later,
let’s switch to the Analyst View to suppress any errors and validation messages. This
view is located on the top right of the screen:

2. Click the Add Horizontal Lane button in the toolbar to add two swimlanes for
Registrars and Supervisors. Click Lane 1 and Lane 2 labels, and rename them to
Registrars and Supervisors.

3. Build the workflow by dragging nodes from the palette on the left onto the canvas. Add
the following nodes:

● Keep the Start Node in the Registrar swimlane. Rename it to Add New
Vehicle. Drag the End Node to the Supervisor swimplane, and delete the
connector between the Start and End nodes.
● Drag the User Input Task node to the Supervisor swimlane. Rename it to
Review Vehicle.
● Drag the XOR gateway to the Supervisor swimlane. Rename it to Approved?
● Add the End Event node to the first outgoing flow.
● Add the Write to Data Store Store Entity smart service. Rename it to Write
to Vehicle Entity.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 5
Refer to the image below to see how to arrange the nodes within the swimlanes.

4. Connect all nodes. To connect, hold down SHIFT on your keyboard, and then click from
one node to another. SHIFT will automatically toggle your pointer to the connector tool.

You can also use the Connect icon to connect the nodes. Connect the nodes as
follows:

5. Add the labels Yes and No to the connectors leading from Approved? To add labels,
right-click each individual connector, and select Add Label. Rename labels to Yes and
No (see the image above).

6. Save the diagram by clicking File > Save (or click Ctrl+S instead).

2 - Set Up the Add Vehicle Process Model

In this exercise, we will start creating the Add Vehicle process model. Our first step will be to
create the process model and configure its security, set up the swimlanes for Registrars and
Supervisors, and then configure the process model properties (variables, alerts, and data
management). Follow the steps below to accomplish these tasks:

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 6
Create the Process Model
1. From within the app, click New and select Process Model from the dropdown menu.
Type VFM Add Vehicle into the Name field, and add a brief description: ”Process for
adding vehicles to the fleet using the VFM app.” Click Create.

2. Configure the security for the process model: add VFM Registrars and VFM Supervisors
as Viewers, and VFM Admins as Administrators.

3. Ensure that you are in the Designer View of the process model:

4. Let’s add the swimlanes for Registrars and Supervisors. Click the Add Horizontal Lane

button on the toolbar to add two swimlanes for Registrars and Supervisors. Click
Lane 1 and Lane 2 labels, and rename them to Registrars and Supervisors:

Add Process Variables

To add variables to the process, click the Properties button in the toolbar. In the Process
Model Properties dialog box, navigate to the Variables tab, and then click Add Variable. Add the
following variables:
● cancel: enter Boolean for the type, and check the Parameter box. If you designate a
variable as a parameter, it will allow this variable to accept a value before the process
starts.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 7
● approvalDecision: enter Boolean for the type, and don’t check the Parameter box.

Note that we are creating only a few variables here, and will add additional variables later using
a different method. After you add the above variables, your table with variables will look like
this:

Configure Alerts
Next, let’s configure the alerts for the VFM Add Vehicle process model. If our process model
runs into errors, we want the appropriate administrative group to be alerted about an issue.
Follow the steps below to set up alerts:
 
1. Click the Alerts tab In the Process Model Properties dialog box.

2. Select the Use custom error alert settings radio button.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 8
3. Check the Send alerts to the following users and groups box, and type VFM
Admins into the field:

Configure Data Management


Finally, let’s adjust the timeline for process archiving. Click the Data Management tab in the
Process Model Properties dialog box. The system default is to archive processes 7 days after
completion. Change this to 3 days to improve utilization of server resources:

This setting will remove process history, metrics, and variables from memory after three days.

3 - Add the Process Start Form

The Add Vehicle process will be started after the Registrar fills out and submits the Add Vehicle
form in a Site or Tempo. In this exercise, we will wire the Add Vehicle form to the start node in
our process. Follow the steps below to set up the process start form:

1. Once again, click the Properties button in the toolbar to launch the Properties
dialog box, and navigate to the Process Start Form tab.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 9
2. Retain the Select an interface radio button selection, and start typing
VFM_AddVehicleForm, and then select it from the list of auto-suggestions. Click Yes
to create process parameters to match the interface inputs:

Matching interface inputs to process parameters ensures the data flows from the
interface into the process. If you navigate to the Variables tab, you will notice that the
interface inputs are now added as parameters to the list of variables.

3. Click OK, and then save the process model by going to File > Save and Publish.

Test the Process


Now that we wired the form to the process, let’s check that everything works correctly and the
process advances to completion. Follow the steps below to test the process:

1. Click File, and select Start Process for Debugging.

2. Complete the form, and click Submit. You will notice that a new process instance
started in the Monitoring Mode and on a new tab in the Process Modeler.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 10
3. Click the Refresh button in the toolbar to update the process flow. You will notice
that the process will advance to the End Node:

4. Click the Process Details button in the toolbar, and navigate to the
Variables tab to verify that the data you entered into the form was captured by the
process model.

5. Close the process monitoring tab, but keep the Process Model open to configure our
next sequence of activities.

4 - Add the User Input Task

In this exercise, we will add the new User Input Task to the process. After the Registrar fills out
the form for a new vehicle, the process will assign the task to approve this vehicle to the
Supervisors group. This task will have the below properties:

● The task will display a dynamic name, i.e. the Supervisor will be able to tell from
the name of the task what vehicle it is for.
● The task will be assigned to the Supervisors group.
● The task will launch the VFM_SupervisorApproval form.  
● The interface rule inputs will be automatically mapped to the node inputs of the
task.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 11
Add the User Input Task
First, we will rearrange the layout of the nodes in our Process Models, and then we will
configure the User Input Task to allow the Supervisors to approve new vehicles:

6. Delete the connector between the Start and End Node, and then drag the End Node to
the Supervisors swimlane.

7. Click and drag a User Input Task from the palette to the canvas, and drop it into the
Supervisors swimlane underneath the Start Node.

8. Connect all nodes. To connect, hold down SHIFT on your keyboard, and then click from
one node to another. SHIFT will automatically toggle your pointer to the connector tool.

You can also use the Connect icon to connect the nodes. Connect the nodes as
follows:

9. Click the User Input Task label, and rename it to Approve Vehicle. 

10. Double-click the node to launch the Configure Approve Vehicle dialog box. Enter the
following description into the description field: “Supervisor reviews new vehicles and
approves their addition to the fleet.”

Name the Task Dynamically


Next, we will configure the Task Display Name to dynamically display the make and model of
the vehicle for which the approval is requested. The dynamically named task will provide the
Supervisor with the context necessary for each approval. Follow the steps below to accomplish
this:

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 12
11. Click the Expression Editor next to the Task Display Name field:

12. We will use an expression to make the task display a dynamic title. As you type the
expression into the Expression Editor, click the process variables for the make and
model (see the image below) to insert them into your expression. Type the following:

“Approve Vehicle: “ & pv!vehicle.make & “ “ &


pv!vehicle.model

13. Click Save and Close.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 13
Assign the Task and Add a Form
Now, let’s make sure that the task is assigned to the VFM Supervisors, and that the Approval
form is wired to it. Follow the steps below to accomplish this:

1. Next, navigate to the Assignment tab. In the Assign to the following field, start
typing VFM Supervisors, and then select this option from the list of auto-suggestions.

2. Navigate to the Forms tab and start typing VFM_SupervisorApproval into the
interface field.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 14
3. Click Yes to create node inputs:

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 15
Map the Data
Finally, let’s configure the Data tab to ensure that all existing vehicle data flows into the
VFM_SuppervisorApproval form, and the new data (entered by the Supervisor) is captured as
well. Follow the steps below to set up your data flow:

1. Navigate to the Data tab. Please note that the node inputs in this tab were imported
from the VFM_SupervisorApproval form:

At the moment, the VFM_SuppervisorApproval form is configured to only allow the


Supervisor to enter new approval-related information. We still need to configure this
process to display the existing vehicle data, and to capture the newly entered approval
information.

2. Select the vehicle node input. In the Field Properties (on the right), click the
dropdown menu next to the Value field. Select vehicle. This will allow us to display the
existing vehicle data in the VFM_SupervisorApproval form. Note that we don’t need
to update the Save into field because the Supervisor will not modify any vehicle
information, so we won’t need to save it.

3. Select the cancel node input. Click the dropdown menu next to Save into, and select
the cancel process variable. If the Supervisor clicks cancel, this will save the cancel
value into the process.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 16
4. Select the readOnly node input. Click the dropdown menu next to Value, and select
True.

5. Select the approvalDecision node input. Click the dropdown menu next to Save into,
and select the approvalDecision process variable that we created earlier. This will
allow us to save the Supervisor’s decision, whatever it is.

6. Click OK.

7. Save the process model by going to File > Save and Publish.

Test the Process


1. Click File, and then select Start Process for Debugging.

2. Complete the Add Vehicle to Fleet form, and click Submit.

3. In the Monitoring tab, click the Refresh button in the toolbar.

4. Right-click the Approve Vehicle task once it is highlighted in green, and select View
Form:

5. Review the form, and complete the approval section. Click Submit.

6. Click Refresh in the toolbar. You will see the process advance to the End Node.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 17
7. Click Process Details, and select the Process Variables tab to view the data that was
collected.

5 - Add the Write to Data Store Entity Smart Service

Now that we have two forms in our process, let’s add the Write to Data Store Entity smart
service to it to ensure that all vehicle data is written to the database table:

1. Close the Monitoring tab, and return to the VFM Add Vehicle process model.
2. In the palette, scroll down to Integration Services > Data Services and locate the
Write to Data Store Entity smart service. Drag and drop it right after the Approve
Vehicle task (drop the smart service when the connector turns blue). Rename it to
Write to Vehicle Entity:

3. Double-click Write to Vehicle Entity to launch the Configure Write to Vehicle


Entity dialog box.

4. In the General tab, add a description: “Insert vehicle information into the Vehicle
Entity.”

5. Navigate to the Data tab, and click the Data Store Entity Node Input (on the left).

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 18
6. Click the Directory icon next to the Value field. In the Choose an Entity dialog
box, select VFM Data Store. In the next screen, click Select next to vehicle to
populate the Selected field:

7. Click New Input to add a new input for the data to be written to the Vehicle Entity.
Configure it as follows in the Field Properties:

● Name it dataToWrite.
● Start typing VFM in the Type field, and then select VFM_Vehicle from the list
of suggestions.
● Use the dropdown menu next to Value to select vehicle.

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 19
● Next, navigate to the Outputs tab, and click to select Stored Values. Using the
dropdown menu next to Target, select vehicle. This will allow us to collect the
automatically generated vehicle ID number. While we don’t need to collect it for
this specific scenario, this is how you will collect the primary key of an inserted
record in other scenarios:

Run the Process as a Process Designer


Next, we will assign the Write to Vehicle Entity activity to process designers. This is done
primarily to elevate the security of this node since writing to the application’s Data Store Entity
is not something that should be done by basic users, and it typically requires a higher level of
permission. To assign this activity to process model designers, complete the following steps:

1. Double-click Write to Vehicle, and navigate to the Assignment tab. 

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 20
2. Select the Run as whoever designed this process model radio button:

3. Click File, and then select Save and Publish.

4. Click File, and then select Start Process for Debugging. Debug the process model.
After you are done with debugging, verify that the vehicle ID is recorded in the
Variables tab of Process Details:

6 - Add a Process Gateway

Gateway nodes are added to the process when we need to branch the workflow. In
our process, we will add the XOR gateway to allow the process to split into two
separate branches. If the Supervisor rejects the vehicle, the process will end. If the

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 21
Supervisor approves the addition of the vehicle to the fleet, the process will continue to the next
process node. Follow the steps below to add the XOR gateway to the Add Vehicle process:

1. In the palette, scroll down to Gateways and locate the XOR gateway. Drag and drop it
right after the Approve Vehicle task. Before dropping the node, ensure that the
connector line is highlighted in blue.

2. Rename it to Approved? Double-click the XOR gateway to launch the dialog box, and
enter a description: “The gateway for rejecting or approving vehicles.”

3. Let’s set up the Reject path for our process. Drag and drop another End Event, placing
it above the Approved? gateway. Press Shift, and connect the Approved? gateway to
the End Node. Rename End Node to Rejected.

4. Double-click the gateway, and navigate to the Decision tab.

5. Click New Condition, and then open the Expression Editor for the condition. Select
the process variable, approval Decision, and click Save and Close. In the Results
column, select Write to Vehicle Entity. For the Else if none are TRUE condition,
select Rejected in the Results column:

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 22
6. Label each path out of the Approved? node by double-clicking the connecting line. The
line to Rejected should be labeled, No. The other should be labeled, Yes.

7. Test the process by going to File > Start Process for Debugging. Test the approval
and rejection paths. 

Before you go …

Congratulations! You have completed the fifth Appian Step-by-Step exercise. Keep in
mind that you will need the objects created so far for your next set of exercises.

Up Next

6 Query Data from RDBMS

Appian 21.3 Appian Step-By-Step


© Appian Corporation, 2021 Page 23

You might also like