Deploy Anywhere Flow Services
Discover various features of deploy anywhere flow services.
Discover various features of deploy anywhere flow services.
A Deploy Anywhere Flow Service is a flow service that is platform agnostic. You can develop integrations on any environment or platform, and then deploy that same integration to various target environments without major modifications.
You can create and run the deploy anywhere flow services using the IBM webMethods Integration Flow Editor. The Flow Editor provides additional options to create deploy anywhere flow services.
As flow services, the deploy anywhere flow services can be imported, exported, and monitored when required. For more information about how to import, export, and monitor deploy anywhere flow services, see Export FlowServices, Import FlowServices, and Monitor.
Adhere to the following guidelines to ensure that the integration flows are well-structured and easier to maintain:
Keep a single integration flow to approximately 100 steps or less.
Modularize complex integration logic flow into smaller, more focused sub-flows or child flows.
Deploy anywhere flow services cannot be created in the default project.
You cannot import or export empty develop anywhere flow services.
The following options are available for deploy anywhere flow services apart from the existing options:
Caching in Deploy Anywhere Flow services
Runtime Logs
The Caching capability in deploy anywhere flow services improves the performance of integrations. When you enable caching, the system saves the pipeline contents in a local cache for a set period, enhancing performance by reducing the need to repeatedly execute resource-intensive operations or retrieve data from external sources.
The caching is accessible in both edge and cloud runtimes with options to enable service cache within the Flow Editor.
For more information on how Caching works in IBM webMethods Integration, see Caching in Flow services.
The caching capability is limited to single-instance runtime and does not support multi-instance runtimes.
Increasing the cache will decrease the available memory. If you face memory problems, consider reducing the number of cached elements.
Implementing a pre-emptive refill will impact performance, while simultaneously enhancing response time.
Go to Projects > Integrations > Flow services.
Click . The Select Flow service type page appears.
Select a deploy anywhere flow service and open Flow Editor page.
Click available on the Flow Editor page and click Settings from the displayed menu. The Settings dialog box appears.
Drag the Enable/disable cache switch to right to enable the cache. The default value is Disabled.
Enter the number of minutes that the flow service results must be stored in cache in the Cache expire field. The default value is 15 minutes.
The expiration timer begins when the server initially caches the results. The IBM webMethods Integration does not restart the expiration timer each time it retrieves the results from the cache. The minimum cache expiration time is one minute.
In the Preemptive Refill field for Refresh Count, provide the number of invocations (for example, 2 or 4). The IBM webMethods Integration system automatically reruns the service to refill the results in the cache.
Click Done. The flow service page appears.
Save and run the flow service. If the flow service runs successfully, the results are stored in the cache. Otherwise, the results are not cached.
You can view runtime log entries for a selected runtime directly within the Flow Editor. This allows you to access information such as logs for auditing, and monitoring server activity.
The runtime logs view does not support viewing logs from multiple runtime instances.
Certificate-based authentication is limited to edge runtime (ERT) deployment only. The certificate must be deployed as part of the container configuration or included in the image.
The following table describes the icons available for viewing runtime logs:
Icons | Description |
---|---|
Refresh () | Retrieves the latest execution logs for a selected runtime. |
Download Logs () | Allows downloading the execution logs for a selected runtime. Note
The logs can be downloaded and saved as a csv file on your system.
|
Go to Runtime () | Returns you to the runtime environment. |
Help () | Navigates you to the help document. |
Close () | Closes the server log view. |
Navigate to the Flow Editor page.
Select a runtime from the drop-down list.
Click Logs from the Flow Editor pane.
The list of logs associated with the runtime appears. The Runtime Logs view displays the logs in descending order, showing the most recent entries at the top.
Only the Database connector is supported.
The following Built-in Services are not supported:
Thus, imported packages using these services cannot be guaranteed to work without refactoring.
The warning message is not displayed while exporting deploy anywhere flow services.
Look-up transformers are not supported.
The Overview option is not available for deploy anywhere flow services.
The Publish, Deploy, and Reference data features are not available for deploy anywhere flow services.
While importing, if a dependent deploy anywhere flow service has the same name as an existing deploy anywhere flow service in the same project, then the existing deploy anywhere flow service in the target project is overridden.
Workaround: You must manually delete the deploy anywhere flow service with the same name in the target project and re-import the deploy anywhere flow service.
You cannot import or delete deploy anywhere services created by other users.
The dependent services are not displayed when exporting the deploy anywhere flow services containing database connection. However, the export is successful as indicated by the confirmation message.
The edge runtime linked to a deploy anywhere flow service does not get cloned and is reset to cloud runtime. You must set the desired edge runtime and save the cloned deploy anywhere flow service.
Importing a workflow that uses the deploy anywhere flow service does not import those services. The service must be imported manually.
To begin, let us implement the classic Hello World use case to log a greeting in the edge runtime’s log.
Ensure that your IBM webMethods Integration tenant has the Develop anywhere, Deploy anywhere feature enabled.
You have the username and token for accessing Container Registry.
Ensure that you have access to a container runtime such as Docker or Rancher on your machine.
Click Integration Runtimes on the IBM webMethods Integration title bar.
Click the (Plus) icon. The Register Edge Runtime wizard appears.
Click Create new Edge Runtime.
You are redirected to the Get Edge Runtime Image page. The page contains a Docker command that retrieves the Edge Runtime image from the container registry.
To obtain the user name and user token details:
a. Click the Container Registry link available under the first text box in the Sign in to Container Registry section.
You are directed to the login page.
b. Enter your credentials.
c. Click Next. After successful login, the container registry home page appears.
d. Click the User Profile icon > Settings.
The User Profile page appears.
e. Click Generate Password. The Container registry credentials confirmation message appears.
f. Select the terms and conditions checkbox after going through them. The token name and password are generated.
These details are required for logging into the container registry. You can copy the command listed under Docker login and save it for later reference.
g. Close the Container registry credentials dialog box and go to the Register Edge Runtime wizard.
To log in to the container registry:
a. Open any container runtime terminal window.
b. Copy the command from the first text box in the Get Edge Runtime Image section using the (copy) icon and paste it on your terminal window or command prompt.
b. Replace user name and user token with the values generated in Step 4.
c. Press Enter to run the command. After successful validation, the Login Succeeded message appears.
d. Go to the Register Edge Runtime wizard.
To pull the edge runtime image:
a. Copy the command from the last text box in the Get Edge Runtime Image page using the (copy) icon and paste it on your terminal where you want to run the container.
b. Press Enter to run the command. The latest edge runtime is downloaded.
c. Go to the Register Edge Runtime wizard.
Click Next. The Configure page appears.
Enter a name and description for the new edge runtime, so that you can easily identify it later.
Click Next. The Connect page appears.
Click Start Pairing. A pairing code including the cloud URL and a registration token is generated.
Copy the pairing code using the (copy) icon and paste it on your terminal where you want to run the container.
Press Enter to run the command. Upon successful pairing the edge runtime, is registered.
By registering, connections from your Cloud tenant are created with the edge runtime.
Once you have registered edge runtime, the next step is to create an integration project. A project represents the entire logic and assets for a set of integrations that can be deployed across multiple runtimes.
Click Projects on the IBM webMethods Integration title bar and click to create a new project.
The New Project dialog box appears.
Provide a suitable name for the project that you want to create. In this case let us call it HelloWorld.
Click Create. The project HelloWorld is created.
Now that you have a project, let us start developing services to implement our hello world scenario.
You can create the following type of services in a project:
Workflows: Low code orchestration for long running asynchronous tasks and connecting to third-party Cloud Services through connectors.
Flow services: Visual code editor for developing low latency powerful integrations involving sophisticated business logic and data transformations.
To start creating a deploy anywhere flow service,
Go to the project HelloWorld > Integrations > Flow services.
Click the icon. The Select Flow service type wizard appears.
Here, you have two options:
Flow Service: Choose this category if you do not want to use the integration runtimes. In this case, the editor uses the Flow services syntax, and these services can only be run in the cloud.
Deploy Anywhere Flow Service: This is the new flow service syntax that allows you to run services anywhere, whether it be in the cloud runtime or an edge runtime running in your own private cloud or data center. Selecting any runtime under this section ensures that your service is compatible with the new execution model.
For our purpose, select Deploy Anywhere Flow Services and click Create. The Flow Editor appears where you can start creating a deploy anywhere flow service.
Provide a name, for example, HelloWorld, and an optional description for the new deploy anywhere flow service.
To try out your service, you need to select a runtime to specify where the service will run. There are two different types of runtimes available:
Cloud runtime
Edge runtime
For our purpose, select the runtime that you registered in the previous section. If you skipped that step, then select cloud runtime to run your service on the default runtime that runs on cloud.
Let’s now add some logic to our service.
On the new Flow step, click on the rectangular box to see a list of available steps.
Start typing 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 edge runtime that this service is run on.
Let’s set the inputs to allow us to log the hello message.
Click on the debugLog step. The resulting view is called the Pipeline panel and allows you to 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.
Click the button at the top of the Flow editor page. The Define input and output fields dialog box appears.
Click the button in the Define input and output fields dialog box to add a new input for your service and call it greeting.
Click Done to close the Define input and output fields dialog box.
Map the new greeting input from the pipeline input column to the message input of the debugLog step.
Click the (Save) button at the top of the Flow editor page to save the service.
Click the (Sync) button at the top of the Flow editor page to synchronize the service. This action ensures that your service gets linked to the edge runtime.
Click the (Run) button at the top of the Flow editor page. The Input values dialog box appears.
Specify the input values as Hello World!! and save the value.
Click Run to view the result. The values for the input fields Hello World appear.
You can also choose to view the message in the runtime log file of the targeted edge runtime through the Integration Runtimes page. For more information on viewing logs, see Logs.