Creating and managing a service
Before creating a monitor for a project, you must create a service and mention the type of authentication required for the service. In IBM Process Mining, you can create a service using Rest API and an SMTP server. You can invoke the service whenever the monitor detects data. For example, the API that composes the service can be invoked whenever the monitor detects data. The results created by a monitor are passed as inputs to the API or SMTP.
For more information, see the following sections:
Understanding the relation between service and monitor
The data that is collected after every monitor run is packaged into a JSON payload and sent to the associated Service endpoint, which is defined by the user.
When you create a monitor event, you can define query parameters and request header parameters in the service API call. In IBM Process Mining, you can define the Body Parameters option to ensure that the payload uses a predefined JSON format, which includes all the available data or you can use the Customised Body option to customize the payload to a specific format. For more information on various types of monitors and the settings, see Types of monitors.
Creating a service
On the Action Hub page, you can create a service to Rest API and an SMTP server.
Creating a service using a Rest API
You can use the following steps to create a service using Rest API:
-
Open a project and then go to the Action Hub page.
-
On the Action Hub page, click Create service.
-
In the Service Type section of the Create a new service dialog, ensure that Rest API is selected, and then in the Service title field, type a name for the service.
-
In the Description field, type a description for the service that you are creating.
-
In the URL field, type the URL to which the results must be published. Note that you need to provide the complete URL with
http://
orhttps://
. -
Set Allow self-signed certificates to True if the certificates are from trusted source. You can toggle to True or False based on the API that you want to create.
-
Set Share with others to True to share the service with other accounts in the organization. Otherwise, Set Share with others to False.
-
In the Authentication type section, click one of the following types:
- API key, if the authentication is performed based on an API key and value.
- Basic Auth, if the authentication is performed using a login credential.
- No Auth, if there is no authentication required.
-
For the API key authentication, do the following steps:
a. In the Position field, select Header or Query.
b. In the API key name field, type the name for the API key.
c. In the API key value field, type the value for the API key. -
For the Basic Auth authentication, do the following steps: a. In the Username field, type the username. b. In the Password field, type the password.
-
Click Create.
Creating a service to an SMTP server
Starting from IBM Process Mining release 1.14.2, you can create a service to an SMTP server and send the results of a monitor event to the defined email address.
Before creating an SMTP service, you must obtain the following information:
- SMTP server address to which you want to send the result of a monitor event
- Port number of the SMTP server
You can use the following steps to create an SMTP service:
-
Open a project and then go to the Action Hub page.
-
On the Action Hub page, click Create service.
-
In the Service Type section of the Create a new service dialog, click SMTP.
-
In the Service title field, type a name for the service.
-
Optional: In the Description field, type a description for the service you want to create.
-
Set Share with others to True to share the service with other accounts in the organization. Otherwise, set Share with others to False.
-
In the SMTP server field, type the address of the SMTP server to which you want to send the results of a monitor event (for example, smtp-mail.outlook.com).
-
In the Port field, type the port number of the SMTP server (for example, 587). You may need to contact the SMTP service provider to get the port number.
-
In the Username and Password fields, type username and password of the server account.
-
In the Email address field, type your email address. The reply-to field in the recipients email is updated with the value provided in the Email address field.
-
In the Display name box, type the value you want to use as the name of the sender.
-
Set the Force use of a secure connection (TLS) and the Use explicit TLS toggle buttons based on the SMTP service provider.
-
Click Create.
Managing a service
You can use the Manage services page to view all services created for a process and to edit, delete, or duplicate a service created for the process.
To manage a service, do the following steps:
-
On the Action Hub page, click Manage services.
-
To search for a service, type the name of the service in the search box.
-
To sort the services, do one of the following steps in the Sort by box:
- Click Last modified to sort the services based on the modification performed. The latest modified service is displayed as the first one.
- Click Alphabetically to sort the services in the alphabetical order.
- Click Oldest first to view the oldest services created for the process.
-
To filter the services, from the Filter by drop-down list, select Rest API or SMTP
-
To edit a service, do the following steps:
a. In the Manage services dialog, click theicon corresponding to the required service, and then click Edit.
b. In the Edit service dialog, edit the required field, and then click Update.
-
To delete a service, do the following steps:
a. In the Manage service dialog, click theicon corresponding to the required service, and then click Delete.
b. In the Delete service message box, click Delete.
-
To duplicate a service, click the
icon corresponding to the required service, and then click Duplicate.
Related task: