|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Local interface for SimpleApplicationDirectory.
de.danet.an.workflow.util
Method Summary | |
SimpleApplicationInfo |
infoByActivity(ActivityUniqueKey auk)
Return the information associated with the activity. |
java.util.Collection |
infosByApplication(java.lang.String applName)
Return infos associated with a given application. |
java.util.Collection |
infosByKey(java.lang.String applName,
java.lang.String applInstKey)
Return the infos associated with the given application name and key. |
java.util.Collection |
infosByResource(java.lang.String applName,
java.lang.String resourceKey)
Return infos associated with a given application and resource. |
SimpleApplicationInfo |
instanceInfo(long instId)
Return the information associated with the application instance. |
long |
registerInstance(java.lang.String applName,
Activity activity,
java.lang.Object state,
boolean saveAssignment)
Register a new application instance. |
long |
registerInstance(java.lang.String applName,
java.lang.String applInstKey,
Activity activity,
java.lang.Object state,
boolean saveAssignment)
Register a new application instance. |
void |
removeInstance(long instId)
Remove an application instance. |
void |
updateInvokingActivity(long instId,
ActivityUniqueKey auk)
Update the activity associated with the given application instance. |
void |
updateState(long instId,
java.lang.Object state)
Update the state information associated with the given application instance id. |
Methods inherited from interface javax.ejb.EJBLocalObject |
getEJBLocalHome, getPrimaryKey, isIdentical, remove |
Method Detail |
public long registerInstance(java.lang.String applName, Activity activity, java.lang.Object state, boolean saveAssignment)
retrieve
, update
and removeInstance(long)
remove the instance information.
applName
- the application nameactivity
- the invoking activitystate
- the application statesaveAssignment
- if true
the assigned resource will be saved to allow searching application instances with a particular assignee
public long registerInstance(java.lang.String applName, java.lang.String applInstKey, Activity activity, java.lang.Object state, boolean saveAssignment)
applName
- the application nameapplInstKey
- an arbitrary key for this instance, up to 1000 characters longactivity
- the invoking activitystate
- the application statesaveAssignment
- if true
the assigned resource will be saved to allow searching application instances with a particular assignee
public void removeInstance(long instId)
instId
- the application instance id previously assigned by registerInstance
public SimpleApplicationInfo instanceInfo(long instId) throws InvalidKeyException
instId
- the application instance id previously assigned by registerInstance
InvalidKeyException
- if there is no data available for the given idpublic SimpleApplicationInfo infoByActivity(ActivityUniqueKey auk) throws InvalidKeyException
auk
- the unique key of the activity an application instance is expected to be registered for.
InvalidKeyException
- if there is no data available for the given activitypublic java.util.Collection infosByApplication(java.lang.String applName)
applName
- the application name
public java.util.Collection infosByKey(java.lang.String applName, java.lang.String applInstKey) throws InvalidKeyException
applName
- the application nameapplInstKey
- the key associated with the instance
InvalidKeyException
public java.util.Collection infosByResource(java.lang.String applName, java.lang.String resourceKey)
applName
- the application nameresourceKey
- the resource's key
public void updateState(long instId, java.lang.Object state) throws InvalidKeyException
instId
- the application instance id previously assigned by registerInstance
state
- the new state
InvalidKeyException
- if there is no application instance with the given idpublic void updateInvokingActivity(long instId, ActivityUniqueKey auk) throws InvalidKeyException
Be careful to ensure the eventual termination of the application. If the creating activity has completed, the terminate method of the tool agent that started the application will not be called on abnormal process completion. So, if a process is terminated abnormally and the starting activity is closed and the stopping activity has not yet been started (and associated with the application) the application will not be stopped. This should normally not be a problem for simple applications.
As a convenience, any application information that is still registered after a process completion will automatically be deleted.
The new activity must belong to the same process as the activity that initially created the application instance.
instId
- the application instance id previously assigned by registerInstance
auk
- the new activity's unique key. May be null
if the application instance is temporarily not associated with an activity.
InvalidKeyException
- if there is no application instance with the given id
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |