# webMethods.io Integration: Pass current date inside workflow using Transformer

**URL:** <https://community.cumulocity.com/t/webmethods-io-integration-pass-current-date-inside-workflow-using-transformer/685>\
**Category:** Knowledge Base\
**Tags:** devops, cumulocity\
**Created:** [January 9, 2020, 11:26am UTC](https://community.cumulocity.com/t/webmethods-io-integration-pass-current-date-inside-workflow-using-transformer/685 "2020-01-09T11:26:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bharath\_Meka1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/bharath_meka1/32/9510_2.png) [@Bharath\_Meka1](https://community.cumulocity.com/u/Bharath_Meka1)\
**Post date:** [January 9, 2020, 11:26am UTC](https://community.cumulocity.com/t/webmethods-io-integration-pass-current-date-inside-workflow-using-transformer/685/1 "2020-01-09T11:26:05Z")

</div>

## Introduction

This article explains how to pass the current date string inside the workflow while creating an alarm in cumulocity.

## Prerequisites

Create a tenant in Cumulocity ([https://www.softwareag.cloud/site/product/cumulocity-iot.html#/](https://www.softwareag.cloud/site/product/cumulocity-iot.html#/)) and register a device&nbsp; [https://www.cumulocity.com/guides/users-guide/device-management/](https://www.cumulocity.com/guides/users-guide/device-management/)

## Create a workflow using transformer

Login to webMethods.io Integration and create a workflow named say ‘TransformerPipeline’.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/b/5befa41d8f19b78881c2a85ea9a71569ccf5bd40.png)  
Add Cumulocity your workflow by dragging it from the right canvas by typing cumulocity as below.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/9/7/9756449847d84cef7529234d08850948efc2ac75.png)

Click on the gear icon on top of cumulocity and select the createAlarm operation

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/a/f/af7c5c40f8ae7c3b97dc5e3c872e41457ff5793d.png)

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/d/1/d1ffad82d9e398605bf5a35662b386583759f458.png)

Create a cumulocity connection by clicking on + icon in Connect to Cumulocity section.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/8/c8a5bf95845cb2cb4f757f5c28097a58223c62d4.png)

**When adding the connection, use the following information:**

Account Name to:&nbsp; \<leave default value\> (i.e. Cumuocity\_1)

Host (required) to:&nbsp; https://use.your.cumulocity.tenant.url

Username = \<use the local Cumulocity user you created for the above tenant\>

Password = \<password for this user\>

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/9/1/9141af0e25a3741b54226e8cd433bc09f12ff607.png)

Click Add when you are done. You should see a message saying “Account saved successfully”. If you do not see this, check your connection settings and try again.

Select the above created cumulocity connection click **Next**.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/c/cca2fee9fb15238721068d7155f08a2420fb4eba.png)

In the left-hand transform section click on Add New…

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/3/5365279dc384e0330ae98243463f5ed97a257015.png)

Provide the transform name as ‘getCurrentDate’ and select ‘Get Current Date String’ from the Transform Data dropdown.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/2X/2/29c3a1bb1945625bb95960f616f9e7cc3dc82f5d.png)

Provide the pattern as ‘YYYY-MM-DDTHH:mm:ss.SSSZ’ and say Done

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/7/4/74cc636d97f7f9fb8f329c09fde8c78ca8164bed.png)

In the next step map the transformer value to time and provide the device id registered in cumulocity and status, severity and type.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/9/d/9df3813f0a60835b2d617bdf68ecb57a1d38db7a.png)

Click Next and Finish and save. Run the workflow.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/1/e/1e5c7aec9e3f671730c909afd4a1776e74cff6d4.png)

**4. Verify in Cumulocity**

Login to cumulocity and cockpit and select the device and in the alarms tab it should show the alarm created above using the workflow.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/f/a/faed340f1f2fe18a3f9e7562e524c52dd13d4350.png)

[export-flc2576152fb176fb7a30805-1578564451985.zip](https://community.cumulocity.com/uploads/short-url/ihLDQdGAXIJZejnwriZPBIvexn2.zip) (19.9 KB)
