Functions

Functions help you manage large automation projects. They let you reuse parts of your code across different processes without copying it. This makes your processes easier to maintain and update.

What You'll Need

  • Access to the Robotiq.ai platform
  • An existing process or the ability to create one

How to Create a Function

  1. Go to the Functions menu.
  2. Click "Create function."

This creates a new function you can add code to.

How Functions Work

Functions are like mini-processes within your main process. They have many features in common with a full process.

Inputs and Outputs

Each function can have multiple input and output parameters.

Example: You could create a function to log into an application.

  • Input parameters: username, password
  • Output parameter: A True/False variable (isLoginSuccessful) that shows if the login worked.

You can use this login function in any process that needs to access that application.

Reusability and Maintenance

Functions help you manage changes easily:

  • If you need to change the login steps, you only update the function.
  • After saving the process, it will use the latest version of the function.
  • To make sure your process uses the newest function version, save the process again.

Local vs. External Functions

Functions can be either local or external:

Local functions:

  • Created inside a specific process.
  • Can only be used within that process.
  • Other processes can't see them.

External functions:

  • Shared across your whole organization.
  • You can use them in any process within any department in HQ.

How to Use a Function

You use functions within a process to break it into smaller, easier-to-manage sections. This gives you more control over the whole process.

Execute a Function

To run a function, use the Execute Function Step.

You need to provide:

  • Input parameters: These can be fixed values or existing variables.
  • Variables for output parameters: These store the results from the function.

Function Limitations

  • Functions do not have stages.
  • Any changes you make to a function affect the process right away.
  • You can use as many functions as you need within a process.
  • Functions can call other functions.

Related Articles

Need Help?

Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.

Was this article helpful?