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
No subtopics in this section
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.
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:
Create Blank Workflow: Create a blank workflow, and customize it as per your requirements using the wide list of applications supported by IBM webMethods Integration.
Check Recipes: Use one of the ready-to-use workflow templates provided by IBM webMethods Integration to get started quickly.
For this tutorial, we will create a new workflow by clicking on the Create Blank Flow button. This will navigate you to the IBM webMethods Integration workflow canvas, where you can see an empty untitled workflow. This canvas is your playground. Here, you can mix and match triggers and operations to create some really awesome workflows.
To rename the workflow, click on the Edit icon given beside the workflow name, at the top-left corner of the canvas. A new window will appear, where you can add or modify workflow details such as name, tags, and description. Once you have entered these details, click on Done. This will take you back to the canvas.
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.
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:
Trigger Label: Provide a suitable name for this trigger. (For example, Twitter - New Tweet or Retweet Posted by Me.)
Select Trigger: Select the trigger, which when occurs, will fire off the workflow. For our example workflow, we will select New Tweet or Retweet Posted by Me. This trigger will start executing the workflow whenever you post a tweet via your Twitter account.
Authorize Twitter: Select the account you want to use to execute the action, from the drop‐down list. If you have not created an account yet, click on the + button. You will see two options:
Default Authorization: Select this option to allow IBM webMethods Integration to automatically generate all keys required to execute Twitter actions.
Or: select this option to provide the relevant keys required to execute all Twitter actions.
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.
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:
Select Action: Select Post Message to Channel action from the list of supported Slack actions.
Label: Provide a suitable name for this action (for example, Post Message on Slack).
Authorize Slack: Click the + icon to add a Slack authorization.
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:
To: Specify the type of the channel on which you want to post the tweet details.
Public Channel ID or Channel Name: Select or specify the channel ID or channel name on which you want to post the tweet details.
Text: Since we want to post the content of the tweet as a message on a channel, we can pass the output of the Twitter - New Tweet or Retweet Posted by Me trigger in this field. The output of the trigger is visible on the left-hand side of the window, under the {trigger_name} - Trigger Data field. When you click on the drop-down arrow given beside the trigger name, you can see the list of trigger output keys along with the sample output values retrieved from the previous trigger test execution. From the trigger output list, select the text parameter for the Text field. This will include the content (text) of the tweet in the message body when the workflow is executed.
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
No subtopics in this section
Your workflow is not complete until you:
Connect the last action to the Stop icon.
Save your workflow.
With this, you have successfully created your first workflow. It is now time to test it.
Trigger your workflow
No subtopics in this section
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.