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 Plan

public interface Plan

A `Plan` provides the means to create and manipulate process definitions. The terms plan and template both refer to the concept of process definition and are used interchangeably.

New process definitions are created by (1) calling `WFObjectFactory.getPlan(long, com.fujitsu.iflow.model.workflow.WFSession)`, (2) adjusting the properties of the returned `Plan` object, (3) assigning a session to the object by calling `setWFSession`, and (4) submitting the `Plan` object to persistent storage by calling `createProcessDef`.

An existing `Plan` object can usually only be manipulated in edit mode. Edit mode is entered by calling `startEdit`. Changes to a plan in edit mode are submitted by calling `commitEdit`. Changes are discarded by calling `cancelEdit`. At any time, only a single user can edit a certain process definition. Methods that require the process definition to be in edit mode are marked as Edit mode required.

A process is defined step by step by adding elements such as nodes, arrows, and user-defined attributes (UDAs) to it. Each of the respective `add...` methods, for instance, `addNode`, requires only the core parameters of the added element to be specified, for instance, the name and type of a node. The methods then return a newly created object, which can be used to further specify the element. Instances of a process definition are created by calling `createProcessInstance`.

A process definition is in one the following states:

Draft
  Process definitions are in this state when they have been newly created. Process definitions in draft state can be edited as long as there are no active instances associated with them. However, only the owner can access the definition in this state.
Published
  When a process definition is published, it is made available to all users of an Interstage BPM server. Only a user with administrator privileges can publish a process definition by calling `WFAdminSession.publishPlan(long)`. A published process definition cannot be modified.
Obsolete
  A process definition is removed from public access by setting its state to obsolete. Again, only administrators have the right to set a process definition's state to obsolete. The respective method to call is `WFAdminSession.obsoletePlan(long)`. An obsolete process definition cannot be modified or instantiated. A process definition is implicitly set to obsolete when a new version of it is published.
Private
  When a user changes the structure of an active process, Interstage BPM creates a copy of its underlying process definition. This definition is then in state private. For every active process, only one process definition can be in state private.
Deleted
  Process definitions in this state are removed from being used, however, they are kept for records purposes.

The total amount of memory to be used by a process definition (process definition size) is limited to 500 Kilobytes. The process definition size is calculated by adding up the size of all of its elements such as nodes, arrows, and UDAs. If the size of a process definition exceeds the limit, an exception is thrown by the next commit operation. `PlanSizeCalculator` calculates the current size of a process definition.

`String` parameters of all methods in this class have a length limit. This limit is documented in the Javadoc comment for every parameter. If the length of a value supplied for such a parameter exceeds this limit or the value is `null`, an exception is thrown. This exception is a subclass of `ModelException`. For future compatibility, only `ModelException` should be caught explicitly.

If the signature of a method does not allow for throwing any exception, any value supplied to this method that exceeds the length limit is truncated to the maximum length supported. `null` values are ignored in this case. If a method’s behaviour differs from the behaviour described above, it is explained in the relevant method’s Javadoc comment.

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 continue normal operation. `WFInternalException` indicates a problem in the communication between client and server. `ModelInternalException` indicates other Model API internal problems.

See Also:
  `PlanSizeCalculator`

Field Summary
`static int` | `MAX_OWNER_NAME_LENGTH` The maximum length of the name of process definition owner; currently set to 64 characters.
`static int` | `MAX_PLAN_DESCRIPTION_LENGTH` The maximum length of the description of a process definition; currently set to 256 characters.
`static int` | `MAX_PLAN_IDENTIFIER_LENGTH` The maximum length of a process definition's identifier; currently set to 256 characters.
`static int` | `MAX_PLAN_NAME_LENGTH` The maximum length of the name of a process definition; currently set to 30 characters.
`static int` | `MAX_PLAN_TITLE_LENGTH` The maximum length of a process definition's title; currently set to 80 characters.
`static int` | `STATE_DELETED` Denotes a deleted process definition.
`static int` | `STATE_DRAFT` Denotes a process definition's draft state.
`static int` | `STATE_OBSOLETE` Denotes a process definition's obsolete state.
`static int` | `STATE_PRIVATE` Denotes a process definition's private state, which is reserved for definitions that are associated with an active process instance.
`static int` | `STATE_PUBLISHED` Denotes a process definition's published state.

Method Summary
`Arrow` | `addArrow(java.lang.String arrowName, long arrowType, Node sourceNode, Node targetNode)` Deprecated. Replaced by `addArrow(String, Node, Node)`
`Arrow` | `addArrow(java.lang.String arrowName, Node sourceNode, Node targetNode)` Adds an arrow between the given nodes of this process definition.
`DataItemRef` | `addDataItemRef(java.lang.String dataItemRefName, java.lang.String dataItemRefType)` Adds a User Defined Attribute (UDA) with the given name and type to this process definition.
`DataItemRef` | `addDataItemRef(java.lang.String dataItemRefName, java.lang.String dataItemRefType, java.lang.String val)` Adds a User Defined Attribute (UDA) with the given name, type, and initial value to this process definition.
`DataItemRef` | `addDataItemRef(java.lang.String dataItemRefName, java.lang.String dataItemRefType, java.lang.String val, boolean isDimension, boolean isMeasure, java.lang.String cubeNames, java.lang.String aggregation)` Adds a User Defined Attribute (UDA) to this process definition in the same way as `addDataItemRef(String, String, String)`.
`Node` | `addNode(Node myNode)` Adds a node with all the information inside the given node to this process definition.
`Node` | `addNode(java.lang.String name, int nodeType)` Adds a node with the given name and type to this process definition.
`void` | `addPlanListener(PlanListener listener)` Adds a listener to this process definition, which is notified by the server when any user other than the current user of this definition modifies the process definition via another Interstage BPM client.
`TimerDef` | `addTimer(TimerDef timer)` Makes the supplied timer persistent and adds it to this process definition.
`TriggerDef` | `addTrigger(java.lang.String name, int type)` Adds a new trigger definition with the given name and type to this process definition.
`void` | `cancelEdit()` Cancels the current editing session discarding all modifications made since the last call to `startEdit`.
`void` | `commitEdit()` Commits the changes to this process definition to the database, thus making them permanent.
`void` | `convertFromBPEL(java.io.InputStream in)` Initializes this process definition from the given input stream, which delivers a process definition in XPDL format.
`void` | `convertFromXPDL(java.io.InputStream in)` Initializes this process definition from the given input stream, which delivers a process definition in XPDL format.
`void` | `convertFromXPDLDom(org.w3c.dom.Document doc)` Initializes this process definition from the given DOM tree, which delivers a process definition in XPDL format.
`void` | `convertToBPEL(java.io.OutputStream out)` Writes this process definition in BPEL format to the supplied output stream.
`void` | `convertToXPDL(java.io.OutputStream out)` Writes this process definition in XPDL format to the supplied output stream.
`void` | `convertToXPDL(java.io.OutputStream out, java.util.Properties props)` Writes this process definition in XPDL format to the supplied output stream.
`org.w3c.dom.Document` | `convertToXPDLDom()` Returns a DOM representation of this process definition in XPDL format.
`org.w3c.dom.Document` | `convertToXPDLDom(java.util.Properties props)` Returns a DOM representation of this process definition in XPDL format.
`Plan` | `createProcessDef()` For a newly created process definition, commits the definition to be stored persistently.
`ProcessInstance` | `createProcessInstance()` Creates and returns an instance of this process definition.
`Arrow` | `getArrow(long arrowId)` Returns this process definition's arrow object with the given identifier.
`Arrow[]` | `getArrows()` Returns all arrows of this process definition.
`JavaActionSet` | `getCommitJavaActionSet()` Returns this process definition's commit Java action set.
`java.lang.String` | `getCommitScript()` Deprecated. Replaced by JavaActions. Use `getCommitJavaAction` instead.
`DataItemRef` | `getDataItemRef(java.lang.String dataItemRefName)` Returns the definition of User Defined Attribute (UDA) with the specified name, if such a UDA is defined for this process definition.
`DataItemRef[]` | `getDataItemRefs()` Returns all user-defined attributes (UDAs) of this process definition.
`java.lang.String` | `getDesc()` Returns the description of this process definition.
`org.w3c.dom.Document` | `getExtendedAttributes()` Returns the DOM document that contains all of the process definition level extended attributes, which include custom data such as swim lane, notation etc.
`long` | `getId()` Returns the unique ID of this process definition.
`JavaActionSet` | `getInitJavaActionSet()` Returns this process definition's initialization Java action set.
`java.lang.String` | `getInitScript()` Deprecated. Replaced by JavaActions. Use `getInitJavaAction` instead.
`java.lang.String` | `getName()` Returns the name of this process definition.
`Node` | `getNode(long nodeId)` Returns this process definition's node with the given identifier, or null, if there is no node with this identifier.
`Node[]` | `getNodes()` Returns all nodes of this process definition.
`java.lang.String` | `getOwner()` Returns the owner of this process definition.
`java.lang.String` | `getPlanIdentifier()` Returns the application-defined identifier of this process definition.
`java.lang.String` | `getPlanURI()` Returns the URI of this process definition on the current server.
`java.lang.String` | `getProcOwnerRole()` Returns the name of the role that defines the users who become the owners of instances created from this process definition.
`JavaActionSet` | `getProcOwnerRoleJavaActionSet()` Returns this process definition's owner role Java action set.
`java.lang.String` | `getProcOwnerRoleScript()` Deprecated. Replaced by JavaActions. Use `getProcOwnerRoleJavaActionSet` instead.
`int` | `getState()` Returns the current state of this process definition as one of the `STATE_`...
`TimerDef` | `getTimer(long tdid)` Returns the timer with the given ID.
`TimerDef[]` | `getTimers()` Returns an array of all timers attached to this process definition.
`java.lang.String` | `getTitle()` Returns the title of this process definition.
`TriggerDef` | `getTrigger(long triggerId)` Retrieves this process definition's trigger with the given identifier.
`TriggerDef[]` | `getTriggers()` Retrieves all the triggers defined for this process definition.
`TriggerDef[]` | `getTriggers(int type)` Retrieves all of this process definition's triggers of the given type.
`java.lang.String` | `getVersion()` Returns a string representation of the version of this process definition.
`boolean` | `isInEditMode()` Checks whether this process definition is in edit-mode currently, that is, the current user is allowed to modify the definition.
`boolean` | `isLockedByOthers()` Checks whether this process definition is locked for editing by any user including the current user of this process definition.
`boolean` | `isPlanChanged()` Checks whether any changes have been made to this process definition since it was last committed.
`void` | `removeAllDataItemRefs()` Removes all user-defined attributes (UDAs) from this process definition.
`void` | `removeArrow(long id)` Removes the arrow with the given identifier from this process definition.
`JavaActionSet` | `removeCommitJavaActionSet()` Removes and returns this process definition's current commit Java action set.
`void` | `removeDataItemRef(java.lang.String dataItemRefName)` Removes the user-defined attribute (UDA) with the given name from this process definition, if such a UDA exists.
`JavaActionSet` | `removeInitJavaActionSet()` Removes and returns this process definition's current initialization Java action set.
`void` | `removeNode(long nodeId)` Removes the node with the given identifier from this process definition.
`void` | `removePlanListener(PlanListener listener)` Removes the given listener from this process definition, preventing further modifications of this definition by other Interstage BPM clients to be communicated to the listener.
`JavaActionSet` | `removeProcOwnerRoleJavaActionSet()` Removes and returns this process definition's current owner role Java action set.
`void` | `removeTimer(TimerDef td)` Removes the given timer from this process definition.
`void` | `removeTrigger(long triggerId)` Removes the trigger with the given identifier.
`void` | `removeTriggers()` Removes all triggers from this process definition.
`void` | `reorderTimers(TimerDef[] tds)` Rearranges the timers associated with this process definition according to the supplied sequence.
`Plan` | `saveAs(java.lang.String templateName)` Saves a copy of this process definition with a new name and identifier.
`void` | `setCommitJavaActionSet(JavaActionSet actionSet)` Sets this process definition's commit Java action set.
`void` | `setCommitScript(java.lang.String script)` Deprecated. Replaced by JavaActions. Use `setCommitJavaAction` instead.
`void` | `setDesc(java.lang.String description)` Sets the description for this process definition.
`void` | `setExtendedAttributes(org.w3c.dom.Document attrs)` Sets the DOM document that contains all of the process definition level extended attributes.
`void` | `setInitJavaActionSet(JavaActionSet actionSet)` Sets this process definition's initialization Java action set.
`void` | `setInitScript(java.lang.String script)` Deprecated. Replaced by JavaActions. Use `getInitJavaAction` instead.
`void` | `setName(java.lang.String name)` Sets the name of this process definition.
`void` | `setOwner(java.lang.String owner)` Sets the name of the owner of this process definition.
`void` | `setPlanIdentifier(java.lang.String identifier)` Sets the application-defined identifier of this process definition.
`void` | `setProcOwnerRole(java.lang.String owner)` Sets the name of the role that defines the users who will be the owners of instances created from this process definition.
`void` | `setProcOwnerRoleJavaActionSet(JavaActionSet actionSet)` Sets this process definition's owner role Java action set.
`void` | `setProcOwnerRoleScript(java.lang.String script)` Deprecated. Replaced by JavaActions. Use `setProcOwnerRoleJavaActionSet` instead.
`void` | `setTimers(TimerDef[] timers)` Sets an array of timers for this process definition.
`void` | `setTitle(java.lang.String title)` Sets the title of this process definition.
`void` | `setWFSession(WFSession wfs)` Sets the session for committing this process definition to permanent storage.
`void` | `startEdit()` Sets this process definition to edit mode preventing users other than the current session's user from editing this definition.
`java.lang.String` | `validateProcessDef()` Validates a newly created or changed process definition, thus allowing a user to determine whether a call to `createProcessDef()` or `commitEdit()` will succeed.

Field Detail

### STATE_DRAFT

    public static final int STATE_DRAFT

  Denotes a process definition's draft state. Process definitions in draft state can be edited as long as there are no active instances associated with them. However, only the owner can access a definition in this state.

  See Also:
    Constant Field Values

### STATE_PUBLISHED

    public static final int STATE_PUBLISHED

  Denotes a process definition's published state. A published process definition is available to all users of an Interstage BPM server. A published process definition cannot be modified.

  See Also:
    Constant Field Values

### STATE_PRIVATE

    public static final int STATE_PRIVATE

  Denotes a process definition's private state, which is reserved for definitions that are associated with an active process instance.

  See Also:
    Constant Field Values

### STATE_OBSOLETE

    public static final int STATE_OBSOLETE

  Denotes a process definition's obsolete state. An obsolete definition cannot be actively used any more.

  See Also:
    Constant Field Values

### STATE_DELETED

    public static final int STATE_DELETED

  Denotes a deleted process definition.

  See Also:
    Constant Field Values

### MAX_PLAN_NAME_LENGTH

    public static final int MAX_PLAN_NAME_LENGTH

  The maximum length of the name of a process definition; currently set to 30 characters.

  See Also:
    Constant Field Values

### MAX_PLAN_DESCRIPTION_LENGTH

    public static final int MAX_PLAN_DESCRIPTION_LENGTH

  The maximum length of the description of a process definition; currently set to 256 characters.

  See Also:
    Constant Field Values

### MAX_PLAN_TITLE_LENGTH

    public static final int MAX_PLAN_TITLE_LENGTH

  The maximum length of a process definition's title; currently set to 80 characters.

  See Also:
    Constant Field Values

### MAX_PLAN_IDENTIFIER_LENGTH

    public static final int MAX_PLAN_IDENTIFIER_LENGTH

  The maximum length of a process definition's identifier; currently set to 256 characters.

  See Also:
    Constant Field Values

### MAX_OWNER_NAME_LENGTH

    public static final int MAX_OWNER_NAME_LENGTH

  The maximum length of the name of process definition owner; currently set to 64 characters.

  See Also:
    Constant Field Values

Method Detail

### getId

    public long getId()

  Returns the unique ID of this process definition. The ID is allocated automatically by the server when a process definition is created.

  Returns:
    This process definition's unique ID.

### getName

    public java.lang.String getName()

  Returns the name of this process definition. If no name is defined an empty `String` is returned.

  Returns:
    This process definition's name.

### getTitle

    public java.lang.String getTitle()

  Returns the title of this process definition. If no title is defined an empty `String` is returned.

  Returns:
    This process definition's title.

### getDesc

    public java.lang.String getDesc()

  Returns the description of this process definition. If no description is defined an empty `String` is returned.

  Returns:
    This process definition's description.

### setName

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

  Sets the name of this process definition. Typically, the name is a short description of the underlying process. The name is limited to `MAX_PLAN_NAME_LENGTH` characters and must not contain any of the following characters: `\ | / : * ? " < >`. Edit mode required.

  Parameters:
    `name` - The new name of this process definition.
  Throws:
    `ModelInternalException` - Whenever the process definition is not in edit mode when this method is called, or the supplied name is invalid (e.g. the length of name is 0) or `null`. Should be caught as `ModelException` for future compatibility.
  See Also:
    `startEdit()`

### setDesc

    public void setDesc(java.lang.String description)
                 throws ModelInternalException

  Sets the description for this process definition. Typically, the description provides details as to the purpose of this process definition. The description is limited to `MAX_PLAN_DESCRIPTION_LENGTH` characters. Edit mode required.

  Parameters:
    `description` - The new description of this process definition.
  Throws:
    `ModelInternalException` - Whenever the process definition is not in edit mode when this method is called, or the supplied string is `null`. Should be caught as `ModelException` for future compatibility.
  See Also:
    `startEdit()`

### getOwner

    public java.lang.String getOwner()
                              throws ModelException

  Returns the owner of this process definition. The owner is the user who created the definition.

  Returns:
    This process definition's owner.
  Throws:
    `ModelException`

### setTitle

    public void setTitle(java.lang.String title)
                  throws ModelInternalException

  Sets the title of this process definition. Typically, the title is a short description of the definition. The title's length is limited to `MAX_PLAN_TITLE_LENGTH` characters. Edit mode required.

  Parameters:
    `title` - The new title of this process definition.
  Throws:
    `ModelInternalException` - Whenever the process definition is not in edit mode when this method is called, or the supplied string is `null`. Should be caught as `ModelException` for future compatibility.
  See Also:
    `startEdit()`

### startEdit

    public void startEdit()
                   throws WFServerException,
                          WFInternalException,
                          ModelInternalException

  Sets this process definition to edit mode preventing users other than the current session's user from editing this definition. Only definitions in draft or private state can be edited. Furthermore, definitions in draft state can only be edited when there are no related process instances running.

  This method generates a `PlanEvent` that notifies the added `PlanListener`s about changes of this process definition.

  Throws:
    `WFServerException`
    `WFInternalException`
    `ModelInternalException` - Thrown when entering the edit mode failed, and, in particular, when the reason for this failure is that the definition is published state.
  See Also:
    `PlanEvent`, `PlanListener`

### cancelEdit

    public void cancelEdit()
                    throws ModelInternalException,
                           WFServerException,
                           WFInternalException

  Cancels the current editing session discarding all modifications made since the last call to `startEdit`. This method is implicitly called when the session from which editing mode was entered is released.

  This method generates a `PlanEvent` that notifies the added `PlanListener`s about changes of this process definition.

  Throws:
    `ModelInternalException`
    `WFServerException`
    `WFInternalException`
  See Also:
    `startEdit()`

### commitEdit

    public void commitEdit()
                    throws ModelInternalException,
                           WFServerException,
                           WFInternalException

  Commits the changes to this process definition to the database, thus making them permanent. Furthermore, makes the definition available for other users to edit. Successfully committing this definition requires the definition to be valid, that is, for example, all nodes must be properly connected by arrows. Whether the definition is valid can explicitly be checked before committing any changes by calling `validateProcessDef()`.

  Throws:
    `ModelInternalException`
    `WFServerException`
    `WFInternalException`
  See Also:
    `startEdit()`

### isInEditMode

    public boolean isInEditMode()

  Checks whether this process definition is in edit-mode currently, that is, the current user is allowed to modify the definition. Edit-mode is entered by calling `startEdit()`.

  Returns:
    true, if this process definition is in edit mode, false otherwise.

### isLockedByOthers

    public boolean isLockedByOthers()
                             throws ModelException

  Checks whether this process definition is locked for editing by any user including the current user of this process definition.

  Returns:
    `true`, if the process definition is locked for edit by anybody, `false` otherwise.
  Throws:
    `ModelException`

### isPlanChanged

    public boolean isPlanChanged()
                          throws ModelInternalException,
                                 WFServerException,
                                 WFInternalException

  Checks whether any changes have been made to this process definition since it was last committed. If the process definition has never been committed, that is, if it has been newly created, this method throws a `ModelInternalException`.

  Returns:
    true, if this process definition has been changed since the last `commit`, false otherwise.
  Throws:
    `ModelInternalException` - Whenever this method is called on a newly created process definition.
    `WFServerException`
    `WFInternalException`

### saveAs

    public Plan saveAs(java.lang.String templateName)
                throws ModelInternalException,
                       WFInternalException,
                       WFServerException

  Saves a copy of this process definition with a new name and identifier. The name must not be longer than `MAX_PLAN_NAME_LENGTH` characters or contain any of the following characters: `\ | / : * ? " < >`. Initially, the copy is in draft state. A definition in private state cannot be copied.

  Parameters:
    `templateName` - The name of the new process definition.
  Returns:
    A copy of this process definition with the given name and in draft state.
  Throws:
    `ModelInternalException` - Thrown when saving of the copy of this process definition fails. Furthermore this exception is thrown if the supplied `templateName` is invalid (e.g. the length of name is 0) or `null`. Should be caught as `ModelException` for future compatibility.
    `WFServerException` - In particular, if this process definition is in state private.
    `WFInternalException`

### addPlanListener

    public void addPlanListener(PlanListener listener)
                         throws WFInternalException,
                                WFServerException,
                                ModelInternalException

  Adds a listener to this process definition, which is notified by the server when any user other than the current user of this definition modifies the process definition via another Interstage BPM client.

  Not all operations of a process definition generate an event. A `PlanEvent` is only generated for the following:

  - addArrow
  - removeArrow
  - addNode
  - removeNode
  - startEdit
  - cancelEdit

  Parameters:
    `listener` - The listener object to add to this process definition.
  Throws:
    `WFInternalException`
    `ModelInternalException`
    `WFServerException`
  See Also:
    `PlanEvent`

### removePlanListener

    public void removePlanListener(PlanListener listener)

  Removes the given listener from this process definition, preventing further modifications of this definition by other Interstage BPM clients to be communicated to the listener.

  Parameters:
    `listener` - The listener object to be removed from this process definition.

### addArrow

    public Arrow addArrow(java.lang.String arrowName,
                          Node sourceNode,
                          Node targetNode)
                   throws ModelException

  Adds an arrow between the given nodes of this process definition. The length of the arrows name must not exceed `Arrow.MAX_ARROW_NAME_LENGTH` characters. Edit mode required.

  This method generates a `PlanEvent` that notifies the added `PlanListener`s about changes of this process definition.

  Parameters:
    `arrowName` - The name of the arrow to be added.
    `sourceNode` - The source node of the arrow to be added.
    `targetNode` - The target node of the arrow to be added.
  Returns:
    An arrow object with the specified source and target nodes.
  Throws:
    `ModelException` - Whenever the process definition is not in edit mode when this method is called, or the supplied name is invalid (e.g. the length of name is 0) or `null`.
  See Also:
    `startEdit()`, `PlanEvent`, `PlanListener`

### addArrow

    public Arrow addArrow(java.lang.String arrowName,
                          long arrowType,
                          Node sourceNode,
                          Node targetNode)
                   throws ModelInternalException,
                          WFServerException,
                          WFInternalException

  Deprecated. Replaced by `addArrow(String, Node, Node)`

  Adds an arrow to this process definition.

  Parameters:
    `arrowName` - The name of the arrow to be added.
    `arrowType` - The type of the arrow to be added.
    `sourceNode` - The source node of the arrow to be added.
    `targetNode` - The target node of the arrow to be added.
  Returns:
    An arrow object with the specified source and target nodes.
  Throws:
    `ModelInternalException`
    `WFServerException`
    `WFInternalExceptio`
    `WFInternalException`

### getArrow

    public Arrow getArrow(long arrowId)

  Returns this process definition's arrow object with the given identifier.

  Parameters:
    `arrowId` - The identifier of the arrow to retrieve.
  Returns:
    The arrow object with the given identifier or `null`, if there is no arrow with the given identifier.

### getArrows

    public Arrow[] getArrows()

  Returns all arrows of this process definition.

  Returns:
    All arrows of this process definition as an array, which is empty when the definition does not have any arrows.

### removeArrow

    public void removeArrow(long id)
                     throws ModelInternalException,
                            WFServerException,
                            WFInternalException

  Removes the arrow with the given identifier from this process definition. Edit mode required.

  This method generates a `PlanEvent` that notifies the added `PlanListener`s about changes of this process definition.

  Parameters:
    `id` - The identifier of the arrow to be removed from this process definition.
  Throws:
    `ModelInternalException` - Whenever this process definition is not in edit-mode when this method is called.
    `WFServerException`
    `WFInternalException`
  See Also:
    `startEdit()`, `PlanEvent`, `PlanListener`

### addNode

    public Node addNode(java.lang.String name,
                        int nodeType)
                 throws ModelInternalException,
                        WFServerException,
                        WFInternalException

  Adds a node with the given name and type to this process definition. The name must not be longer than `Node.MAX_NODE_NAME_LENGTH` characters or contain any of the following characters: `\ | / : * ? " < >`. The type must be one of the types defined by the `Node.TYPE_`... constants.

  This method generates a `PlanEvent` that notifies the added `PlanListener`s about changes of this process definition.

  Edit-mode of process definition is required. Edit-mode is entered by calling `Plan.startEdit`.

  Parameters:
    `name` - The name of the node to be added.
    `nodeType` - The type of the node to be added.
  Returns:
    A node object with the given name and type.
  Throws:
    `ModelInternalException` - Thrown when the type of node is invalid, or the process definition is not in edit mode. Furthermore this exception is thrown if the supplied name is invalid (e.g. the length of name is 0) or `null`. Should be caught as `ModelException` for future compatibility.
    `WFServerException`
    `WFInternalException`
  See Also:
    `startEdit()`, `PlanEvent`, `PlanListener`

### addNode

    public Node addNode(Node myNode)
                 throws ModelException

  Adds a node with all the information inside the given node to this process definition. Basically this method clones the given node (myNode), adds it into the same process definition, and returns the cloned node. The cloned node and the given node contain the same information (e.g. name, role, scripts etc.). Arrow information will not be cloned. Both nodes must be in the same process definition. The typical API usage of this method is: first get a node from a process definition, then use this method to clone the node inside the same process definition.

  This method generates a `PlanEvent` that notifies the added `PlanListener`s about changes of this process definition.

  Edit-mode of process definition is required. Edit-mode is entered by calling `Plan.startEdit`.

  Parameters:
    `myNode` - The given node
  Returns:
    A cloned node object
  Throws:
    `ModelException` - Thrown when the process definition is not in edit mode when calling this method.
  See Also:
    `startEdit()`, `PlanEvent`, `PlanListener`

### getNodes

    public Node[] getNodes()

  Returns all nodes of this process definition.

  Returns:
    All nodes of this process definition as an array, which is empty when the definition does not have any nodes.

### getNode

    public Node getNode(long nodeId)

  Returns this process definition's node with the given identifier, or null, if there is no node with this identifier.

  Parameters:
    `nodeId` - The identifier of the node to be retrieved.
  Returns:
    The node with the given identifier, or `null`, if there is no node with this identifier in this process definition.

### removeNode

    public void removeNode(long nodeId)
                    throws WFServerException,
                           WFInternalException,
                           ModelInternalException

  Removes the node with the given identifier from this process definition. Edit mode required.

  This method generates a `PlanEvent` that notifies the added `PlanListener`s about changes of this process definition.

  Parameters:
    `nodeId` - The identifier of the node to be removed.
  Throws:
    `ModelInternalException` - Thrown when the node cannot be removed or the definition is not in edit mode when calling this method.
    `WFServerException`
    `WFInternalException`
  See Also:
    `startEdit()`, `PlanEvent`, `PlanListener`

### addDataItemRef

    public DataItemRef addDataItemRef(java.lang.String dataItemRefName,
                                      java.lang.String dataItemRefType)
                               throws ModelInternalException

  Adds a User Defined Attribute (UDA) with the given name and type to this process definition. The name is limited to `DataItemRef.MAX_DATA_REF_NAME_LENGTH` characters. The type must be one of the `DataItemRef.TYPE_...` constants. Edit-mode required.

  Parameters:
    `dataItemRefName` - The name of the UDA to be added.
    `dataItemRefType` - The type of the UDA.
  Returns:
    A newly created `DataItemRef` object with the given name and type.
  Throws:
    `ModelInternalException` - Thrown whenever the process definition is not in edit-mode when this method is called, or the supplied name or type are invalid or `null`. Should be caught as `ModelException` for future compatibility.
  See Also:
    `startEdit()`

### addDataItemRef

    public DataItemRef addDataItemRef(java.lang.String dataItemRefName,
                                      java.lang.String dataItemRefType,
                                      java.lang.String val)
                               throws ModelInternalException

  Adds a User Defined Attribute (UDA) with the given name, type, and initial value to this process definition. The name is limited to `DataItemRef.MAX_DATA_REF_NAME_LENGTH` characters. The type must be one of the `DataItemRef.TYPE_...` constants. Edit-mode required.

  Parameters:
    `dataItemRefName` - The name of the UDA to be added.
    `dataItemRefType` - The type of the UDA.
    `val` - The UDA's initial value.
  Returns:
    A newly created `DataItemRef` object with the given name and type.
  Throws:
    `ModelInternalException` - Thrown whenever the process definition is not in edit-mode when this method is called, or the supplied name or type are invalid or `null`. Furthermore this exception is thrown in case an invalid date is passed for UDS of type `DataItemRef.TYPE_DATE`. Should be caught as `ModelException` for future compatibility.
  See Also:
    `startEdit()`, `DataItemRef`

### addDataItemRef

    public DataItemRef addDataItemRef(java.lang.String dataItemRefName,
                                      java.lang.String dataItemRefType,
                                      java.lang.String val,
                                      boolean isDimension,
                                      boolean isMeasure,
                                      java.lang.String cubeNames,
                                      java.lang.String aggregation)
                               throws ModelInternalException

  Adds a User Defined Attribute (UDA) to this process definition in the same way as `addDataItemRef(String, String, String)`. In addition, lets the user specify, how this UDA is used for data analysis, giving the name of the data cube this UDA is to belong to and whether the UDA is to be used as input dimension or output measure.

  Parameters:
    `dataItemRefName` - The name of the UDA to be added.
    `dataItemRefType` - The type of the UDA.
    `val` - The UDA's initial value.
    `isDimension` - Is this UDA to be used as input dimension?
    `isMeasure` - Is this UDA to be used as output measure?
    `aggregation` - The aggregation function to be applied.
  Returns:
    A newly created `DataItemRef` object with the given name and type.
  Throws:
    `ModelInternalException` - Thrown whenever the process definition is not in edit mode when this method is called, or the supplied name or type are invalid or null. Furthermore this exception is thrown in case an invalid date is passed for uda of type `DataItemRef.TYPE_DATE`. Should be caught as `ModelException` for future compatibility.

### getDataItemRef

    public DataItemRef getDataItemRef(java.lang.String dataItemRefName)

  Returns the definition of User Defined Attribute (UDA) with the specified name, if such a UDA is defined for this process definition. The name must not be longer than `DataItemRef.MAX_DATA_REF_NAME_LENGTH` characters.

  Parameters:
    `dataItemRefName` - The name of the UDA to be retrieved.
  Returns:
    The UDA definition with the given name or `null`, if the name is `null` or no UDA with the given name is defined for this process definition.

### getDataItemRefs

    public DataItemRef[] getDataItemRefs()

  Returns all user-defined attributes (UDAs) of this process definition.

  Returns:
    An array of all UDAs defined for this process definition. The array is empty when this definition does not have any UDAs.

### removeDataItemRef

    public void removeDataItemRef(java.lang.String dataItemRefName)
                           throws ModelInternalException

  Removes the user-defined attribute (UDA) with the given name from this process definition, if such a UDA exists. The name must not be longer than `DataItemRef.MAX_DATA_REF_NAME_LENGTH` characters. Edit mode required.

  Parameters:
    `dataItemRefName` - The name of the UDA to be removed.
  Throws:
    `ModelInternalException` - Thrown when this process definition is not in edit mode when this method is called.
  See Also:
    `startEdit()`

### removeAllDataItemRefs

    public void removeAllDataItemRefs()
                               throws ModelInternalException

  Removes all user-defined attributes (UDAs) from this process definition. Edit mode required.

  Throws:
    `ModelInternalException` - Thrown whenever this process definition is not in edit mode when this method is called or removing all UDAs fails for any other reason.
  See Also:
    `startEdit()`

### validateProcessDef

    public java.lang.String validateProcessDef()
                                        throws WFInternalException,
                                               WFServerException,
                                               ModelException

  Validates a newly created or changed process definition, thus allowing a user to determine whether a call to `createProcessDef()` or `commitEdit()` will succeed.

  Returns:
    If the definition is not valid, a descriptive message explaining why the process definition is not valid, otherwise a string of length zero.
  Throws:
    `WFInternalException`
    `WFServerException`
    `ModelException`

### createProcessDef

    public Plan createProcessDef()
                          throws WFInternalException,
                                 WFServerException,
                                 ModelInternalException

  For a newly created process definition, commits the definition to be stored persistently. `validateProcessDef()` allows a user to check whether the process definition is valid before committing it.

  It is necessary that minimum the name of this process definition is defined before calling this method. The name is set by calling method `setName(String)`. If this process definition is in edit-mode (to set the name) the commit of edit-mode will be done automatically by this method.

  Throws:
    `WFInternalException`
    `WFServerException`
    `ModelInternalException`

### createProcessInstance

    public ProcessInstance createProcessInstance()
                                          throws WFServerException,
                                                 WFInternalException,
                                                 ModelInternalException

  Creates and returns an instance of this process definition. The new process instance is not yet started.

  Throws:
    `WFInternalException`
    `WFServerException`
    `ModelInternalException`

### getCommitScript

    public java.lang.String getCommitScript()

  Deprecated. Replaced by JavaActions. Use `getCommitJavaAction` instead.

  Returns this process definition's commit script, which is executed for completed instances of this definition.

  Returns:
    This process definition's commit script.

### setCommitScript

    public void setCommitScript(java.lang.String script)

  Deprecated. Replaced by JavaActions. Use `setCommitJavaAction` instead.

  Returns this process definition's commit script, which is executed for completed instances of this definition.

  Parameters:
    `script` - The commit script of this process definition. At maximum, 64,000 characters in length.

### getInitScript

    public java.lang.String getInitScript()

  Deprecated. Replaced by JavaActions. Use `getInitJavaAction` instead.

  Returns this process definition's initialization script, which is executed for instances of this definition that have just been started.

  Returns:
    The initialization script of this process definition.

### setInitScript

    public void setInitScript(java.lang.String script)

  Deprecated. Replaced by JavaActions. Use `getInitJavaAction` instead.

  Sets this process definition's initialization script, which is executed for instances of this definition that have just been started.

  Parameters:
    `script` - The new initialization script. At maximum, 64,000 characters in length.

### getProcOwnerRoleScript

    public java.lang.String getProcOwnerRoleScript()

  Deprecated. Replaced by JavaActions. Use `getProcOwnerRoleJavaActionSet` instead.

  Returns the owner script, which determines the users that are to become the owners of instances of this process definition.

### setProcOwnerRoleScript

    public void setProcOwnerRoleScript(java.lang.String script)

  Deprecated. Replaced by JavaActions. Use `setProcOwnerRoleJavaActionSet` instead.

  Sets the owner script, which determines the users that are to become the owners of instances created from this process definition.

  Parameters:
    `script` - The script to be used as owner role script.

### getProcOwnerRole

    public java.lang.String getProcOwnerRole()

  Returns the name of the role that defines the users who become the owners of instances created from this process definition.

  Returns:
    The name of the owner role or an empty `String` if no role is defined.

### getPlanIdentifier

    public java.lang.String getPlanIdentifier()

  Returns the application-defined identifier of this process definition. Notice that this identifier is different from the numerical identifier that uniquely identifies every Interstage BPM object.

  Returns:
    The application-defined identifier of this process definition or an empty `String` if no identifier is defined.

### setOwner

    public void setOwner(java.lang.String owner)
                  throws ModelException

  Sets the name of the owner of this process definition. The length of the name must not exceed the number of characters specified by the constant `DirectoryServices.MAX_DIR_NAME_LENGTH`. Furthermore, the name must not be `null` or contain a comma. Edit mode required.

  Parameters:
    `owner` - The new owner of this process definition.
  Throws:
    `ModelException` - When the process definition is not in edit-mode when this method is called, or the owner name is invalid (e.g. the length of supplied owner is 0) or `null`.
  See Also:
    `startEdit()`

### setProcOwnerRole

    public void setProcOwnerRole(java.lang.String owner)

  Sets the name of the role that defines the users who will be the owners of instances created from this process definition. The length of the name must not exceed the number of characters specified by the constant `DirectoryServices.MAX_DIR_NAME_LENGTH`. Furthermore, the name must not be `null` or contain a comma. Edit mode required. When not in edit mode, calling this method has no effect.

  Parameters:
    `owner` - The name of the owner role.
  See Also:
    `startEdit()`

### setPlanIdentifier

    public void setPlanIdentifier(java.lang.String identifier)

  Sets the application-defined identifier of this process definition. The identifier must not be longer than specified by `MAX_PLAN_IDENTIFIER_LENGTH`. Notice that this identifier is different from the numerical identifier that uniquely identifies every Interstage BPM object. Edit mode required. If not in edit mode, a call to this method will have no effect.

  Parameters:
    `identifier` - The application-defined identifier of this process definition.
  See Also:
    `startEdit()`

### getState

    public int getState()

  Returns the current state of this process definition as one of the `STATE_`... constants defined in this class. When the process definition is created it has the state `STATE_DRAFT`.

  Returns:
    The integer constants specifying the state of this process definition.

### setWFSession

    public void setWFSession(WFSession wfs)

  Sets the session for committing this process definition to permanent storage. May only be called once, and only on newly created definitions. A call of this method on a definition already existing in the Interstage BPM database, and any call after the initial call will be ignored.

  Parameters:
    `wfs` - A valid Interstage BPM session.

### setTimers

    public void setTimers(TimerDef[] timers)
                   throws ModelException

  Sets an array of timers for this process definition. Removes all currently existing timers. Edit mode required.

  Parameters:
    `timers` - The timers to be added to this process definition.
  Throws:
    `ModelException` - When this process definition is not in edit mode, the array of timers is `null`, or one of the timers contained in the array is null.
  See Also:
    `startEdit()`

### addTimer

    public TimerDef addTimer(TimerDef timer)
                      throws ModelException

  Makes the supplied timer persistent and adds it to this process definition. Edit mode required.

  Parameters:
    `timer` - The timer to be added.
  Returns:
    The now persistent timer object.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called or adding the timer fails for any other reason.
  See Also:
    `startEdit()`

### getTimers

    public TimerDef[] getTimers()
                         throws ModelException

  Returns an array of all timers attached to this process definition.

  Returns:
    An array of all timer objects attached to this process definition. The array is empty when there are no timers.
  Throws:
    `ModelException`
  See Also:
    `TimerDef`

### getTimer

    public TimerDef getTimer(long tdid)
                      throws ModelException

  Returns the timer with the given ID.

  Parameters:
    `tdid` - The unique identifier of the `TimerDef` to be returned.
  Returns:
    The timer with the given ID.
  Throws:
    `ModelException` - When no timer exists for the identifier.
  See Also:
    `TimerDef`

### removeTimer

    public void removeTimer(TimerDef td)
                     throws ModelException

  Removes the given timer from this process definition. Edit mode required.

  Parameters:
    `td` - The timer to be removed.
  Throws:
    `ModelException`
  See Also:
    `startEdit()`

### reorderTimers

    public void reorderTimers(TimerDef[] tds)
                       throws ModelException

  Rearranges the timers associated with this process definition according to the supplied sequence. The given array must contain exactly the same timers as currently defined for this definition. Edit mode required.

  Parameters:
    `tds` - The array of timers of this process definition in a sequence different from the current sequence.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called or the supplied array is invalid.
  See Also:
    `startEdit()`

### getVersion

    public java.lang.String getVersion()

  Returns a string representation of the version of this process definition. The version is allocated automatically by the server.

  Returns:
    A string representation of this process definition's version.

### getInitJavaActionSet

    public JavaActionSet getInitJavaActionSet()
                                       throws ModelException

  Returns this process definition's initialization Java action set.

  Returns:
    This process definition's initialization Java action set or `null` if no Java action set is defined.
  Throws:
    `ModelException`

### getCommitJavaActionSet

    public JavaActionSet getCommitJavaActionSet()
                                         throws ModelException

  Returns this process definition's commit Java action set.

  Returns:
    This process definition's commit Java action set or `null` if no Java action set is defined.
  Throws:
    `ModelException`

### getProcOwnerRoleJavaActionSet

    public JavaActionSet getProcOwnerRoleJavaActionSet()
                                                throws ModelException

  Returns this process definition's owner role Java action set.

  Returns:
    This process definition's owner role Java action set or `null` if no Java action set is defined.
  Throws:
    `ModelException`

### setInitJavaActionSet

    public void setInitJavaActionSet(JavaActionSet actionSet)
                              throws ModelException

  Sets this process definition's initialization Java action set. Edit mode required.

  Parameters:
    `actionSet` - This process definition's new initialization Java action set.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called.
  See Also:
    `startEdit()`

### setCommitJavaActionSet

    public void setCommitJavaActionSet(JavaActionSet actionSet)
                                throws ModelException

  Sets this process definition's commit Java action set. Edit mode required.

  Parameters:
    `actionSet` - This process definition's new commit Java action set.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called.
  See Also:
    `startEdit()`

### setProcOwnerRoleJavaActionSet

    public void setProcOwnerRoleJavaActionSet(JavaActionSet actionSet)
                                       throws ModelException

  Sets this process definition's owner role Java action set. Edit mode required.

  Parameters:
    `actionSet` - This process definition's new owner role Java action set.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called.
  See Also:
    `startEdit()`

### removeInitJavaActionSet

    public JavaActionSet removeInitJavaActionSet()
                                          throws ModelException

  Removes and returns this process definition's current initialization Java action set. Edit mode required.

  Returns:
    The `JavaActionSet` object that is removed.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called.
  See Also:
    `startEdit()`

### removeCommitJavaActionSet

    public JavaActionSet removeCommitJavaActionSet()
                                            throws ModelException

  Removes and returns this process definition's current commit Java action set. Edit mode required.

  Returns:
    This definition's current commit Java action set.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called.
  See Also:
    `startEdit()`

### removeProcOwnerRoleJavaActionSet

    public JavaActionSet removeProcOwnerRoleJavaActionSet()
                                                   throws ModelException

  Removes and returns this process definition's current owner role Java action set.

  Edit-mode of process definition is required. Edit-mode is entered by calling `Plan.startEdit`.

  Returns:
    This definition's current owner role Java action set.
  Throws:
    `ModelException` - When the process definition is not in edit mode when this method is called.
  See Also:
    `startEdit()`

### addTrigger

    public TriggerDef addTrigger(java.lang.String name,
                                 int type)
                          throws ModelException

  Adds a new trigger definition with the given name and type to this process definition.

  The name must not be longer than `TriggerDef.MAX_TRIGGER_NAME_LENGTH`. The type must be one of the types defined within the `TriggerDef` object, like `TriggerDef.START_PROCESS`.

  Edit-mode of process definition is required. Edit-mode is entered by calling `Plan.startEdit`.

  Parameters:
    `name` - The name of the trigger to be added.
    `type` - The type of the trigger to be added.
  Returns:
    The new trigger definition of the supplied type with the given name.
  Throws:
    `ModelException` - Thrown when this process definition is not in edit mode. Furthermore this exception is thrown when the supplied name of trigger is invalid (e.g. the length of name is 0) or `null` or if the type is invalid.
  See Also:
    `startEdit()`

### getTrigger

    public TriggerDef getTrigger(long triggerId)
                          throws ModelException

  Retrieves this process definition's trigger with the given identifier.

  Parameters:
    `triggerId` - The identifier of the trigger to be retrieved.
  Returns:
    This process definition's trigger with the given identifier.
  Throws:
    `ModelException`

### getTriggers

    public TriggerDef[] getTriggers()
                             throws ModelException

  Retrieves all the triggers defined for this process definition.

  Returns:
    All of this process definition's triggers.
  Throws:
    `ModelException`

### getTriggers

    public TriggerDef[] getTriggers(int type)
                             throws ModelException

  Retrieves all of this process definition's triggers of the given type.

  Parameters:
    `type` - The type of the trigger.
  Returns:
    An array of all the trigger definition;
  Throws:
    `ModelException`

### removeTrigger

    public void removeTrigger(long triggerId)
                       throws ModelException

  Removes the trigger with the given identifier.

  Edit-mode of the process definition is required. Edit-mode is entered by calling `Plan.startEdit`.

  Parameters:
    `triggerId` - The unique identifier of the trigger.
  Throws:
    `ModelException` - Thrown when this process definition is not in edit-mode.
  See Also:
    `startEdit()`

### removeTriggers

    public void removeTriggers()
                        throws ModelException

  Removes all triggers from this process definition.

  Edit-mode of the process definition is required. Edit-mode is entered by calling `Plan.startEdit`.

  Throws:
    `ModelException` - Thrown when this process definition is not in edit-mode.
  See Also:
    `startEdit()`

### convertToXPDL

    public void convertToXPDL(java.io.OutputStream out,
                              java.util.Properties props)
                       throws ModelException

  Writes this process definition in XPDL format to the supplied output stream.

  Parameters:
    `out` - The output stream to write this process definition to.
  Throws:
    `ModelException`

### convertToXPDL

    public void convertToXPDL(java.io.OutputStream out)
                       throws ModelException

  Writes this process definition in XPDL format to the supplied output stream.

  Parameters:
    `out` - The output stream to write this process definition to.
  Throws:
    `ModelException`

### convertToBPEL

    public void convertToBPEL(java.io.OutputStream out)
                       throws ModelException

  Writes this process definition in BPEL format to the supplied output stream.

  Parameters:
    `out` - The output stream to write this process definition to.
  Throws:
    `ModelException`

### convertToXPDLDom

    public org.w3c.dom.Document convertToXPDLDom(java.util.Properties props)
                                          throws ModelException

  Returns a DOM representation of this process definition in XPDL format.

  Returns:
    A DOM representation of this process definition in XPDL format.
  Throws:
    `ModelException`

### convertToXPDLDom

    public org.w3c.dom.Document convertToXPDLDom()
                                          throws ModelException

  Returns a DOM representation of this process definition in XPDL format.

  Returns:
    A DOM representation of this process definition in XPDL format.
  Throws:
    `ModelException`

### convertFromXPDL

    public void convertFromXPDL(java.io.InputStream in)
                         throws ModelException

  Initializes this process definition from the given input stream, which delivers a process definition in XPDL format.

  Parameters:
    `in` - The input stream in XPDL format to initialize this process definition from.
  Throws:
    `ModelException`

### convertFromBPEL

    public void convertFromBPEL(java.io.InputStream in)
                         throws ModelException

  Initializes this process definition from the given input stream, which delivers a process definition in XPDL format.

  Parameters:
    `in` - The input stream in BPEL format to initialize this process definition from.
  Throws:
    `ModelException`

### convertFromXPDLDom

    public void convertFromXPDLDom(org.w3c.dom.Document doc)
                            throws ModelException

  Initializes this process definition from the given DOM tree, which delivers a process definition in XPDL format.

  Parameters:
    `doc` - The DOM tree in XPDL format to initialize this process definition from.
  Throws:
    `ModelException`

### getPlanURI

    public java.lang.String getPlanURI()
                                throws ModelException

  Returns the URI of this process definition on the current server. A remote server can uniquely identify the process definition by this URI, for example, to use it as a remote subprocess.

  Returns:
    The URI of this process definition on the current server.
  Throws:
    `ModelException`

### getExtendedAttributes

    public org.w3c.dom.Document getExtendedAttributes()
                                               throws ModelException

  Returns the DOM document that contains all of the process definition level extended attributes, which include custom data such as swim lane, notation etc. The term "Extended Attributes" comes from the XPDL standard specification which uses this term to mean extra information that is not part of the standard. We use it here in a similar but not precisely the same way. Here it means 'extra information that is not native the product'. There are four different categories of information which could be associated with a plan:
  - Category 1: known to the XPDL spec, and native to Interstage BPM. This category will never be in extended attributes. In this case XPDL and Interstage BPM 'agree' and the information is mapped back and forth without needing extended attributes.
  - Category 2: unknown to XPDL, but native to Interstage BPM. This information is encoded by Interstage BPM into extended attributes in the XPDL file when written, and when the XPDL file is read, the extended attributes are encoded back into native Interstage BPM quantities. An example of this is X & Y coordinates which are part of this API, but not a native part of XPDL 1.0, so that extended attributes would have to be used. Those extended attributes appear in the XPDL file, but do not appear here because there are other API calls to retrieve them.
  - Category 3: unknown to XPDL, and unknown to Interstage BMN. This might be extended attributes that were added to the XPDL by a foreign process product. Proper handling of XPDL requires that these values be preserved and included in the process if it is ever written out to XPDL again. These are the extended attributes that you will find represented here as well as in the XPDL file. In some cases, our own BPM clients may understand and make use of this information, so this become a general purpose extension mechanism that special purpose clients can make use of to store meta-data about the process definition, and have some assurance that it will be preserved through XPDL.
  - Category 4: known to XPDL, but not native to Interstage BPM. Theoretically, there could be information that is required to be preserved as part of an XPDL file, which is not native to BPM, and this information could be preserved using this extended attribute mechanism. Therefor it is possible that there could be additional extended attributes from this API that would not be present in the XPDL as extended attributes, but at the time of this writing there were no cases of this.
  The schema for the extended attributes is:

       <xsd:element name="ExtendedAttributes">
          <xsd:complexType>
             <xsd:sequence>
                <xsd:element ref="xpdl:ExtendedAttribute" minOccurs="0" maxOccurs="unbounded"/>
             </xsd:sequence>
          </xsd:complexType>
       </xsd:element>

       <xsd:element name="ExtendedAttribute">
          <xsd:complexType mixed="true">
             <xsd:choice minOccurs="0" maxOccurs="unbounded">
                <xsd:any minOccurs="0" maxOccurs="unbounded"/>
             </xsd:choice>
             <xsd:attribute name="Name" type="xsd:NMTOKEN" use="required"/>
             <xsd:attribute name="Value" type="xsd:string"/>
          </xsd:complexType>
       </xsd:element>

  A complete example with three extended attributes:

       <ExtendedAttributes>
          <ExtendedAttribute Name="DataRef-ParticipantID-1" Value="ID_CSE"/>
          <ExtendedAttribute Name="XOffset" Value="400"/>
          <ExtendedAttribute Name="YOffset" Value="140"/>
       </ExtendedAttributes>

  Returns:
    The DOM document that contains all of the process definition level extended attributes.
  Throws:
    `ModelException`
  See Also:
    `#setExtendedAttributes(document)`

### setExtendedAttributes

    public void setExtendedAttributes(org.w3c.dom.Document attrs)
                               throws ModelException

  Sets the DOM document that contains all of the process definition level extended attributes. See `Plan.getExtendedAttributes` for details.

  Edit-mode of the process definition is required. Edit-mode is entered by calling `Plan.startEdit`.

  Parameters:
    `attrs` - The DOM document that contains all of the process definition level extended attributes.
  Throws:
    `ModelException` - Thrown when this process definition is not in edit-mode.
  See Also:
    `getExtendedAttributes()`, `startEdit()`

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