Tasks

Add Web Service Methods

Methods of configured Web Services are available to tasks as “Processors”. To add a method to a task, select the task, locate the SOAP Connector under “Available Processors”, and drag the desired method onto the task builder panel.

../_images/soap-task-add-method.png

In the example above, the “AddNumbers” method is added to the task. The method has inputs “Trigger”, “a” and “b”, and output “AddNumbersResult”.

Input values “a” and “b” are arguments of the “AddNumbers” method which returns the sum of “a” and “b” whenever any of the input values change.

Each Web Service method also has a “Trigger” input value. The “Trigger” value may be used to call a method repeatedly without any of the other input values changing. In case of the “AddNumbers” method the “Trigger” value is not required. For a different method “GetLatestData”, for example, the “Trigger” input may be used to call the method in regular intervals by connecting a time signal to the “Trigger” input.

Examples

The following example shows a configured task that receives inputs from two constants, sends the constant values to the “AddNumbers” method, and stores the result into a database.

../_images/soap-task-example1.png

The following example shows a task that stores weather data into a database. The “GetWeatherData” Web Service method has only a “Trigger” input. The “Hour” time signal is used to call the method every hour.

../_images/soap-task-example2.png

Please see the task documentation for further details on how to configure tasks.

Type Conversions

The SOAP connector will attempt to convert input values to the type expected by the method. For example, if the method is expecting an integer value but a floating point value of, for example, “3.45” is sent to the method then the floating point value is first converted to integer value “3” before the web service method is called.

Error Handling

Should a Web Service call fail then values that were meant to be processed by the Web Service are queued and the call is retried after a brief delay. The maximum number of queued values is defined by the task’s “maximum pending count” setting.