Custom Services

Overview

In most cases, the ideal way to expose the .NET library to Workflow is to create a custom service and wrap the library. With this approach, you must create an interface for your service that contains the set of methods that workflows can invoke. In addition, you can expose events for use in triggering schedules or Wait for Event activities in workflows.

Advantages
  • Methods and events provided by a custom service are not restricted to use inside of workflows. They can be used by any application built with the application server. For example, custom service methods can be invoked by a form created with the Display Editor.
  • Custom types provided by the service are published into the SOA type catalogue. This allows objects of these types to be passed between workflows and subprocesses. It also allows them to show up correctly in the workflow debugger.
  • Service methods are always invoked asynchronously by workflows. This means that activities in parallel branches can continue to run while the method is invoked.
Disadvantages
  • Extra effort is required to write the service wrapper over the library.
  • Invoking a service method requires some additional communication overhead, especially if the service is running on a different machine. This communication may have a noticeable performance impact if large objects are passed between the workflow and the service.