Creating custom operations in flow services

The example shows how to create a custom operation in a flow service and use it to generate a Salesforce CRM backend account.

About this task

webMethods Integration includes predefined connectors that contain SaaS provider-specific information that is necessary to connect to a particular SaaS provider. Each connector uses an account to establish a connection with the provider's backend and run tasks. Each connector includes a predefined set of tasks. Custom tasks can also be created when you create a flow service.

Procedure

  1. After you log in, select a project or create a new project where you want to create the flow service.
  2. Click the Flow services tab, then click Plus icon.
  3. Provide a name, such as SalesforceCreateAccountCustom and a description for the new flow service.
  4. In the rectangular box, type Salesforce , select Salesforce CRM, and then select Add Custom Operation.
  5. On the Connect to account page, select the supported authentication type and the Salesforce CRM account that is created from the drop-down list. Provide a name and description of the custom operation.
  6. Select Create operation.
    Note that for REST-based connectors, after selecting the operation, you can click Headers to add input Headers, if required. webMethods Integration displays the default HTTP transport headers for the operation, along with their default values. At run time, while processing the headers, webMethods Integration substitutes the values as necessary. To customize the headers, do the following:
    • Click Plus icon to add a custom header.
    • Click the Header info icon to specify the header name and an optional default value for the header variable. If the variable is null in the input pipeline, this value is used at run time. If the variable already has an existing default value that is defined, this value overwrites the existing value at run time.
    • If headers appear in the signature, select Active to activate the headers in the signature.
    • To delete a custom header that you have added, click Delete.
      Note: You cannot delete the required headers.

    You can also customize the parameters for REST-based connectors after selecting the operation, by clicking the Parameter option. Review the operation parameter details. IBM® webMethods integration displays the parameter Name and Description, the data type used to represent the kind of information the parameter can hold, the parameterization type of the request, and the default value that is needed to access the operation. To specify a default value for the parameter, click the Header info icon and then type or paste the default value. The default value is used at run time. You cannot add or delete request parameters. You can modify the default value of a parameter. All parameters appear in the signature.

    Now, go back to our example. 7. After you select the Create operation, click Next, then select the Business Object Account. Business Objects appear only for certain connectors and operations.

  7. Select the data fields and confirm the action to create the custom operation. Data fields appear only for certain connectors and operations.
  8. On the Flow Editor, click the I/O icon to define the input and output fields.
  9. Create two input fields, AccountName and CityName.
  10. Click Mapping icon to edit the flow service mapping. Only fields that are selected earlier are shown in the input page.
  11. Save the flow service and click Run. Provide the custom field values in the AccountName and CityName fields, for example, Software

What to do next

View the flow service execution results of the flow service after a successful run.