After you publish a taskflow as a service, you can run the taskflow as an API or schedule the taskflow. You can use the endpoint URLs to run the taskflow as an API, and dynamically provide input parameters for the tasks that the taskflow contains and perform orchestration.
1Navigate to the taskflow that you published as a service.
2From the Actions menu, select Properties Detail.
The Properties Detail dialog box appears displaying the service URL and the SOAP service URL as shown in the following image:
3Open a browser and paste the service URL with the input fields and values. If the taskflow uses authentication, you must enter the allowed user name and password.
The service returns the taskflow run ID as the response. You can monitor the taskflow execution by using the run ID.
Passing inputs through a REST client
When you have multiple input values to pass and have a complex body, you can use a REST client such as Postman. You must use the service URL and the API definition available in the Swagger file to send a request through a REST client. The Swagger file contains the operation name, authentication method, and the input for the taskflow. You can use the Swagger editor to parse the Swagger file and get the Swagger request.
2Select the HTTP verb such as GET or POST and specify the generated REST service URL as shown in the following image:
3Enter the user account details in the Authorization tab.
4Specify the swagger request in the Body tab as shown in the following image:
5Specify the input values in the request body.
6Click Send.
You receive the taskflow run ID as the response as shown in the following image:
Resume a suspended taskflow
You can use the resumeWithFaultRetry resource to resume a suspended taskflow instance from a faulted step. You can also use the resumeWithFaultSkip resource to skip a faulted step and resume a suspended taskflow instance from the next step.
resumeWithFaultRetry
To resume a suspended taskflow instance from a faulted step, use the following URI in a PUT request:
PUT <Informatica Intelligent Cloud Services URL>/active-bpel/management/runtime/v1/resumeWithFaultRetry/<run ID>
Include the following information in the request:
Field
Type
Required
Description
run ID
String
Yes
Run ID for the taskflow.
resumeWithFaultRetry PUT example
Use this sample as a reference to resume a suspended taskflow instance from a faulted step in a PUT request.
PUT https://na1.dm-us.informaticacloud.com/active-bpel/management/runtime/v1/resumeWithFaultRetry/681134580186693632
Accept: application/json
INFA-SESSION-ID: 9KA11tLGqxVcGeul8SQBK3
resumeWithFaultRetry PUT response
Returns the 204 response code if the request is successful.
Returns an error object if error occurs.
resumeWithFaultSkip
To skip a faulted step and resume a suspended taskflow instance from the next step, use the following URI in a PUT request:
PUT <Informatica Intelligent Cloud Services URL>/active-bpel/management/runtime/v1/resumeWithFaultSkip/<run ID>
Include the following information in the request:
Field
Type
Required
Description
run ID
String
Yes
Run ID for the taskflow.
resumeWithFaultSkip PUT example
Use this sample as a reference to skip a faulted step and resume a suspended taskflow instance from the next step in a PUT request.
PUT https://na1.dm-us.informaticacloud.com/active-bpel/management/runtime/v1/resumeWithFaultSkip/681134580186693632
Accept: application/json
INFA-SESSION-ID: 9KA11tLGqxVcGeul8SQBK4
resumeWithFaultSkip PUT response
Returns the 204 response code if the request is successful.
Returns an error object if error occurs.
Listing suspended taskflows through an API
You can use a JLS API to get a list of taskflows that are suspended. By default, the number of suspended taskflows that the API returns is 200.
To get a list of suspended taskflows, use the following URI:
{{<Informatica Intelligent Cloud Services URL>}}/jls-di/api/v1/Orgs(<Organization ID>)/JobLogEntries?$top=<Number of suspended taskflows>&$filter=(status eq 'SUSPENDED' and assetType eq 'TASKFLOW')
To get a list of latest suspended taskflows within an organization based on the users who started the taskflows, use the following URI :
{{<Informatica Intelligent Cloud Services URL>}}/jls-di/api/v1/Orgs(<Organization ID>)/JobLogEntries?$top=<Number of suspended taskflows>&$filter=(status eq 'SUSPENDED' and startedBy eq '<username>' and assetType eq 'TASKFLOW')
Terminating taskflows through an API
You can terminate one or more taskflows using an API. The maximum number of taskflows that you can terminate at a time is 200.
Use the following URI to terminate one or more taskflows:
PUT <Informatica Intelligent Cloud Services URL>/active-bpel/services/tf/terminate
Enter the taskflow run IDs as the input in the body of the PUT request.
Enclose the run IDs within double quotation marks and separate multiple run IDs with a comma. For example, enter: < { "runid" : [ "7645954072982472420" , "675348537035183518"] } >.
The API displays error messages when you enter a run ID that does not exist or is not valid. The API supports basic authentication and session ID authorization.
The following image shows a sample terminate request and response: