Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fujitsu.iflow.model.workflow
Interface WFSession

All Known Subinterfaces:
  WFAdminSession

public interface WFSession

The `WFSession` interface establishes and maintains access to the server for the entire time a user is logged into it. All operations on the server require this interface.

This interface maintains, for instance, a reference to the `DirSessionObject` (Directory Service) and `DMSSessionObject` (Document Management System) on the server. It is responsible for retrieving enumerations of work items, process instances, and process definitions. It is also responsible for retrieving object references to process instances and process definitions.

Usage. The `WFSession` interface provides the necessary protocol to establish a user session with a server. The proper usage of this interface is as follows:

- Create a new instance of `WFSession`. The standard way of creating a new `WFSession` object is to call the method `WFObjectFactory.getWFSession`.
- Initialize the session for use within an application. This is done by calling the method `initForApplication`; with this method, the standard properties are set.
- Use the `logIn` method to log into a specified server with a valid user name and password.
- Now the instance of `WFSession` has a valid connection with a server, and it is ready to be used for initializing and constructing other client objects, such as work lists, process instances and process definitions.

Exceptions. Three kinds of exceptions are commonly thrown within this class: `WFServerException`, `WFInternalException`, and `ModelInternalException`, all of which are instances of `ModelException`. In the methods that directly throw a `ModelException`, this exception usually wraps one of the above three exceptions. `WFServerException` indicates that the server failed to operate normally. `WFInternalException` indicates a problem in the communication between client and server. `ModelInternalException` indicates other Model API internal problems.

See Also:
  `WFObjectList`

Method Summary
`WFAppManifest` | `checkWFAppManifest(WFAppManifest manifest)` Requests user agent proxy to detect workflow application file name conflicts, update the manifest information accordingly, and return the updated manifest information.
`void` | `deletePlan(long planID)` Deletes a specified process definition from the database.
`java.lang.String` | `dumpServerStatistics()` Retrieves the current server statistics as `String` value.
`Dashboard` | `getDashboard()` Returns the `Dashboard` object.
`PlanVersionHistoryElement[]` | `getPlanVersionHistory(java.lang.String planName)` Retrieves the version history of the specified process definition.
`java.lang.String[]` | `getServerList()` Returns the list of all server names that are bound in the currently set naming context.
`java.lang.String` | `getServerOption(java.lang.String parmName)` Returns the value of the specified server property.
`java.lang.String` | `getUserName()` Returns the user name of the currently logged-in user.
`WFAppManifest` | `getWFAppManifest(long[] planIDs)` Requests user agent proxy to return the workflow application manifest.
`void` | `initForApplet(java.applet.Applet applet)` Deprecated. Use `initForApplication(String[], Properties)` instead.
`void` | `initForApplet(java.applet.Applet applet, java.util.Properties props)` Deprecated. Use `initForApplication(String[], Properties)` instead.
`void` | `initForApplication()` Deprecated. Use `initForApplication(String[], Properties)` instead.
`void` | `initForApplication(java.lang.String[] args, java.util.Properties prop)` Initializes a `WFSession` object for use within an application.
`java.lang.String` | `installWFApp(java.lang.String packageDMSPath)` Requests user agent proxy to install the workflow application.
`void` | `logIn(java.lang.String server, java.lang.String userName, java.lang.String password)` Logs the user into a server given a valid server name, user name, and password.
`void` | `logOut()` Triggers the server to log out the current user from the server.
`java.lang.String` | `packageWFApp(WFAppManifest manifest)` Requests user agent proxy to package the workflow application.
`void` | `reconnect()` Reconnects this session to the server.
`void` | `setNamingContext(java.lang.String name)` Deprecated. No longer needed. Any parameters needed for connection must be passed as part of the Properties object in InitForApplication.
`void` | `setNamingContext2(java.lang.String name)` Deprecated. No longer needed. Any parameters needed for connection must be passed as part of the Properties object in InitForApplication.
`void` | `setServerIOR(java.lang.String iorFilename)` Deprecated. No longer needed. Any parameters needed for connection must be passed as part of the Properties object in InitForApplication.
`void` | `shutdown(boolean forced)` Deprecated. Has no operation
`boolean` | `validateSession()` Validates if this session is still connected with the server.

Method Detail

### initForApplication

    public void initForApplication(java.lang.String[] args,
                                   java.util.Properties prop)
                            throws WFInternalException

  Initializes a `WFSession` object for use within an application. It must be the first method called on `WFSession` when used in an application.

  The properties which are necessary to initialize the session are stored in the "iFlowClient.properties" file of your Interstage BPM installation.

  Parameters:
    `args` - The set of command-line parameters used in the application.
    `prop` - A persistent set of properties consisting of a table of keys and their corresponding values, stored as strings.
  Throws:
    `WFInternalException`

### logIn

    public void logIn(java.lang.String server,
                      java.lang.String userName,
                      java.lang.String password)
               throws WFServerException,
                      WFInternalException

  Logs the user into a server given a valid server name, user name, and password. User accounts must be set up in advance via the Directory Service.

  This method establishes a session with the server which is identified by the server argument. The server name is normally the name of the host machine the Interstage BPM server is running on plus the addition of "Flow".

  The `userName` should contain a valid user name and the password should be valid for the server to be connected to. Once the `logIn` method succeeds for a `WFSession` object, it is referred to as a connected `WFSession` object.

  Parameters:
    `server` - The name of the server from a list of available servers.
    `userName` - The user name as defined by the authentication framework.
    `password` - The user's password as defined by the authentication framework.
  Throws:
    `WFServerException`
    `WFInternalException`

### logOut

    public void logOut()
                throws WFInternalException,
                       WFServerException

  Triggers the server to log out the current user from the server. Any applets or applications should log out before exiting.

  Throws:
    `WFInternalException`
    `WFServerException`

### getServerList

    public java.lang.String[] getServerList()
                                     throws WFServerException,
                                            WFInternalException,
                                            ModelInternalException

  Returns the list of all server names that are bound in the currently set naming context.

  Returns:
    All server names found in the naming service
  Throws:
    `WFServerException`
    `WFInternalException`
    `ModelInternalException`
  See Also:
    `initForApplication(String[], Properties)`

### getUserName

    public java.lang.String getUserName()
                                 throws ModelInternalException

  Returns the user name of the currently logged-in user.

  Returns:
    The name of the currently logged-in user.
  Throws:
    `ModelInternalException` - Thrown when no user is logged in when this method is called.

### shutdown

    public void shutdown(boolean forced)
                  throws ModelException

  Deprecated. Has no operation

  Closed any iflow utility or Thread in use. This should be last method called from an appliaction when intend to end every session created from this application and no more session will be created.

  Throws:
    `ModelException`

### deletePlan

    public void deletePlan(long planID)
                    throws ModelException

  Deletes a specified process definition from the database. The process definition can only be deleted if the logged-in user is the owner of the process definition and the process definition is in the state `Plan.STATE_DRAFT` or `Plan.STATE_PRIVATE`. Users having administration rights delete a process definition irrespective of ownership and process definition state.

  Parameters:
    `planID` - The ID number of the process definition to be deleted.
  Throws:
    `ModelException`

### getServerOption

    public java.lang.String getServerOption(java.lang.String parmName)
                                     throws ModelException

  Returns the value of the specified server property.

  Supported property names are:

  - AdminRole
  - DMSFileSeparator
  - DMSRoot
  - LDAPServer
  - SecuritySwitch
  - ServerEmailAddress
  - ServerEMailBaseURL
  - ServerHost
  - ServerReassignMode

  To get more information about the meaning of these properties see the Interstage BPM Administration Guide, Appendix: "Manually Editing the ibpm.properties File".

  Parameters:
    `parmName` - The property's name.
  Throws:
    `ModelException` - Thrown when the no server option exist for the supplied `parmName`.

### validateSession

    public boolean validateSession()
                            throws ModelException

  Validates if this session is still connected with the server.

  Returns:
    `true` if this session object is still connected with the server; `false` otherwise.
  Throws:
    `ModelException`

### reconnect

    public void reconnect()
                   throws ModelException

  Reconnects this session to the server.

  Throws:
    `ModelException`

### getPlanVersionHistory

    public PlanVersionHistoryElement[] getPlanVersionHistory(java.lang.String planName)
                                                      throws ModelException

  Retrieves the version history of the specified process definition. If there are no history entries for the process definition, an empty array is returned.

  Parameters:
    `planName` - The process definition's name.
  Returns:
    The version history information of the specified process definition.
  Throws:
    `ModelException`

### dumpServerStatistics

    public java.lang.String dumpServerStatistics()
                                          throws ModelException

  Retrieves the current server statistics as `String` value. The statistics include the number of database connections in use, the available free memory and the total memory in use.

  Returns:
    The current server statistics.
  Throws:
    `ModelException`

### getWFAppManifest

    public WFAppManifest getWFAppManifest(long[] planIDs)
                                   throws ModelException

  Requests user agent proxy to return the workflow application manifest.

  Parameters:
    `planIDs` - IDs of the main process definitions that will be packaged.
  Returns:
    The workflow application package manifest.
  Throws:
    `ModelException`

### checkWFAppManifest

    public WFAppManifest checkWFAppManifest(WFAppManifest manifest)
                                     throws ModelException

  Requests user agent proxy to detect workflow application file name conflicts, update the manifest information accordingly, and return the updated manifest information.

  Parameters:
    `manifest` - The workflow application package manifest.
  Returns:
    The workflow application manifest.
  Throws:
    `ModelException`

### packageWFApp

    public java.lang.String packageWFApp(WFAppManifest manifest)
                                  throws ModelException

  Requests user agent proxy to package the workflow application.

  Parameters:
    `manifest` - The workflow application manifest.
  Returns:
    DMS path of the workflow application package.
  Throws:
    `ModelException`

### installWFApp

    public java.lang.String installWFApp(java.lang.String packageDMSPath)
                                  throws ModelException

  Requests user agent proxy to install the workflow application.

  Parameters:
    `packageDMSPath` - DMS path of the workflow application package.
  Returns:
    The Java class path under DMS folder.
  Throws:
    `ModelException`

### getDashboard

    public Dashboard getDashboard()
                           throws ModelException

  Returns the `Dashboard` object. Use this object to find information sucha as number of waiting activities, number of waiting processes, average cycle time of activity and processes etc. To get the complete list of supported APIs for `Dashboard` objects, check the interface `Dashboard`.

  Returns:
    The `Dashboard` object
  Throws:
    `ModelException` - Thrown if the user is not logged in or the user session is not found or `Dashboard` intialization fails.

### setNamingContext

    public void setNamingContext(java.lang.String name)
                          throws ModelInternalException

  Deprecated. No longer needed. Any parameters needed for connection must be passed as part of the Properties object in InitForApplication.

  Throws:
    `ModelInternalException`

### setNamingContext2

    public void setNamingContext2(java.lang.String name)
                           throws ModelException

  Deprecated. No longer needed. Any parameters needed for connection must be passed as part of the Properties object in InitForApplication.

  Throws:
    `ModelException`

### setServerIOR

    public void setServerIOR(java.lang.String iorFilename)
                      throws ModelInternalException

  Deprecated. No longer needed. Any parameters needed for connection must be passed as part of the Properties object in InitForApplication.

  Throws:
    `ModelInternalException`

### initForApplet

    public void initForApplet(java.applet.Applet applet)
                       throws WFInternalException

  Deprecated. Use `initForApplication(String[], Properties)` instead.

  Throws:
    `WFInternalException`

### initForApplet

    public void initForApplet(java.applet.Applet applet,
                              java.util.Properties props)
                       throws WFInternalException

  Deprecated. Use `initForApplication(String[], Properties)` instead.

  Throws:
    `WFInternalException`

### initForApplication

    public void initForApplication()
                            throws WFInternalException

  Deprecated. Use `initForApplication(String[], Properties)` instead.

  Throws:
    `WFInternalException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD