de.danet.an.workflow.api
Interface ProcessDefinition


public interface ProcessDefinition

This interface defines a process definiton.


Nested Class Summary
static interface ProcessDefinition.PackageHeaderData
          An interface providing the information from the package definition header section.
static interface ProcessDefinition.ProcessHeaderData
          An interface providing the information from the process definition header section.
 
Field Summary
static int AUDIT_SELECTION_ALL_EVENTS
          Select all audit events to be delivered and recorded.
static int AUDIT_SELECTION_NO_EVENTS
          Select no audit events to be delivered and recorded.
static int AUDIT_SELECTION_PROCESS_CLOSED_EVENTS_ONLY
          Select process closed events for delivery and recording only.
static int AUDIT_SELECTION_STATE_EVENTS_ONLY
          Select state change events for delivery and recording only.
static int REMOVE_AUTOMATIC
          Remove closed processes automatically.
static int REMOVE_COMPLETED
          Remove closed processes automatically if closed.completed.
static int REMOVE_MANUAL
          Remove closed processes manually.
 
Method Summary
 Application applicationById(java.lang.String id)
          Return the application with the given id.
 java.util.Collection applications()
          Returns the applications defined in this process.
 int auditEventSelection()
          This method returns the selected audit events of instances of this process definition.
 int cleanupMode()
          This method checks if a closed process should be removed.
 ProcessDataInfo contextSignature()
          Returns the meta information that defines how to set the context for this kind of process.
 FormalParameter[] formalParameters()
          Returns the meta information that describes the formal parameters for this kind of process.
 java.lang.String mgrName()
          The name of the associated process manager.
 java.lang.String packageId()
          Id of the package as specified in the XPDL description.
 java.lang.String packageName()
          Name of the package as specified in the XPDL description.
 Participant participantById(java.lang.String id)
          Return the participant identified by the id.
 java.util.Collection participants()
          Gets the participants for this process.
 ProcessDefinition.ProcessHeaderData processHeader()
          Returns process header data object of the process description.
 java.lang.String processId()
          Id of the process as specified in the XPDL description.
 java.lang.String processName()
          Name of the process as specified in the XPDL description.
 boolean removeClosedProcess()
          Deprecated. Use cleanupMode. For backward compatibility, this method returns true if cleanupMode returns REMOVE_AUTOMATIC.
 ProcessDataInfo resultSignature()
          Returns the meta information that describes the result for this kind of process.
 boolean storeAuditEvents()
          This method reports if audit events are written to the database.
 org.jdom.Document toJDOM()
          Returns the process description as XPDL JDOM tree.
 SAXEventBuffer toSAX()
          Return the process definition as SAX event buffer.
 java.lang.String toXPDL()
          Returns the process description as XPDL textual description.
 java.lang.String version()
          Version of the process definition as specified in the XPDL description.
 

Field Detail

AUDIT_SELECTION_ALL_EVENTS

public static final int AUDIT_SELECTION_ALL_EVENTS
Select all audit events to be delivered and recorded.

See Also:
Constant Field Values

AUDIT_SELECTION_STATE_EVENTS_ONLY

public static final int AUDIT_SELECTION_STATE_EVENTS_ONLY
Select state change events for delivery and recording only.

See Also:
Constant Field Values

AUDIT_SELECTION_PROCESS_CLOSED_EVENTS_ONLY

public static final int AUDIT_SELECTION_PROCESS_CLOSED_EVENTS_ONLY
Select process closed events for delivery and recording only.

See Also:
Constant Field Values

AUDIT_SELECTION_NO_EVENTS

public static final int AUDIT_SELECTION_NO_EVENTS
Select no audit events to be delivered and recorded.

See Also:
Constant Field Values

REMOVE_MANUAL

public static final int REMOVE_MANUAL
Remove closed processes manually.

See Also:
Constant Field Values

REMOVE_AUTOMATIC

public static final int REMOVE_AUTOMATIC
Remove closed processes automatically.

See Also:
Constant Field Values

REMOVE_COMPLETED

public static final int REMOVE_COMPLETED
Remove closed processes automatically if closed.completed.

See Also:
Constant Field Values
Method Detail

packageId

public java.lang.String packageId()
Id of the package as specified in the XPDL description.

Returns:
package id.

processId

public java.lang.String processId()
Id of the process as specified in the XPDL description.

Returns:
process id.

version

public java.lang.String version()
Version of the process definition as specified in the XPDL description.

Returns:
process defintion version.

packageName

public java.lang.String packageName()
Name of the package as specified in the XPDL description.

Returns:
package name.

processName

public java.lang.String processName()
Name of the process as specified in the XPDL description.

Returns:
process name.

contextSignature

public ProcessDataInfo contextSignature()
Returns the meta information that defines how to set the context for this kind of process. Equivalent to calling contextSignature on a process manager for this kind of process.

Returns:
the process meta information.
See Also:
WfProcessMgr.contextSignature()

resultSignature

public ProcessDataInfo resultSignature()
Returns the meta information that describes the result for this kind of process. Equivalent to calling resultSignature on a process manager for this kind of process.

The implementation returns all formal IN or INOUT parameters.

Returns:
the process meta information.
See Also:
WfProcessMgr.resultSignature()

formalParameters

public FormalParameter[] formalParameters()
Returns the meta information that describes the formal parameters for this kind of process.

Returns:
the process meta information. The result is never null, rather an array with zero element is returned.

mgrName

public java.lang.String mgrName()
The name of the associated process manager. While the name of a process in XPDL is just a human readable "label", the name attribute of the process manager must be unique within agiven business domain.

The standard implementation of ProcessDefinition derives a manager name from the package and process ids in the XPDL, separated by a slash ("/").

Returns:
process manager name.

processHeader

public ProcessDefinition.ProcessHeaderData processHeader()
Returns process header data object of the process description.

Returns:
process header data object of the process description

toSAX

public SAXEventBuffer toSAX()
Return the process definition as SAX event buffer.

Returns:
the process definition
Since:
1.2

toXPDL

public java.lang.String toXPDL()
Returns the process description as XPDL textual description.

Returns:
the process definition

toJDOM

public org.jdom.Document toJDOM()
Returns the process description as XPDL JDOM tree.

Returns:
DOM representation of the process definition

applications

public java.util.Collection applications()
Returns the applications defined in this process.

Returns:
a collection of Applications.

applicationById

public Application applicationById(java.lang.String id)
                            throws InvalidIdException
Return the application with the given id.

Parameters:
id - the application id.
Returns:
the application.
Throws:
InvalidIdException - if no application with the given id exists.

participants

public java.util.Collection participants()
Gets the participants for this process.

Returns:
a collection of Participants for this process.

participantById

public Participant participantById(java.lang.String id)
                            throws InvalidIdException
Return the participant identified by the id.

Parameters:
id - identity of the participant in string
Returns:
a Participant object
Throws:
InvalidIdException - if no participant with the given id exists.

removeClosedProcess

public boolean removeClosedProcess()
Deprecated. Use cleanupMode. For backward compatibility, this method returns true if cleanupMode returns REMOVE_AUTOMATIC.

This method checks if the closed process should be removed. Parse the process definition and find out if the extendAttribute with the name of RemoveClosedProcess has the value of MANUAL, then return false; if it has the value of AUTOMATIC, then return true. Default is true.

Returns:
true if the closed process should be removed, otherwise false.

cleanupMode

public int cleanupMode()
This method checks if a closed process should be removed. Parse the process definition and find out if the extendAttribute with the name of RemoveClosedProcess has the value of MANUAL, AUTOMATIC or COMPLETED and return the corresponding constant. Default is to remove automatically, i.e. REMOVE_AUTOMATIC.

Returns:
the cleanup mode.

auditEventSelection

public int auditEventSelection()
This method returns the selected audit events of instances of this process definition.

Returns:
the filter

storeAuditEvents

public boolean storeAuditEvents()
This method reports if audit events are written to the database.

Returns:
true if only state change events of the process instance are audited.