Genpact Cora Knowledge Center

Support

Configuring HTTP Service Activities

V9.2

Overview

Configuring the HTTP service activities is an important step to expose the HTTP service, and start or resume a workflow when the service is called from an external application. Configure the HTTP activities after you have created an HTTP listener and defined its API definitions.
For details on how to create an HTTP listener for HTTP service, refer to the Setting Up the HTTP Service article. 

For an HTTP service, there are three main HTTP activities that must be added and configured in the workflow:

  • HTTP Input activity 
  • HTTP Output activity 
  • HTTP Fault activity

Watch this video to learn how to confiture the HTTP service activities.


 HTTP Input activity 

With the HTTP input activity you can select the HTTP service and operation (method) that you want to listen to in a dynamic workflow. The input activity helps you configure the entry point for the defined HTTP service request.

To add and configure an HTTP input activity in a workflow:

  1. On Cora SeQuence Admin portal, open the workflow in which you want to add input activities.
  2. From the tools panel, add HTTP Input activity.
  3. Enter Name, Alias and Description, and then click Next.
  4. Select from the list, the HTTP listener created for the HTTP service.
    You may also add new, and edit or delete an existing listener from here.
  5. Click Next.
  6. On the HTTP Listener Input Bindings screen, select the operation (method) that you wish to invoke.
    The selected method response is displayed to bind between the parameters and a data source.  
  7. Click Finish.

HTTP Output activity

With the HTTP output activity, you can bind the already created HTTP input activity to the data fields in the workflow. The output activity displays the workflow output in the respective fields.

To add and configure an HTTP output activity in a workflow:

  1. From the tools panel, add HTTP Output activity.
  2. Enter Name, Alias, and Description, and then click Next.
  3. On the HTTP Output Bindings screen, select the respective Input activity, and define the bindings between the HTTP service fields and the required data fields.
  4. Click Finish.

On execution, the activity maps the returned objects from the HTTP service to the workflow data fields.

This activity sends the response at the end of the execution path. To send a response immediately after the activity is executed one of the following conditions must exist in the workflow design.

  • There is a blocking activity after the HTTP Service Output activity: Form, Task, or Timer.
  • The HTTP Output activity is triggered manually. For example, the user clicks Submit to trigger an automatic link after the HTTP Output activity.

NOTE
You can use the values returned in the HTTP Output object in subsequent activities, by selecting HTTP Output object > ReturnValue in the Expression Editor.

HTTP Fault activity

With the HTTP Fault activity, you can define an error message for an HTTP service activity failure. You can only use this activity as part of a workflow that also includes an HTTP Input activity, and can execute this as part of an Error Handling and Compensation section of the workflow.

To add and configure an HTTP fault activity in a workflow:

  1. From the Tools panel, add HTTP Fault activity.
  2. Enter Name, Alias, and Description, and then click Next.
  3. On the HTTP Fault Bindings screen, select the respective Input activity, choose the error from the Type list, and define the bindings between the selected error and the required data fields (if applicable).
    For more details regarding error handling and HTTP service error catalog, refer to the Setting up the HTTP Service article.


Want to learn by doing? 
Check out this hands-on exercise.
Note that only internal users can access the link.