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 ArrowInstance

All Superinterfaces:
  Arrow

public interface ArrowInstance
extends Arrow

The `ArrowInstance` interface is an extension of the `Arrow`interface and is used to access arrow attributes within a process instance. An `ArrowInstance` is a simple object which represents the connection between two `NodeInstance`s.``

The methods inherited from `Arrow`, allow access to general arrow information like name and description. Furthermore they provide access to the components of a process definition.

Every arrow instance is uniquely identified by an ID that is automatically assigned by the server. In addition, the arrow instance includes the node instances that it connects and the unique ID of the process instance to which the arrow instance belongs to.

An Arrow instance is initialized with the creation of the process instance containing it. The process instance history shows the state of the arrow as "initialized" until it is used within the execution of the process instance. It is used to get from one node instance to another.

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

See Also:
  `ProcessInstance`, `NodeInstance`

Field Summary
`static int` | `STATE_ABORTED` Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.
`static int` | `STATE_CLOSED` Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.
`static int` | `STATE_COMPLETED` Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.
`static int` | `STATE_DISABLED` Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.
`static int` | `STATE_INITIALIZED` Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.
`static int` | `STATE_READY` Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.
`static int` | `STATE_RUNNING` Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

Fields inherited from interface com.fujitsu.iflow.model.workflow.Arrow
`MAX_ARROW_DESCRIPTION_LENGTH, MAX_ARROW_NAME_LENGTH, MAX_ARROW_POINTS, TYPE_REGULAR`

Method Summary
`void` | `deactivate()` Deprecated. Because it is not possible for this to have any effect
`boolean` | `equals(ArrowInstance arrowInstance)` Deprecated. Use getArrowInstanceId() == arrowInstance.getArrowInstanceId() instead
`long` | `getArrowInstanceId()` Returns the ID of this arrow instance.
`long` | `getProcessInstanceId()` Returns the unique identifier of the process instance to which this arrow instance belongs.
`NodeInstance` | `getSourceNodeInstance()` Returns the node instance in the process instance from which this arrow instance originates.
`long` | `getSourceNodeInstanceId()` Deprecated. This method is replaced by getSourceNodeInstance().getId()
`int` | `getState()` Deprecated. The state of an arrow is updated within one trasaction so that it does not make really sense to ask for the state of an arrow.
`NodeInstance` | `getTargetNodeInstance()` Returns the node instance of the process instance at which this arrow instance ends.
`long` | `getTargetNodeInstanceId()` Deprecated. This method is replaced by getTargetNodeInstance().getId()
`boolean` | `isActive()` Deprecated. An ArrowInstance is active only for a very fleeting amount of time. Hence it is very rare to find an ArrowIntance active. Also, by the time client finds out that it is active, the server would have moved on.
`void` | `setSourceNodeInstance(NodeInstance sourceNodeInstance)` Sets the source node instance from which this arrow instance originates.
`void` | `setTargetNodeInstance(NodeInstance targetNodeInstance)` Sets the target node instance from which this arrow instance terminates.

Methods inherited from interface com.fujitsu.iflow.model.workflow.Arrow
`equals, getArrowId, getDesc, getEndPoint, getExtendedAttributes, getName, getPlan, getPointCount, getPoints, getSourceNode, getStartPoint, getTargetNode, getType, setDesc, setEndPoint, setExtendedAttributes, setName, setPoints, setSourceNode, setStartPoint, setTargetNode`

Field Detail

### STATE_INITIALIZED

    public static final int STATE_INITIALIZED

  Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

  Indicates that the arrow instance is created new and that it is not used within process execution to get from one node instance to another until yet.

  See Also:
    Constant Field Values

### STATE_READY

    public static final int STATE_READY

  Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

  Indicates that the arrow is in a ready state.

  See Also:
    Constant Field Values

### STATE_DISABLED

    public static final int STATE_DISABLED

  Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

  Indicates that the arrow is in a disabled state.

  See Also:
    Constant Field Values

### STATE_RUNNING

    public static final int STATE_RUNNING

  Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

  Indicates that the arrow is in a running state.

  See Also:
    Constant Field Values

### STATE_CLOSED

    public static final int STATE_CLOSED

  Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

  Indicates that the arrow is in a closed state.

  See Also:
    Constant Field Values

### STATE_COMPLETED

    public static final int STATE_COMPLETED

  Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

  Indicates that the arrow instance was used within the process instance to get from one node to another one.

  See Also:
    Constant Field Values

### STATE_ABORTED

    public static final int STATE_ABORTED

  Deprecated. The state of an arrow is updated within one transaction so that it does not make really sense to ask for the state of an arrow.

  Indicates that the arrow is in a aborted state.

  See Also:
    Constant Field Values

Method Detail

### getArrowInstanceId

    public long getArrowInstanceId()

  Returns the ID of this arrow instance. Each arrow instance within a process instance has a unique ID number associated with it. The ID is allocated automatically by the server when the process instance is created.

  Returns:
    The ID number of this arrow instance.

### getSourceNodeInstance

    public NodeInstance getSourceNodeInstance()

  Returns the node instance in the process instance from which this arrow instance originates.

  Returns:
    The node instance object where this arrow starts.
  See Also:
    `setSourceNodeInstance(NodeInstance)`

### setSourceNodeInstance

    public void setSourceNodeInstance(NodeInstance sourceNodeInstance)

  Sets the source node instance from which this arrow instance originates.

  The source node instance can be set only while the process instance containing it is in structural edit-mode. You can enter structural edit-mode by calling `ProcessInstance.startStructuralEdit`. When not in edit-mode, calling this method will have no effect.

  Parameters:
    `sourceNodeInstance` - A node instance object that specifies the source of this arrow instance.
  See Also:
    `getSourceNodeInstance()`, `ProcessInstance.startStructuralEdit()`

### getTargetNodeInstance

    public NodeInstance getTargetNodeInstance()

  Returns the node instance of the process instance at which this arrow instance ends. An arrow is only valid when it is associated with a source and target node.

  Returns:
    The node instance where this arrow ends.
  See Also:
    `setTargetNodeInstance(NodeInstance)`

### setTargetNodeInstance

    public void setTargetNodeInstance(NodeInstance targetNodeInstance)

  Sets the target node instance from which this arrow instance terminates.

  The target node instance can be set only while the process instance containing it is in structural edit-mode. You can enter structural edit-mode by calling `ProcessInstance.startStructuralEdit`. When not in edit-mode, calling this method will have no effect.

  Parameters:
    `targetNodeInstance` - The instance of target node being set.
  See Also:
    `getTargetNodeInstance()`, `ProcessInstance.startStructuralEdit()`

### getSourceNodeInstanceId

    public long getSourceNodeInstanceId()

  Deprecated. This method is replaced by getSourceNodeInstance().getId()

  Returns the ID of the arrow's source node instance.

  Returns:
    The ID of the source node of the arrow in the process instance.

### getTargetNodeInstanceId

    public long getTargetNodeInstanceId()

  Deprecated. This method is replaced by getTargetNodeInstance().getId()

  Returns the ID of the arrow's target node instance.

  Returns:
    The ID of the target node of the arrow.

### getProcessInstanceId

    public long getProcessInstanceId()

  Returns the unique identifier of the process instance to which this arrow instance belongs.

  Returns:
    The unique identifier of the process instance related to this arrow instance.

### getState

    public int getState()

  Deprecated. The state of an arrow is updated within one trasaction so that it does not make really sense to ask for the state of an arrow.

  Returns the current state of this arrow instance as defined in the `ArrowInstance` interface by constants such as `STATE_INITIALIZED`.

  Returns:
    The integer constant specifying the current state of this arrow instance.

### equals

    public boolean equals(ArrowInstance arrowInstance)

  Deprecated. Use getArrowInstanceId() == arrowInstance.getArrowInstanceId() instead

### isActive

    public boolean isActive()
                     throws ModelException

  Deprecated. An ArrowInstance is active only for a very fleeting amount of time. Hence it is very rare to find an ArrowIntance active. Also, by the time client finds out that it is active, the server would have moved on.

  Checks whether the arrow instance is active or not.

  Throws:
    `ModelException`

### deactivate

    public void deactivate()
                    throws WFServerException,
                           WFInternalException,
                           ModelInternalException

  Deprecated. Because it is not possible for this to have any effect

  Removes any event associated with the arrow instance.

  The regarding process instance has to be in structural edit-mode before calling `deactivate` of this arrow instance. Edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  (Should be deprecated, because if an arrow has an event, it is a very fleeting one at best, and it should not last more than a fraction of a second. Chances are by the time the model finds out about it being active, the server had probably already moved on.)

  Throws:
    `WFServerException`
    `WFInternalException`
    `ModelInternalException` - Thrown when the process instance is not in edit-mode when this method is called. Should be caught as ModelException for future compatibility.
  See Also:
    `ProcessInstance.startStructuralEdit()`

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