Building deploy anywhere flow services

Get started with deploy anywhere flow services by exploring this basic example. It helps you quickly understand how to configure, run, and deploy flows across different environments.

Before you begin

  • Make sure that deploy anywhere flow services is enabled.
  • Make sure that you have access to a container runtime such as Docker or Rancher on your workstation.
  • A self-managed runtime is registered and running.

Procedure

  1. Create a project.
    1. Go to Projects and click Add to create a new project.
      The New Project dialog is displayed.
    2. Provide a name for the project that you want to create. In this case call it as HelloWorld.
    3. Click Create.
      The project HelloWorld is created. Now that you have a project, start developing services to implement the hello world scenario.
  2. Create a deploy anywhere flow service to log a message
    1. Go to the project HelloWorld > Integrations > Flow services .
    2. Click the Add icon. The Select Flow service type wizard is displayed.
    3. Select Deploy Anywhere Flow Services and click Create.
      This option is the new flow service syntax by using which you can run services anywhere. You can run them in a cloud runtime or a self-managed runtime operating within your private cloud or data center. Selecting any runtime makes sure that your service is compatible with the new execution model.
      The Flow Editor is displayed where you can start creating a deploy anywhere flow service.
    4. Provide a name.
      HelloWorld, and a description for the new deploy anywhere flow service.
    5. On the new flow step, click the rectangular box to see a list of available steps.
    6. Type debug and then select the debugLog operation. This command is used to implement the hello world logic by displaying a hello message in the server log of the self-managed runtime that this service is run on.
      Set the inputs to log the hello message.
    7. Click Pipeline on the debugLog step. The resulting view is called the Pipeline panel and you can map the input and output fields of the debugLog step.
      However, the pipeline input is empty. Inputs must be specified for the service before mapping anything to debugLog.
    8. Click the i/o button. The Define input and output fields dialog is displayed.
    9. Click the Add button in the Define input and output fields dialog to specify an input for your service and call it as a greeting.
    10. Click Done to close the Define input and output fields dialog.
    11. Map the new input, greeting from the pipeline input column to the message input of the debugLog step.
    12. Click Save to save the service.
      This step completes the design of your deploy anywhere service logic.
  3. Run the deploy anywhere service.
    To try out your service, you need to select one of the following runtimes to specify where the service runs.
    • Cloud Designtime
    • Self-managed runtime
    Note: Choosing a runtime does not link your service to a specific runtime environment. It helps determine the appropriate flow service syntax for you to test or run the service directly from the editor.
    1. Select the runtime that you registered. If you skipped that step, then select Cloud Designtime to run your service on the default runtime that runs on cloud.
    2. Click Save to save the service.
    3. Click Sync to synchronize the service. This action makes sure that your service gets linked to the selected runtime.
    4. Click Run.
      The Input values dialog is displayed.
    5. Specify the input values as Hello World!! and save the value.
    6. Click Run to view the result.
      The values for the input fields Hello World is displayed.