Skip to main content
?

Service (Workflow Abstraction)

Overview​

Service is a reusable function

  • Takes in a set of INPUT arguments
  • Performs set of actions
  • Gives out an OUTPUT

How to use Service​

  • A service helps the server by taking out commonly used actions into a reusable group.
  • A service performs a set of operations and its’ actions.
  • A service has an INPUT and an OUTPUT similar to functions in a programming language.

For example, a service to get email from a GMAIL API can be reused by many servers, where the service has multiple actions to accomplish the get email task.

API Autoflow Overview

Configuring a Service​

Create a new Service​

Creating New Service

Create an ID for the Service​

Creating Service ID

Add a new operation​

Adding New Operation
Adding New Operation

Then a new service operation will be created. Now you can click the service operation to expand.

New Operation

Create Input and Output arguments​

Creating Input and Output Arguments

💡 Arguments may also be defined in JSON Schema. For example, for the below JSON, 'username' and 'password' are string arguments:

    "username": { "type": "string" },
"password": { "type": "string" },

Define the input and output​

💡 Behind the scene, JSON Schema is used to perform the input and output validation.

Defining Input and Output
You can add more input and output values with "add" buttons. Checkbox represents input/output value is required or not.
Defining Input and Output

Add Actions​

Refer to the Actions section on how to use Actions.

Map the Action’s output with the Service operation output​

Mapping Action Output

💡 The data stored in the scope variable path output is being mapped to the service’s output

💡 You can put actions using + button in before or after the action.

How to use a Service​

Add Service/Operation action

Adding Service/Operation Action
Choose a Service Operation
Choosing a Service Operation
Select the Service operations
Selecting Service Operations
Set the data to insert into the service INPUT
Setting Data for Service Input

Versioning the Service​

You can version the Service for easier rollback and management.

Add new version​

Setting Data for Service Input

Press the Add Version to create a new version.

Click on the trash icon to delete the version.

Service Data Simulation​

Refer to the Data Simulation section for how to use the simulation feature.

Service Data Simulation