Process models are incredibly flexible regarding the functionality and workflows you can construct. While the possibilities are endless, there are many common workflows you'll likely need to implement, regardless of the type of application you are building.
This page will highlight some common workflows that are used in many Appian applications today.
You can assign the same task to everyone in a group. There are two things you need to do to achieve this:
You can learn more about multiple node instances below.
If a task or process node is delayed for any reason, you can automatically take a number of actions to solve the problem.
Available escalations include:
Escalations can be triggered manually, or by configuring an Escalation Timer Event.
Right-click a node on the designer canvas and point to Escalations. Click Escalations). — or —
In the Configure [node] dialog box, click the Escalations tab. Any existing node Escalations are displayed.
Click the Add Escalation button . The Level 1 Escalation options appear. (You can add multiple levels of escalation actions.)
Set the timer for the Escalation by clicking the Configure link in the Configure the Timer Event options. The Timer Event dialog box is displayed.
escalation_timer_#) that you can change if desired. Click the Setup tab. The Configure Timer Event and Timer Conditions group boxes are displayed.
In the Configure Timer Event group box, use the Timer Escalation Activation group of options to set a timed delay (either by entering a number or using a logical expression). This option is selected by default. To enter a timed delay, type a number in the field provided (or click the Expression Editor button to use an expression). Select Minute(s), Hour(s), Day(s), or Month(s) from the time-span list.
(Optional) To keep timer events from counting weekends, use the caladddays() function. For example, if you want to trigger an escalation four days after the start of the node – excluding weekends – select the Escalate at the date and time… option. Type the following expression in the text field.
1 =caladddays(now(), 4)
Any non-working days defined in the Process Calendar are excluded from the escalation timer when the caladddays function is used. (Weekends are specified as non-working days on the process calendar by default.) See Process Calendar Settings.
|To repeat the task||Select|
|Every n number of days, every weekday, or at a certain time of day.||Daily|
|Every n number of weeks, at a specific time, on a specific day of the week.||Weekly|
|At a certain time, on the nth day of the nth month, or on the nth day of the week (such as the 3rd Sunday) of the nth month||Monthly|
|At a certain time every year: on the nth day of a month, or on the nth day of the week (such as the 3rd Sunday) of the nth month||Yearly|
|Every n number of minutes or n number of hours||At an interval|
|Raise task priority one level||
|Lower task priority one level||
|Reset the task priority to High, Normal, or Low.||Change priority and Select High, Normal, or Low from the pull-down list.|
In the Subject field, modify the message subject to suit your escalation requirements.
The default text is an expression that inserts the task name property
&tp!name and the process name
&pp!name into the subject. All displayed text is surrounded by quotation marks, and can be directly edited in the Subject field.
Type the body of your escalation message where the
Task Escalation Notice text is displayed.
See the Send Message Event help topic for more information on configuring a message escalation.
You can execute any activity multiple times in the same process flow by using the Multiple Node Instances (MNI) functionality. For example, you might spawn multiple tasks for the same activity when multiple tasks are associated with a single event (such as an interview in a hiring process) or when recursively building a text document from process data.
A process instance can only activate the same activity up to 1,000 times. Additional instances can be allowed, if designated by your server administrator. See also: Configuring the Maximum Activity Instances Value
When multiple instances are configured for an activity, a three-line boundary marker is displayed at the bottom of the node as shown in this image:
Multiple activity instances can be executed sequentially or in parallel. Re-execution of an activity creates a new instance, even if the previous instance is not finished processing.
Parallel Execution: All instances are activated simultaneously. They do not have to complete in the same order they were activated.
Sequential Execution: The instances must be completed in the same order that they were activated.
The steps for configuring multiple node instances are listed in the Other Tab of the node's properties dialogue box.
See also: Other Tab
At times, you may need to execute an activity repeatedly by creating a loop in the process flow and routed the process flow back to the same activity to execute it again. This type of process activity execution is referred to as a looping process flow.
Looping process flows allow you to add information to existing variables and repeat an operation until it is completed.
If the activity saves data in single value variables, then the data in the variable is overwritten each time the activity is executed.
If the activity saves data in multiple value variables, you can have the activity attach its output to the end of the existing list of values — OR — You can overwrite a certain value (or record) in a list of values, by specifying its index location.
For details regarding how to append or insert data into an existing variable, see also: Creating a Custom Output
You can configure a looping process flow to spawn based on a definite number of instances or base the number on a process variable.
NOTE: If a process flow reaches a node configured to spawn a number of instances based on an array length or PV of type Number - Integer and the value at the time is empty, null, or zero, the process will pause by exception and throw an error requiring you to resume the process as needed. This type of process flow can be useful when using a sub-process to tabulate report data. When the activity is a sub-process, a new process is started each time the activity is activated.
You can determine the number of times that a flow token repeats a loop by placing a gateway in the loop.
You can schedule a recurring execution of the same activity at a given interval. For example, a manager could schedule an activity every Friday at 1:00 PM, which assigns a task to each team member regarding their expenses.
This type of process activity execution is referred to as recurrence.
When activities have been configured to execute on a recurring schedule, it is possible to manually trigger or skip a recurrence.
See also: Scheduling the Start of an Activity
When using multiple node instances to update the values of an array, use the is stored as or the is appended to list operators in your node output.
See also: Custom Node Outputs
If the completion of a task in a process requires the same user to complete a subsequent task, you can activity-chain the two tasks together in your process model. This enables successive form-completion by the same user by chaining the attended tasks together and creating a process wizard (similar to an install wizard).
CAUTION: Long activity chains - greater than 50 node instances OR 5 seconds between attended activities - are strongly discouraged because they have both an adverse effect on the performance of the system at scale and the experience of the user.
In order to chain two attended nodes together in a process model, you must enable activity-chaining on their intermediary flow connector.
To enable activity-chaining between two attended nodes, right-click a flow connector and select Enable Activity-Chaining - OR - Double-click the connector to display the Flow Properties dialog box, and select Yes for the Enable Activity-Chaining option followed by OK.
A chain link icon appears on the flow connector between the two nodes to signify they are chained together.
Repeat this action for each intermediary flow between the first and last nodes in your activity-chain.
Activity-chaining is not recommended for use with approval tasks.
If you navigate away from the task form in the middle of a chain, all pending tasks are available from your Task Inbox.
When an attended node is chained to another node, by default, the user assigned to the first node overrides the Assignment settings for the next attended node and is automatically assigned to that node as well.
For example, the image below shows lane assignments configured for tasks in the System Administrator and New User lanes. Normally, all attended activities within the lanes are assigned to specific user, group, or set of users and groups. When activity-chaining is enabled, the system assigns any subsequent chained tasks to the person who completed the first task; thereby, assigning the "Upload User Documents" task to the System Administrator once they complete the "Enter User Information" task.
If you want your process to maintain the task assignments, deselect the Override assignment… setting on the Flow Properties dialog box.
Once a chain breaks, the next attended task appears in the user's task list (unless it is a Quick Task). To resume the chain, the user must complete the task and then click Next or Continue. Users cannot step back into attended tasks originally part of the chain before it broke.
Activity-chains can break in the following manner:
custom.propertiesfile. See also: Configuring Process Execution Properties
When an activity configured to run multiple instances is part of a chain, any one of the instances is randomly selected as the next node in the chain.
In the example above, a chain is established with Node A, Node B, and Node C. Node A and C are regular tasks, while Node B is configured to run multiple instances - one instance for each assignee.
Upon completion of Node A, any one instance of Node B appears. If three instances of Node B are spawned, any one of those 3 instances may appear as the next task in the chain after Node A has been completed.
Upon completion of Node B, the task for Node C appears. If the "Allow users to step back to this node from the next chained activity" option is selected on Node A, B, and C, you can step back and forth between Node A, B, and C any number of times.
If you complete Node A and B and while viewing the task form for Node C, and you step back to B, all information entered in Node B appears on the task form for Node B.
If then you decide to step back from Node B to Node A, all information entered in Node A appears on the task form. In this case, the completed instance of Node B is deleted from the system. When you click "Next" to move to Node B, a new task form appears. Previously entered data will be lost. If any of the nodes (A, B, or C) do not have the "Allow users to step back to this node from the next chained activity" checkbox selected, a "Back" button does not appear in the next task form. You are not able to navigate back to the previous task.
This example assumes that the "Override assignment for the next attended activity even if the current user is not an assignee." flag is enabled in all chained flows.
When an activity that is scheduled to run periodically is part of a chain, the first instance is chained. All subsequent instances are not part of an activity-chain.
Some tasks are part of a process but are not sequential in nature.
A Quick Task is any attended activity that is activated and completed outside of fixed process flow. They are initiated on an ad-hoc basis and a new instance of the task is automatically generated after one is completed. All assignees can view and complete the Quick Task any number of times until the completion or termination of the process.
Any attended process activity can be configured as a Quick Task. Such activities display the following marker.
Like other tasks, quick tasks are not required to have an incoming flow, but they must have an outgoing flow. If a quick task does not have an incoming flow it is activated immediately upon startup of the process.
When a task is configured as a Quick Task the following configuration changes are automatically made:
To configure an attended node as a Quick Task, right-click the node in the designer canvas and select Properties. The General tab of the dialog that opens provides an option to enable or disable the quick task mode for the activity.
When a task is configured as a quick task, existing forms and data configurations are preserved. Task assignees can view and complete the task. Apart from the task assignees, process administrators and users with Manager level access to the process can view and complete quick tasks that are assigned to other users and groups.
Activities that cannot be assigned to users do not display the Quick Task checkbox on the General tab of the properties dialog box. It also does not appear when viewing a process model in the Process Analyst View.
You can also add a Quick Task when editing a running process.
Default values in a task form are evaluated when the task is issued. If these values change, the task form is typically updated with the new values when the task is viewed again. To keep the default values that existed when the task was first issued:
Once a quick task has been activated, you can set it to be disabled if another user attempts to activate it again.
You can configure the quick task so that only the most recent activation of the task is submittable.
Additional execution options are available on the Other Tab.
Once a process has been started, a quick task can be enabled in one of the following ways:
If there are no incoming flows to a Quick Task, it is enabled as soon as the process is started.
If there is at least one incoming flow, the Quick Task is enabled once flow reaches it for the first time. Consider a rule event that waits for a condition to become true, or a receive message event that waits for an incoming message – these Quick Tasks are not enabled until the process flow reaches them.
Once a Quick Task is enabled, all task assignees can view and complete it. Quick Task permissions are evaluated only when the node is first enabled. Permissions are not re-evaluated after each Quick Task instance is completed; only the initial permissions are used.
An in-flight modification of the assignment of a Quick Task does not affect currently-enabled Quick Tasks. It affects only the Quick Tasks activated after the change.
Once a quick task has been enabled, it can be disabled in one of the following ways:
Attempting to complete a quick task that has been disabled displays the following error message.
This task is no longer available
When a process model has multiple outgoing flows, and activity-chaining enabled on each outgoing flow, any one of the outgoing flows is selected. The next attended task from that flow is displayed to the user.
In this example, after completing task form A, the task form for either B or C appears at random (depending on assignment configuration). This is not how you should configure multiple outgoing flows.
Rather than configuring a random flow, the standard design practice is to use a gateway to route the flow to either node.
When a node in a process is configured to run multiple instances (or if a process flow loops back on itself) each copy of the node calls and/or writes to the same process variables (PVs). In such cases, it is possible to have one instance of a flow overwrite the value in another. To avoid this problem, shield the value passed between each node (in a multi-instance flow) using the Keep process variables synchronized option on the Flow Properties dialog box, which is configured by double-clicking the flow connector on your process model.
When the Keep process variables synchronized option is selected, all PV values used in the output phase of a node are protected from overwrites – from the start of the flow – to the start of the next node. For example, if three instances of a node are spawned (and the node is configured to continue the flow after each instance completes) the PVs in outgoing flows are protected from being overwritten by each other.
The overwrite-protection is distinct for each instance, but it does not place a lock on the process variable (meaning that other flows can still write to the PV if you have another using the same variables). This feature also triggers an update to the PV prior to following the flow.
All PVs used during the output phase of a node are shielded from overwrites, when this option is enabled. These include PVs used by expressions in Rules, Timers, and other event conditions.
When the Keep process variables synchronized option is selected, if a PV is used in the Output phase of node execution, it is also protected from overwrites across any subsequently shielded flows. The following nodes frequently consume PVs during the Output phase.
Rule Event: When a protected flow arrives at a Rule Event node, the Rule Conditions are evaluated immediately. If the Rule Event is false (and does not execute) the protected PV value is discarded.
Timer Event: A Timer Event might be triggered during Output; however, if a Timer Event condition is false (and does not execute) the protected PV value is discarded. A true timer event PV that is consumed during the Output phase will be shielded from overwrites.
Gateways: When a protected flow arrives at a gateway, the expressions configured for the node are evaluated immediately. The protected PV value is also retained and made available to any subsequent flows.
Nodes with multiple incoming flows: When processes include gateways with multiple incoming flows with only one outgoing flow, only the PV values carried by a winning incoming flow are passed on to the subsequent node.
Scheduled Nodes: When a protected flow arrives at scheduled node, the protected value is stored until the node executes.
Receive Message Events: Regardless of the configuration setting, PVs will always synchronize across flows on the output flow for a Receive Message Event node.
Protected PV values also keep their shielding when associated with a reassigned task. Any subsequent assignees are supplied the same data as the initial assignee.
As the synchronized option only applies to process flows, you might need to write the value from one shielded flow to a Node Input, then to a Node Output, then to the next flow. This would ensure that the PV value cannot be overwritten during node execution.
If you need to shield more than one flow, we recommend that you put the related nodes into a sub-process.
During the Output phase, a PV's value is written from the Node Output at the same time it is passed to the outgoing flow. You can further shield the PV value in other flows by creating a new PV from the existing value.
To shield a process variable's value through the Start, Run, and Output phases of a node's execution:
Type an expression in the Value field, using the following syntax.
You can configure any task to capture the geographical location from where the user submits the task. This information can be used for audit purposes to ensure that the task was completed from the right location. This requirement is typical in cases where field workers perform on-site tasks like inspections, maintenance and repairs.
To capture the location on a task:
Formstab from under the task properties.
Outputssection under the
Datatab. A new result Submission Location of type LocationResult is now available.
Submission Locationoutput. From the Result Properties section, click on the
New process variableicon.
When the user first runs any location-enabled task from the mobile application, a one-time permission prompt is displayed requesting the user to grant location access to the application. User location is tracked and automatically submitted with the task form only if the user grants permission.
User location is only captured when the task is submitted from Appian for Mobile Devices application. To protect user privacy, a banner is displayed on top of every location-enabled form making it clear to the user that the form is tracking their location.
Once the Home Inspection task form has been submitted by the user, the submission location is stored in the
Submission Location result, which we mapped to task_submission_location process variable in step 3.
Next, let's evaluate the distance between the task submission location and the home location using the distanceBetween function which evaluates the distance (in meters) between two locations specified by their latitude and longitude coordinates.
The following steps assume you have a process variable named home which has latitude and longitude fields.
Script Taskfollowing the
Outputssection under the
Datatab and click on the
New Custom Output.
Expressionbox from under
Expression Proeprties, use the following expression to evaluate the distance between the task submission location and the home location.
1 2 3 4 5 6 7 if( pv!task_submission_location.isAvailable, a!distanceBetween(pv!task_submission_location.location.latitude, pv!task_submission_location.location.longitude, pv!home.latitude,pv!home.longitude ), cons!INVALID_LOCATION )
iOS and Android Location services do not guarantee that the location delivered is accurate. Rather, a best effort is made, and may be constrained both by the capabilities of the device, the location, and the environment from which it is used. The uncertainty in location is captured in the horizontalAccuracy field of the Submission Location result data. This expresses the uncertainty in the reported location in meters.
You can account for this uncertainty by comparing the evaluated
distance to the
pv!task_submission_location.horizontalAccuracy value. Generally, you can assume that the task was submitted from the right location if
distance < 2 * pv!task_submission_location.horizontalAccuracy. If the
distance is larger, you may choose to initiate an audit into the that task.