org.enhydra.shark.api.client.wfservice
Interface AdminMisc


public interface AdminMisc

Interface used to perform some administrative operations.

Author:
Sasa Bojanic, Vladimir Puskas

Method Summary
 long getActivityCreatedTime(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          Returns the time when activity is created in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.
 WMEntity getActivityDefinitionInfo(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          Returns string representing the XPDL definition Id of activity instance that has the given Id.
 long getActivityFinishTime(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          Returns the time when activity is finished in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.
 java.lang.String getActivityResourceUsername(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          Returns the name of the resource that accepted/completed activity.
 long getActivityStartedTime(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          Returns the time when activity is last time accepted in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.
 java.lang.String[] getAllUsers(WMSessionHandle shandle)
          Returns a list of all shark usernames.
 java.lang.String getAssignmentActivityId(WMSessionHandle shandle, java.lang.String procId, java.lang.String assId)
          Returns string representing the activity Id of activity instance that relates to the assignment determined by given parameters.
 java.lang.String getAssignmentResourceUsername(WMSessionHandle shandle, java.lang.String procId, java.lang.String assId)
          Returns string representing username of resource instance that relates to assignment determined by given parameters.
 java.lang.String getBlockActivityId(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          Returns string representing the Id of block activity instance of activity instance that has the given Id.
 DeadlineInfo[] getDeadlineInfoForActivity(WMSessionHandle session, java.lang.String procId, java.lang.String actId)
          Returns information on all deadlines of a given activity.
 DeadlineInfo[] getDeadlineInfoForProcess(WMSessionHandle session, java.lang.String procId)
          Returns information on all deadlines of a given process's active activities.
 int getProcessCacheSize(WMSessionHandle sessionHandle)
          Returns process cache size.
 long getProcessCreatedTime(WMSessionHandle shandle, java.lang.String procId)
          /** Returns the time when process is created in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.
 WMEntity getProcessDefinitionInfo(WMSessionHandle shandle, java.lang.String procId)
          Returns string representing the XPDL definition Id of process instance that has the given Id.
 WMEntity getProcessDefinitionInfoByUniqueProcessDefinitionName(WMSessionHandle shandle, java.lang.String procDefUniqueName)
          Returns string representing the XPDL definition Id of process instance that has the given Id.
 java.lang.String[][] getProcessDefinitionInputSignature(WMSessionHandle shandle, WMEntity procDef)
          Returns input signature for the XPDL process definition defined by package Id, package version and definition Id.
 long getProcessFinishTime(WMSessionHandle shandle, java.lang.String procId)
          Returns the time when process is finished in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.
 java.lang.String getProcessRequesterUsername(WMSessionHandle shandle, java.lang.String procId)
          Returns the name of the resource that requested (created) the proces.
 long getProcessStartedTime(WMSessionHandle shandle, java.lang.String procId)
          Returns the time when process is started in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.
 int getResourceCacheSize(WMSessionHandle sessionHandle)
          Returns resource cache size.
 java.lang.String[][] getToolAgentsInfo(WMSessionHandle shandle)
           
 WMEntity getVariableDefinitionInfo(WMSessionHandle shandle, java.lang.String procId, java.lang.String variableId)
          Returns string representing the XPDL definition Id of process instance that has the given Id.
 WMEntity getVariableDefinitionInfoByUniqueProcessDefinitionName(WMSessionHandle shandle, java.lang.String procDefUniqueName, java.lang.String variableId)
          Returns string representing the XPDL definition Id of process instance that has the given Id.
 java.lang.String getVariableJavaClassName(WMSessionHandle shandle, java.lang.String procId, java.lang.String variableId)
          Returns string representing the class name of the instance of variable that can be determined by the given parameters.
 java.lang.String getVariableJavaClassNameByUniqueProcessDefinitionName(WMSessionHandle shandle, java.lang.String procDefUniqueName, java.lang.String variableId)
          Returns string representing the class name of the instance of variable that can be determined by the given parameters.
 int howManyCachedProcesses(WMSessionHandle sessionHandle)
          Returns the number of currently cached process objects.
 int howManyCachedResources(WMSessionHandle sessionHandle)
          Returns the number of currently cached resource objects.
 WMAAuditEntryIterator listActivityAuditEntries(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
           
 WMAAuditEntryIterator listProcessAuditEntries(WMSessionHandle shandle, java.lang.String procId)
           
 

Method Detail

getActivityDefinitionInfo

public WMEntity getActivityDefinitionInfo(WMSessionHandle shandle,
                                          java.lang.String procId,
                                          java.lang.String actId)
                                   throws java.lang.Exception
Returns string representing the XPDL definition Id of activity instance that has the given Id.

Parameters:
procId - activity's process Id.
actId - Id of activity instance.
Returns:
XPDL activity definition Id for the given activity instance.
Throws:
java.lang.Exception - If something unexpected happens.

getProcessDefinitionInfo

public WMEntity getProcessDefinitionInfo(WMSessionHandle shandle,
                                         java.lang.String procId)
                                  throws java.lang.Exception
Returns string representing the XPDL definition Id of process instance that has the given Id.

Parameters:
procId - Id of process instance.
Returns:
XPDL process definition Id for the given process instance.
Throws:
java.lang.Exception - If something unexpected happens.

getProcessDefinitionInfoByUniqueProcessDefinitionName

public WMEntity getProcessDefinitionInfoByUniqueProcessDefinitionName(WMSessionHandle shandle,
                                                                      java.lang.String procDefUniqueName)
                                                               throws java.lang.Exception
Returns string representing the XPDL definition Id of process instance that has the given Id.

Parameters:
shandle -
Returns:
XPDL process definition Id for the given process instance.
Throws:
java.lang.Exception - If something unexpected happens.

getVariableDefinitionInfo

public WMEntity getVariableDefinitionInfo(WMSessionHandle shandle,
                                          java.lang.String procId,
                                          java.lang.String variableId)
                                   throws java.lang.Exception
Returns string representing the XPDL definition Id of process instance that has the given Id.

Parameters:
shandle -
procId - Id of process instance.
Returns:
XPDL process definition Id for the given process instance.
Throws:
java.lang.Exception - If something unexpected happens.

getVariableDefinitionInfoByUniqueProcessDefinitionName

public WMEntity getVariableDefinitionInfoByUniqueProcessDefinitionName(WMSessionHandle shandle,
                                                                       java.lang.String procDefUniqueName,
                                                                       java.lang.String variableId)
                                                                throws java.lang.Exception
Returns string representing the XPDL definition Id of process instance that has the given Id.

Parameters:
shandle -
Returns:
XPDL process definition Id for the given process instance.
Throws:
java.lang.Exception - If something unexpected happens.

getVariableJavaClassName

public java.lang.String getVariableJavaClassName(WMSessionHandle shandle,
                                                 java.lang.String procId,
                                                 java.lang.String variableId)
                                          throws java.lang.Exception
Returns string representing the class name of the instance of variable that can be determined by the given parameters. If there is no such variable, Exception will be thrown.

Parameters:
procId - Id of process instance.
variableId - Id of XPDL variable definition.
Returns:
Java class name of variable instance.
Throws:
java.lang.Exception - If something unexpected happens.

getVariableJavaClassNameByUniqueProcessDefinitionName

public java.lang.String getVariableJavaClassNameByUniqueProcessDefinitionName(WMSessionHandle shandle,
                                                                              java.lang.String procDefUniqueName,
                                                                              java.lang.String variableId)
                                                                       throws java.lang.Exception
Returns string representing the class name of the instance of variable that can be determined by the given parameters. If there is no such variable, Exception will be thrown.

Parameters:
shandle -
variableId - Id of XPDL variable definition.
Returns:
Java class name of variable instance.
Throws:
java.lang.Exception - If something unexpected happens.

getProcessRequesterUsername

public java.lang.String getProcessRequesterUsername(WMSessionHandle shandle,
                                                    java.lang.String procId)
                                             throws java.lang.Exception
Returns the name of the resource that requested (created) the proces. If the process was requested by subflow activity, it returns the name of the resource that created the process that this activity is belonging to, and if this process is also created by another activity, it searches for the one created by resource.

Parameters:
procId - The id of the process instance.
Returns:
String representing resource name which is unique in the system.
Throws:
java.lang.Exception - If something unexpected happens.

getActivityResourceUsername

public java.lang.String getActivityResourceUsername(WMSessionHandle shandle,
                                                    java.lang.String procId,
                                                    java.lang.String actId)
                                             throws java.lang.Exception
Returns the name of the resource that accepted/completed activity. If there is no such (i.e. activity is still not accepted by any resource, or this is an "automatic" activity executed by shark itself), it returns null.

Parameters:
procId - activity's process Id.
actId - Id of activity instance for which we search for the resource's username
Returns:
String representing resource name which is unique in the system.
Throws:
java.lang.Exception - If something unexpected happens.

getBlockActivityId

public java.lang.String getBlockActivityId(WMSessionHandle shandle,
                                           java.lang.String procId,
                                           java.lang.String actId)
                                    throws java.lang.Exception
Returns string representing the Id of block activity instance of activity instance that has the given Id.

Parameters:
procId - activity's process Id.
actId - Id of activity instance that we search block activity instance Id for.
Returns:
block activity instance Id if there is one for the given activity instance, or null if given activity does not belong to the block.
Throws:
java.lang.Exception - If something unexpected happens.

getAssignmentActivityId

public java.lang.String getAssignmentActivityId(WMSessionHandle shandle,
                                                java.lang.String procId,
                                                java.lang.String assId)
                                         throws java.lang.Exception
Returns string representing the activity Id of activity instance that relates to the assignment determined by given parameters.

Parameters:
procId - assignment's process Id.
assId - Id of assignment instance.
Returns:
activity instance Id for the given assignment.
Throws:
java.lang.Exception - If something unexpected happens.

getAssignmentResourceUsername

public java.lang.String getAssignmentResourceUsername(WMSessionHandle shandle,
                                                      java.lang.String procId,
                                                      java.lang.String assId)
                                               throws java.lang.Exception
Returns string representing username of resource instance that relates to assignment determined by given parameters.

Parameters:
procId - assignment's process Id.
assId - Id of assignment instance.
Returns:
resource username for the given assignment.
Throws:
java.lang.Exception - If something unexpected happens.

getProcessCreatedTime

public long getProcessCreatedTime(WMSessionHandle shandle,
                                  java.lang.String procId)
                           throws java.lang.Exception
/** Returns the time when process is created in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.

Parameters:
procId - Id of process instance
Throws:
java.lang.Exception - If process does not exist, it is locked too long or if something unexpected happens.

getProcessStartedTime

public long getProcessStartedTime(WMSessionHandle shandle,
                                  java.lang.String procId)
                           throws java.lang.Exception
Returns the time when process is started in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT. If process is not started returns Long.MAX_VALUE/2.

Parameters:
procId - Id of process instance
Throws:
java.lang.Exception - If process does not exist, it is locked too long or if something unexpected happens.

getProcessFinishTime

public long getProcessFinishTime(WMSessionHandle shandle,
                                 java.lang.String procId)
                          throws java.lang.Exception
Returns the time when process is finished in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT. If process is not finished returns Long.MAX_VALUE/2.

Parameters:
procId - Id of process instance
Throws:
java.lang.Exception - If process does not exist, it is locked too long or if something unexpected happens.

getActivityCreatedTime

public long getActivityCreatedTime(WMSessionHandle shandle,
                                   java.lang.String procId,
                                   java.lang.String actId)
                            throws java.lang.Exception
Returns the time when activity is created in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.

Parameters:
procId - Id of process instance
Throws:
java.lang.Exception - If activity does not exist, its process is locked too long or if something unexpected happens.

getActivityStartedTime

public long getActivityStartedTime(WMSessionHandle shandle,
                                   java.lang.String procId,
                                   java.lang.String actId)
                            throws java.lang.Exception
Returns the time when activity is last time accepted in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT. If activity is not accepted (it is not in open.running state) returns Long.MAX_VALUE/2.

Parameters:
procId - Id of process instance
Throws:
java.lang.Exception - If activity does not exist, its process is locked too long or if something unexpected happens.

getActivityFinishTime

public long getActivityFinishTime(WMSessionHandle shandle,
                                  java.lang.String procId,
                                  java.lang.String actId)
                           throws java.lang.Exception
Returns the time when activity is finished in number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT. If activity is not finished returns Long.MAX_VALUE/2.

Parameters:
procId - Id of process instance
Throws:
java.lang.Exception - If activity does not exist, its process is locked too long or if something unexpected happens.

getAllUsers

public java.lang.String[] getAllUsers(WMSessionHandle shandle)
                               throws java.lang.Exception
Returns a list of all shark usernames.

Parameters:
shandle -
Returns:
the list of all users represented as WfResources in Shark
Throws:
java.lang.Exception

getProcessDefinitionInputSignature

public java.lang.String[][] getProcessDefinitionInputSignature(WMSessionHandle shandle,
                                                               WMEntity procDef)
                                                        throws java.lang.Exception
Returns input signature for the XPDL process definition defined by package Id, package version and definition Id. The input signature is meta information that defines how to set the context of of a process instance.

The entry identifies the name and the data type (represented by its string name) of the data item. Map contains an entry for only those variables which are in XPDL represented as FormalParameters with IN or INOUT type.

Throws:
java.lang.Exception

getProcessCacheSize

public int getProcessCacheSize(WMSessionHandle sessionHandle)
                        throws java.lang.Exception
Returns process cache size.

Throws:
java.lang.Exception

howManyCachedProcesses

public int howManyCachedProcesses(WMSessionHandle sessionHandle)
                           throws java.lang.Exception
Returns the number of currently cached process objects.

Throws:
java.lang.Exception

getResourceCacheSize

public int getResourceCacheSize(WMSessionHandle sessionHandle)
                         throws java.lang.Exception
Returns resource cache size.

Throws:
java.lang.Exception

howManyCachedResources

public int howManyCachedResources(WMSessionHandle sessionHandle)
                           throws java.lang.Exception
Returns the number of currently cached resource objects.

Throws:
java.lang.Exception

getDeadlineInfoForProcess

public DeadlineInfo[] getDeadlineInfoForProcess(WMSessionHandle session,
                                                java.lang.String procId)
                                         throws java.lang.Exception
Returns information on all deadlines of a given process's active activities.

Parameters:
procId - Id of process instance
Throws:
java.lang.Exception

getDeadlineInfoForActivity

public DeadlineInfo[] getDeadlineInfoForActivity(WMSessionHandle session,
                                                 java.lang.String procId,
                                                 java.lang.String actId)
                                          throws java.lang.Exception
Returns information on all deadlines of a given activity.

Parameters:
procId - Id of process instance
actId - Id of activity instance
Throws:
java.lang.Exception

getToolAgentsInfo

public java.lang.String[][] getToolAgentsInfo(WMSessionHandle shandle)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

listProcessAuditEntries

public WMAAuditEntryIterator listProcessAuditEntries(WMSessionHandle shandle,
                                                     java.lang.String procId)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

listActivityAuditEntries

public WMAAuditEntryIterator listActivityAuditEntries(WMSessionHandle shandle,
                                                      java.lang.String procId,
                                                      java.lang.String actId)
                                               throws java.lang.Exception
Throws:
java.lang.Exception