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.
Configuring a Service​
Create a new Service​
Create an ID for the Service​
Add a new operation​
Then a new service operation will be created. Now you can click the service operation to expand.
Create 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.
You can add more input and output values with "add" buttons. Checkbox represents input/output value is required or not.Add Actions​
Refer to the Actions section on how to use Actions.
Map the Action’s output with the Service operation 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
Choose a Service OperationSelect the Service operationsSet the data to insert into the service INPUTVersioning the Service​
You can version the Service for easier rollback and management.
Add new version​
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.