You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Introduction

The Fews Workflow Runner service uses XFire, a java SOAP framework. This framework allows a client application to obtain a proxy instance to the FewsWebServiceRunner API. With this API the client can run workflows on the MC from the client code. The timeseries produced by the workflow run can read by the client application. Before a client application can access the FEWS system there is some configuration work that needs to be done.

(warning) User's looking to use XFire on a new project, should use CXF instead. CXF is a continuation of the XFire project and is considered XFire 2.0. It has many new features, a ton of bug fixes, and is now JAX-WS compliant! XFire will continue to be maintained through bug fix releases, but most development will occur on CXF now. For more information see the XFire/Celtix merge FAQ and the CXF website.

Fews Workflow Runner Service API

Description of the methods provided by the Fews Workflow Runner Service API.

TimeSeries[] runFewsWorkflow(String clientId, String workflowId, Date forecastStartDateTime,
                 Date forecastDateTime0, Date forecastEndDateTime, TimeSeries[] inputTimeSeries)
                 throws Exception;

Runs a FEWS workflow on the MC.

  • clientId: A descriptive id used in logging and passed as user id in the taskProperties. Required
  • workflowId: A workflow id known by the MC configuration. Required
  • forecastStartDateTime: The start time of the forecast. If provided a module state at or before the start time will be used. When not specified the the forecast will start at the last available warm state or will use a cold state when no warm state is available. WARNING ! Because XFire does not support nulls for date/times pass new Date(0) instead of null. Optional
  • forecastDateTime0: The time for new saved states during this run, a time observed data is likely to be available for all stations. When not specified the current time will be used. WARNING! Because XFire does not support nulls for date/times pass new Date(0) instead of null.
  • forecastEndDateTime: The end time of the forecast. When not specified a default is used specified in the fews configuration. WARNING! Because XFire does not support nulls for date/times pass new Date(0) instead of null. Optional.
  • inputTimeSeries: The input timeseries required by the workflow.
  • returns: The output timeseries produced by the workflow.
  • throws: An exception when something goes wrong.

Installing a Workflow Runner Service

The Workflow Runner Service actually consists of two service components. The first service component is the McTaskWebService and is hosted by the MC. The second service component is the FewsWebService and this is the component being described under heading Fews Workflow Runner Service API.

Installing the MC Service component

Installing the Workflow Runner client

Example code

Setting up a connection

Running Workflows

  • No labels