## CORBA Interface IProcessFlow

### Definition

CORBA Module DFProcessFlow

### IProcessFlow Description

CORBA Definitions
method Close |
method CreateJob |
method DeleteState |
method ListAvailablePlugins |
method ListAvailablePluginsXML |
method ListState |
method LoadJob |
method LoadJobXML |
method LoadState |
method Ping |
method SetWorkType |

Java Classes
IProcessFlowHelper | Used to manipulate the IProcessFlow type
IProcessFlowHolder | Used to process the IProcessFlow type as an out parameter

Java Interfaces
IProcessFlow |

Java Interface IProcessFlow

Package com.sas.iom.DFProcessFlow

IProcessFlow Description

`public interface IProcessFlow
extends org.omg.CORBA.Object`

Method Summary

void | Close ()
IProcessJob | CreateJob ( OctetSeqHolder jobXML ) throws ( GenericError );
void | DeleteState ( java.lang.String jobID , java.lang.String path ) throws ( GenericError );
java.lang.String[][] | ListAvailablePlugins ( ) throws ( GenericError );
octet[] | ListAvailablePluginsXML ( ) throws ( GenericError );
java.lang.String[][] | ListState ( java.lang.String jobID , java.lang.String dir ) throws ( GenericError );
IProcessJob | LoadJob ( java.lang.String filename ) throws ( GenericError );
IProcessJob | LoadJobXML ( octet[] jobXML ) throws ( GenericError );
IProcessJob | LoadState ( java.lang.String state ) throws ( GenericError );
java.lang.String | Ping ( ) throws ( GenericError );
void | SetWorkType ( WorkType workType ) throws ( GenericError );

Java Class IProcessFlowHelper

public class IProcessFlowHelper

Description
Implementing class for methods (insert, extract, type, id, read, write, narrow) used to manipulate the IProcessFlow type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.IProcessFlowHelper

Java Class IProcessFlowHolder

public class IProcessFlowHolder

Description
Implementing class for methods (_read, _write, _type) used to process the IProcessFlow type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.IProcessFlowHolder

CORBA Method Close

Description

Usage

Java Method Close

`void` Close ( )

Example

CORBA Method CreateJob

Description

Usage

Java Method CreateJob

`public IProcessJob` CreateJob (

        OctetSeqHolder jobXML
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
jobXML | out | OctetSeqHolder |

Example

CORBA Method DeleteState

Description

Usage

Java Method DeleteState

`void` DeleteState (

        java.lang.String jobID ,
        java.lang.String path
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
jobID | in | java.lang.String |
path | in | java.lang.String |

Example

CORBA Method ListAvailablePlugins

Description

Usage

Java Method ListAvailablePlugins

`java.lang.String[][]` ListAvailablePlugins (

        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---

Example

CORBA Method ListAvailablePluginsXML

Description

Return the available plugins and their discovered inputs in Spring Bean syntax.

The returned bean is rooted with the bean "`Plugins`".

The returned XML depends on beans defined to do creation via an instance factory method (`createInstance`). For example, if I defined the `NodeListFactoryBean` similarly to:

       <bean id='NodeListFactoryBean' class='...PluginRepositoryFactory'/>"

The `PluginRepositoryFactory` class could be as little as:

       public class PluginRepositoryFactory
       {
          public PluginRepository createInstance()
          {
             return new PluginRepository();
          }
       }

Where the `PluginRepository` class would need to implement the setters described in the `NodeListFactoryBean` portion below.

The returned XML requires a beans with the following identifiers to be defined by the consumer:

`ExprClassFactoryBean`
  Creates an Expression Class instance which must have the following setters:
  `setDescription(String description)`
  `setName(String name)`
`ExprFunctionFactoryBean`
  Creates an Expression Function instance which must have the following setters:
  `setDescription(String description)`
  `setMaxParameters(int maxParms)`
  `setMinParameters(int minParms)`
  `setName(String name)`
  `setParameters(String parms)`
  `setReturnType(String returnType)`
`NodeRequirementFactoryBean`
  Creates a Node Requirements instance which must have the following setters:
  `setDescription(String description)`
  `setName(String name)`
  `setScope(String scope)`
  `setType(String type)`
`NodeEventFactoryBean`
  Creates a Node Event instance which must have the following setter:
  `setEvent(String event)`
`NodeInputFactoryBean`
  Creates a Node Input instance which must have the following setters:
  `setColumns(String[] columns)`
    If the input is a table, the list of the columns within the table will be set using this setter.
  `setDescription(String description)`
  `setName(String name)`
  `setType(String type)`
`NodeOutputFactoryBean`
  Creates a Node Output instance which must have the following setters:
  `setColumns(String[] columns)`
    If the output is a table, the list of the columns within the table will be set using this setter.
  `setDescription(String description)`
  `setIsMetric(boolean isMetric)`
  `setName(String name)`
  `setType(String type)`
`NodeOutputSlotFactoryBean`
  Creates a Node Output Slot instance which must have the following setters:
  `setLabel(String label)`
  `setSlot(String slot)`
`NodeFactoryBean`
  Creates a Node instance which must have the following setters:
  `setDescription(String description)`
  `setDynDisc(boolean hasDynamicDiscovery)`
  `setEvents(List<...NodeEventFactoryBean class... > events)`
  `setHasDisc(boolean hasDiscovery)`
  `setHasExec(boolean hasExec)`
  `setId(String id)`
  `setExpressionClasses(List<...ExprClassFactoryBean class... > classes)`
  `setExpressionFunctions(List<...ExprFunctionFactoryBean class... > functions)`
  `setInputs(List<...NodeInputFactoryBean class... > inputs)`
  `setOutputs(List<...NodeOutputFactoryBean class... > outputs)`
  `setRequirements(List<...NodeRequirementFactoryBean class... > requirements)`
  `setSlots(List<...NodeOutputSlotFactoryBean class... > slots)`
`NodeListFactoryBean`
  Creates a Node repository instance which must have the following setter:
  `setNodes(List<...NodeFactoryBean class... > nodes)`

Usage

Java Method ListAvailablePluginsXML

`octet[]` ListAvailablePluginsXML (

        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---

Example

       // Static bean definition to define the expected factory definitions.
       // NOTE: You must define the factory beans in terms of your factory classes.
       static String factoryXML   =   "<?xml version='1.0' encoding='UTF-8'?>"
                                    + "<beans xmlns='http://www.springframework.org/schema/beans'"
                                    + "       xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"
                                    + "       xmlns:aop='http://www.springframework.org/schema/aop'"
                                    + "       xsi:schemaLocation='http://www.springframework.org/schema/beans"
                                    + "                           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
                                    + "                           http://www.springframework.org/schema/aop"
                                    + "                           http://www.springframework.org/schema/aop/spring-aop.xsd'>"
                                    + "   <bean id='ExprClassFactoryBean' class='...ExprClassFactory class...'/>"
                                    + "   <bean id='ExprFunctionFactoryBean' class='...ExprFunctionFactory class...'/>"
                                    + "   <bean id='NodeRequirementFactoryBean' class='...NodeRequirementFactory class...'/>"
                                    + "   <bean id='NodeEventFactoryBean' class='...NodeEventFactory class...'/>"
                                    + "   <bean id='NodeInputFactoryBean' class='...NodeInputFactory class...'/>"
                                    + "   <bean id='NodeOutputFactoryBean' class='...NodeOutputFactory class...'/>"
                                    + "   <bean id='NodeOutputSlotFactoryBean' class='...NodeOutputSlotFactory class...'/>"
                                    + "   <bean id='NodeFactoryBean' class='...PluginNodeFactory class...'/>"
                                    + "   <bean id='NodeListFactoryBean' class='...PluginRepositoryFactory class...'/>"
                                    + "</beans>"
       IProcessFlow  iProcessFlow;

       // Code to acquire iProcessFlow instance [Exercise for the reader].

       byte[]             xml             = iProcessFlow.ListAvailablePluginsXML();
       ByteArrayResource  factoryResource = new ByteArrayResource(factoryXML.getBytes());
       ByteArrayResource  resource        = new ByteArrayResource(xml);
       ApplicationContext context         = new GenericXmlApplicationContext(factoryResource, resource);
       ...NodeList...     plugins         = (...NodeListType...)context.getBean("Plugins");

CORBA Method ListState

Description

Usage

Java Method ListState

`java.lang.String[][]` ListState (

        java.lang.String jobID ,
        java.lang.String dir
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
jobID | in | java.lang.String |
dir | in | java.lang.String |

Example

CORBA Method LoadJob

Description

Usage

Java Method LoadJob

`public IProcessJob` LoadJob (

        java.lang.String filename
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
filename | in | java.lang.String |

Example

CORBA Method LoadJobXML

Description

Usage

Java Method LoadJobXML

`public IProcessJob` LoadJobXML (

        octet[] jobXML
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
jobXML | in | octet[] |

Example

CORBA Method LoadState

Description

Usage

Java Method LoadState

`public IProcessJob` LoadState (

        java.lang.String state
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
state | in | java.lang.String |

Example

CORBA Method Ping

Description

Usage

Java Method Ping

`java.lang.String` Ping (

        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---

Example

CORBA Method SetWorkType

Description

Usage

Java Method SetWorkType

`void` SetWorkType (

        WorkType workType
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
workType | in | WorkType |

Example