Creating Workflows

Start automating your tasks by creating workflows in IBM webMethods Integration. Understand how to add and configure trigger and actions to your workflow and then test the workflow to ensure that it’s working as expected.


Creating a workflow is fun and easy with IBM webMethods Integration. This tutorial will take you through the six simple steps involved in creating a basic workflow.

Select or add a project

Once you log in, you will be redirected to the dashboard. Here, you will see a sample project, and the + option to create a new project. Projects are like folders that save your workflows within them and help you categorize your workflows. Read more about Projects.

Click on the sample project to create a new workflow within it.

You can optionally choose to create a new project. To do so, click on the + button and provide a unique name for the project in the dialogue box that appears. When you click Create, you will be navigated to the Workflows screen, where you can start creating your first workflow.

Create a blank workflow

To create a new workflow, click the + New Workflow button. This will redirect you to a new window where you can choose one of the following options to create a workflow:

Core components of a workflow

A workflow is essentially made up of two elements: A trigger and one or more actions. A trigger is something that fires off a workflow, and actions are the tasks that the workflow performs automatically.

Let’s create a simple workflow: Whenever you post a new tweet in Twitter, send the tweet content to a Slack channel.

If we break this workflow into parts, we get:

Let’s start with setting up the trigger.

Set up a trigger

To get started with triggers, hover on the Start icon, and click the Settings icon that appears. A pop-up window will appear where you will see the list of trigger applications supported by IBM webMethods Integration. Each of these applications has multiple triggers. Scroll down to locate the application you want, or search at the top if you have a specific application in mind.

In this case, we will look for Twitter and select it. This will redirect you to the trigger configuration window for Twitter.

Configure Twitter - New Tweet or Retweet Posted by Me trigger

We will now configure the New Tweet or Retweet Posted by Me trigger. To do this, enter details in the input fields as per the instructions given below:

Select one of the options, provide the required information as prompted on the screen, and click Add.

This will create a new account for your Twitter account. Once you create an account, you can use it to execute all other Twitter actions and triggers.

Once you have entered all the details, click on SAVE to save your trigger.

This will create the specified trigger on IBM webMethods Integration and redirect you to the Test trigger window, where you can check if you have configured the trigger settings properly.

Test the configured trigger

To test your trigger, you need to perform the trigger event in the web service account for which you have set up the trigger (these instructions can be seen in the Test trigger window as well). For this example, go to your Twitter account and post a new tweet.

Once this is done, go back to your canvas in IBM webMethods Integration and click on the Test button given at the bottom of the Test trigger form IBM webMethods Integration will now fetch the data of the tweet that you just posted on your Twitter account.

If you have configured the trigger correctly, you will see the output data for the trigger. This will give you an idea of how your trigger will work when used in a workflow and which keys are returned in the output of the trigger. This output data will then be used to configure the rest of the workflow.

Alternatively, if you don’t want to test the trigger, you can click the Skip button.

If you Skip testing the trigger, IBM webMethods Integration will use the mock data for that trigger to configure the rest of the workflow.

Set up filters for your trigger

You can also set custom filters to specify the conditions which must be met in order to execute the workflow. To do this, click on the filters link given at the bottom of the trigger output.

You will be redirected to the Filters window where you can set up conditions. Click here to know more about how to set up conditions with filters.

Once you have entered all the details, click on DONE. And that’s it! Your Twitter - New Tweet or Retweet Posted by Me trigger has been configured.

When you return to the canvas, you will notice that the start icon has now been replaced with the Twitter icon. This confirms that the Twitter trigger has been set up properly.

Let’s now set up the action.

Set up an action

For this example, we need to set up the Slack - Post Message to Channel action, which automatically posts contents of the tweet to the specified Slack channel. Here’s how to do it:

Drag-and-drop the connector on canvas

On the right-hand side of the canvas, under Connectors, look for Slack, and drag-and-drop it anywhere on the canvas. You will see that it gets automatically connected to the Start icon (which is now Twitter icon).

Configure Slack - Post Message to Channel action

Double-click on the Slack connector icon. A pop-up window will appear on screen where you can see the configuration form for the Slack actions.

For our example, we need to configure the Slack - Post Message to Channel action. To do so, provide values for the input fields as instructed below:

If you are already logged in to your Slack account, you will be prompted to grant IBM webMethods Integration the permission to access your Slack account. Click Allow. (If you are not logged in, you will be prompted to login first.)

On the next screen, you will be prompted to install the IBM webMethods Integration app for your Slack workspace. Click Install.

This will redirect you back to the canvas. A dialog box will appear where you can optionally change the name of the account you are about to create. Once this is done, click Add.

With this, your Slack account is successfully created. You can now use this account to configure any Slack triggers or actions.

After this, click Next.

This will redirect you to the Post Message to Channel action configuration window.

Configure the Post Message to Channel action as per the instructions given below:

Once you have entered all the details, click Next. This will take you to the Test action window, where you can check if you have configured the action correctly.

Test the configured Slack - Post Message to Channel action

In the Test action window, you can see two tabs: INPUT and OUTPUT. By default, the INPUT tab is open, which displays the input details you have entered for the Slack - Post Message to Channel action.

Scroll down and click on the Test button to check if you have configured the action properly.

Note
  • Testing a Logger action is supported up to 256 KB. If you test a Logger action with data greater than 256 KB, you will get a “Message size too large” error.
  • Testing any other action is supported up to 512 KB. If you test any action with data greater than 512 KB, you will get a “Message size too large” error.
  • To copy-paste the paths and values of input or output data, hover your mouse over the required data, click on the three dots, and then select Copy value or Copy path options based on your requirements.

When you click on the Test button, IBM webMethods Integration will post a message containing the tweet on the specified Slack channel, and will show the output of this action in the window that appears.

This lets you check whether the action is working as expected and also fetches the sample output for this action, which can be used while setting up the next actions.

Skip Test

Click Skip if you prefer not to wait for the test action output to display. When you select Skip, the system continues testing the action in the background, allowing you to navigate to the next screen seamlessly.

After completing the workflow configuration, you can save and reopen the workflow to view the output from the tested action.

Note

If you skip testing an action for the first time and later use that action’s output keys in a subsequent action, you will encounter an error during the second action’s test. This occurs because skipping the test prevents the system from generating the necessary output data, making it unavailable for any following actions.

Additionally, if you skip retesting an action after changing its inputs and then use that action’s output keys in a subsequent action, the system will use the old output data from the first action to test the second action.

Just like trigger, you can optionally set up filters for your actions. The process to set up filters for actions remains the same. Once you have entered all the details, click Done. This will take you back to canvas.

Complete and save your workflow

Your workflow is not complete until you:

With this, you have successfully created your first workflow. It is now time to test it.

Trigger your workflow

To trigger the workflow, we will reproduce the trigger event that we defined in our workflow. In other words, we will post a new tweet on Twitter, which should trigger our workflow.

To do this, log in to your Twitter account, and post a tweet. As soon as you do this, the workflow will be executed.

Note
Some trigger events may take time to trigger the workflow. Read Types of triggers to know more.

You will see the real-time visualization of the progress of your workflow. This will all happen in a matter of seconds. Once the workflow is completed, check the specified Slack channel. You must have received a message containing the tweet.

Now that you know the basics of creating a workflow, read our Additional Features section to learn about the various tools that you can use to further customize your workflows.