Execution Module

The Execution module allows you to control steps a robotic process must take to successfully start, execute, and complete on a resource. These default steps often require communication with the Appian RPA server. The Execution module contains methods that enable a robotic process's communication with the server, whether to retrieve information or send it to help a developer understand what's happening and when.

This page discusses the methods contained in the Execution module, which provides an easier and more robust development experience.

Developers who feel more comfortable working in the robotic process's code can use Java methods to configure server communication actions. These methods are contained in the Client module and can be found in the com.novayre.jidoka.client.api.IJidokaServer, com.novayre.jidoka.client.api.IJidokaRobot and com.novayre.jidoka.client.api.execution.IExecution interfaces.

Using the Execution module

The methods contained in the Execution module group are helpful throughout a robotic process execution. As an execution completes, a robotic process may have to send resulting files to the server. These methods are often used in the robotic process's clean up workflow to help reset the resource. Use the communication methods to send messages to the execution log throughout the robotic process, which may be helpful for debugging.

While these methods can be called using methods in the Java code, using the methods from the robotic process workflow is both easier and more robust. When you build the robotic process workflow, you'll see the following methods available in the Execution module:

Add file to robot result

This method lets you add the file to the clean up process and returns it as a result in the Appian RPA console.

You can configure CONFIGURATION and AFTER COMPLETION parameters for this method.

Configuration

In the CONFIGURATION area of the method pane, configure the following parameters:

  • File: Add the file using the absolute path of the file. This field accepts variables of type text. Enter a path using plain text, a robotic process variable, or an expression.

To access the file after the robotic process finishes execution, go to the Appian RPA console. The files appear in the Output column on the List of executions page, where you can download them.

After completion

In the AFTER COMPLETION area of the method pane, configure the following parameters:

  • Wait before executing next action: Enter the number of seconds the robotic process waits before it continues to the next action in the workflow.
  • Take a screenshot: If you select this option, the robotic process takes a screenshot of the resource immediately after the action completes successfully.

Check if robot available

Users can configure robots to run at certain days and times. The Check if robot available method is useful if the robot works with an application that is only available on certain days and times. You can use this method during execution to check if the current robot can still run. This method has no configuration parameters because it simply checks to see if the current robot can continue to run.

You can configure OUTPUT and AFTER COMPLETION parameters for this method.

Output

This method returns a Boolean. If the robotic process is available, it returns true. The result is false if the robotic process isn't available.

In the OUTPUT area of the method pane, configure the following parameters to store this result:

  • Operator: Select an option to store the result as a single-value variable (is stored as) or add the result as a multiple-value variable (is appended to).
  • Target: Enter the name of the robotic process variable where you want to store or append the result. If your process variable is type CDT, you can specify which field of a CDT to store the result into using dot notation.

After completion

In the AFTER COMPLETION area of the method pane, configure the following parameters:

  • Wait before executing next action: Enter the number of seconds the robotic process waits before it continues to the next action in the workflow.
  • Take a screenshot: If you select this option, the robotic process takes a screenshot of the resource immediately after the action completes successfully.

Log

A robotic process may need to send a message to the server as part of its clean up workflow. Although this is a common clean up action, you can use these methods at any time in the robotic process. The type of message you send depends on the type of event. For example, you may want to build logic into your robotic process to send an ERROR message when a particular action isn't completed successfully, but not send a message when it proceeds as expected.

You can configure CONFIGURATION and AFTER COMPLETION parameters for this method.

Configuration

In the CONFIGURATION area of the method pane, configure the following parameters:

  • Message: Enter a message to send to the console's execution log. This field accepts variables of type text. Enter a message using plain text, a robotic process variable, or an expression. This field is required.
  • Level: Choose the message type to appear in the execution log:
    • TRACE: Send a TRACE message to the execution log.
    • DEBUG: Send a DEBUG message to the execution log.
    • INFO: Send an INFO message to the execution log.
    • WARN: Send a WARN message to the execution log.
    • ERROR: Send an ERROR message to the execution log.
    • FATAL: Send a FATAL message to the execution log.

After completion

In the AFTER COMPLETION area of the method pane, configure the following parameters:

  • Wait before executing next action: Enter the number of seconds the robotic process waits before it continues to the next action in the workflow.
  • Take a screenshot: If you select this option, the robotic process takes a screenshot of the resource immediately after the action completes successfully.

Example: Sending messages

To send a message to the execution log:

  1. Go to the Appian RPA console.
  2. Open a robotic process configuration and navigate to an action in the workflow.
  3. Click the action and click the list icon 951644.png.
  4. From the Module tree, open the Execution module.
  5. In the Message field of the Configuration area, type the message you want to send the execution log. You can also use the expression editor to configure how the message is populated. To build a conditional message, use an if() statement in the expression. Note that the expression changes the message content, not the message type.
  6. Select the message Level: TRACE, DEBUG, INFO, WARN, ERROR, or FATAL.
  7. Configure AFTER COMPLETION parameters.
  8. Click OK.

To send a different type of message (INFO vs. ERROR, for example) based on a condition in your robotic process, integrate a conditional action into the workflow:

  1. Add a conditional action to the workflow.
  2. Click the action and click the list icon 951644.png.
  3. To write an expression for the condition, open the Appian Services module and click Evaluate expression. In this example, the expression simply evaluates if a robotic process variable exists. If it is null, we want to send an error message to the console:

    1
    2
    3
    
     if(isnull(pv!stockPrice),
     "error",
     "success")
    
  4. In the OUTPUT area, choose how to save the output in the Operator field, and where to save the output in the Target field.
  5. Click OK.
  6. In the workflow, connect the conditional action to additional actions based on the possible outcomes. In this example, it would be two actions: one that uses the Error method and one that uses Info and continues the workflow as normal. You may not find it necessary to send a message when an action completes successfully, but we've included it here for demonstration.
  7. Name the connections so they match the possible outcomes exactly: error and success. rpa-server-msg-example.png

  8. Save the workflow.

Pause

This method adds a pause in the robotic process execution. A pause can be useful between two methods if the resource needs time to load before further action. For example, if a large report takes a few extra seconds to load, you can use the Pause method to ask the robotic process to wait before proceeding to the next action in the workflow.

You can configure CONFIGURATION and AFTER COMPLETION parameters for this method.

Configuration

In the CONFIGURATION area of the method pane, configure the following parameters:

  • Use default time: Use the default time to pause. This value is specified in the Set pause duration method.
  • Enter time: Enter a custom time to pause, in milliseconds. This field accepts variables of type text. Enter a path using plain text, a robotic process variable, or an expression.

After completion

In the AFTER COMPLETION area of the method pane, configure the following parameters:

  • Wait before executing next action: Enter the number of seconds the robotic process waits before it continues to the next action in the workflow.
  • Take a screenshot: If you select this option, the robotic process takes a screenshot of the resource immediately after the action completes successfully.

Send screenshot

This method sends a screenshot of the resource to the console. The screenshot is taken immediately when this action begins, and you can add an optional description to include with it.

You can configure CONFIGURATION and AFTER COMPLETION parameters for this method.

Configuration

In the CONFIGURATION area of the method pane, configure the following parameters:

  • Description: Add an optional description of the screenshot to send to the console. This field accepts variables of type text. Enter a path using plain text, a robotic process variable, or an expression.

After completion

In the AFTER COMPLETION area of the method pane, configure the following parameters:

  • Wait before executing next action: Enter the number of seconds the robotic process waits before it continues to the next action in the workflow.

Set pause duration

The Set pause duration method allows you to set a variety of pauses in a workflow.

You can configure CONFIGURATION and AFTER COMPLETION parameters for this method.

Configuration

In the CONFIGURATION area of the method pane, configure the following parameters:

  • Type: Select the following pause types:
    • Character pause: Sets the length of time to pause in milliseconds after each character is typed.
    • Default pause: Sets the default length of time to pause in milliseconds when calling the pause() method.
  • Duration (ms): For the selected pause type, enter the length of time to pause, in milliseconds. This field accepts variables of type text. Enter a path using plain text, a robotic process variable, or an expression.

After completion

In the AFTER COMPLETION area of the method pane, configure the following parameters:

  • Wait before executing next action: Enter the number of seconds the robotic process waits before it continues to the next action in the workflow.
  • Take a screenshot: If you select this option, the robotic process takes a screenshot of the resource immediately after the action completes successfully.

This version of the Appian RPA documentation was written for Appian 21.2, and does not represent the interfaces or functionality of other Appian versions.
Open in Github Built: Fri, Oct 22, 2021 (11:11:24 AM)

On This Page

FEEDBACK