com.groiss.wf
Interface WfEngine

All Superinterfaces:
java.rmi.Remote

public interface WfEngine
extends java.rmi.Remote

This interface encapsulates the functionality of the @enterprise workflow engine. An object implementing this interface can be created on the server or the client. Most methods use the user, which is taken from the thread context when the object is created.


Field Summary
static short INVISIBLE
           
static short MUST
           
static short NO_ADDDEL
           
static short READ_ONLY
           
static short READ_WRITE
           
static short TEXT
           
 
Method Summary
 void abort(ProcessInstance process)
          Abort a process.
 void abort(ProcessInstance process, java.lang.String comment)
          Abort a process and add a DMSNote with a generated Subject and a given comment.
 void addAgent(ActivityInstance ai, Agent a, OrgUnit ou, DMSNote note)
          Add an agent which receives the process after the current agent
 void addParforInstances(java.lang.String stepid, ActivityInstance ai)
          Start additional parfor branches for the given step.
 void archive(ProcessInstance process)
          Archive a process.
 ActivityInstance changeAgent(ActivityInstance ai, Agent a, OrgUnit ou, java.lang.String comment)
          Give the activity instance to another agent.
 ActivityInstance copyTo(ActivityInstance ai, User u)
          Send a copy to another user.
 ProcessInstance createProcessInstance(ProcessDefinition p, User u, OrgUnit d, java.util.Date duedate, java.lang.String id)
          Create a process instance.
 ProcessInstance createProcessInstance(ProcessDefinition p, User u, OrgUnit d, java.util.Date duedate, java.lang.String id, DMSForm f)
          Create a process instance.
 void finish(ActivityInstance ai)
          Finsh an activity, the engine starts the next step.
 void finishChoice(ActivityInstance ai)
          Finishs a choice branch, abort the other branches.
 java.util.Vector getActiveTasks(ProcessInstance process)
          Get the list of active activities of a process instance.
 java.util.Vector getActiveTasks(ProcessInstance process, User u)
          Get the list of active activities of a process instance assigned to a user.
 java.util.Vector getActivities(java.lang.String condition)
          Find the activity instances with a given condition.
 ActivityInstance getActivityInstance(long oid)
          Find a activity instance from the given oid.
 java.util.Vector getActivityInstances(ProcessInstance process)
          Get the list activity instances of a process instance.
 java.util.List getChoiceSteps(ActivityInstance ai)
          Use this method to get the possible choice branches when the process execution reaches a choice.
 ActivityInstance getContext()
          Return the current activity instance.
 java.util.Vector getDocuments(ProcessInstance process)
          Get the list of DMS objects (e.g. documents, folders) attached to a process.
 java.util.Map getFieldModes(ActivityInstance ai, DMSForm f)
          Get the notes to a process instances
 DMSForm getForm(ProcessInstance pi, java.lang.String name)
          Get a form of a process.
 java.util.Vector getForms(ProcessInstance process)
          Get the forms of a process.
 ProcessInstance getMainProcess(ActivityInstance ai)
          Get the root of the activity instance tree
 java.util.Vector getNotes(ProcessInstance process)
          Get the notes to a process instances
 ProcessInstance getParent(ActivityInstance ai)
          Get the process instance of the given activity instance.
 ProcessInstance getProcess(DMSForm f)
          Find the process instance where the given form is attached.
 ProcessInstance getProcess(long oid)
          Find a process instance from the given oid.
 ProcessInstance getProcess(java.lang.String id)
          Find a process instance from the given id.
 ProcessDefinition getProcessDefinition(java.lang.String id)
          Find a process definition with the given id and status=active, if more than one is found, the process definition with the highest version number is returned.
 ProcessDefinition getProcessDefinition(java.lang.String id, int version)
          Find a process definition with the given id and version.
 java.util.Vector getProcesses(java.lang.String condition)
          Find the process instances with a given condition.
 ProcessInstance getProcessFromForm(long formoid)
          Find a process instance from the oid of a form.
 java.util.Vector getRoleSuspensionList(Application a)
          Get the role suspension list of the current user.
 java.util.Vector getRoleWorklist(Application a)
          Get the role worklist of the current user.
 java.lang.String getServerProperty(java.lang.String prop)
          Returns a property from the server
 java.util.Vector getStartableProcesses(Application appl)
          List the process definitions of the given application, which are startable for the user.
 Store getStore()
          Return the underlying store.
 java.util.Vector getSuspensionList(Application a)
          Get the personal suspension list of the current user.
 Task getTask(java.lang.String id)
          Find a task with the given id and status=active, if more than one is found, the task with the highest version number is returned.
 Task getTask(java.lang.String id, int version)
          Find a task with the given id and version.
 java.util.Vector getWorklist(Application a, boolean withRepr)
          Get the worklist of the current user.
 ActivityInstance goBack(ActivityInstance ai, ActivityInstance ai2, java.lang.String comment)
          Go back to a previous step.
 void goBackToLastInteractive(ActivityInstance ai, java.lang.String comment)
           
 void gotoTask(ActivityInstance ai, java.lang.String stepname, Agent ag, OrgUnit ou, java.lang.String comment)
          Goto another task.
 void gotoTask(ProcessInstance process, java.lang.String taskid, Agent ag, java.lang.String comment)
          Deprecated. the methodbehaves unpredictabe when more than one activity instance of the process is active and when the task appears more than once in the process definition.
 boolean hasDocuments(ProcessInstance process)
          Has the process documents attached?
 boolean hasNotes(ProcessInstance process)
          Has the process notes attached?
 java.util.List listPredecessors(ActivityInstance ai)
          Return the list of predecessor steps of an activity instance.
 java.util.List listPreviousSteps(ActivityInstance ai)
          List the previous steps of the process (possible go bakc targets).
 java.util.Vector listProcessDefinitions(Application appl)
          List the process definitions of the given application
 java.util.List listSuccessors(ActivityInstance ai)
          Return the list of successor steps of an activity instance.
 ActivityInstance makeBranch(ProcessInstance process, Task t, Agent a, OrgUnit d)
          Insert a new step - subprocess or task - to the running process.
 void makeBranch(ProcessInstance process, Task t, Agent a, OrgUnit d, java.util.Vector forms)
          Deprecated. use method without form argument
 ActivityInstance makeVersion(ActivityInstance ai, java.lang.String desc, boolean withDocs)
          Versions the passed activity instance, the process forms and the documents (optional) and returns a new activity instance which is a copy of the passed one.
 void reactivate(ProcessInstance process)
          Reactivate a process.
 void reactivate(ProcessInstance process, java.lang.String comment)
          Reactivate a process.
 void refreshWLCache(User u)
          Refresh the organizational data in the WorklistCache for a particular user.
 void refreshWLCacheOrgData()
          Refresh the organizational data in the worklist cache.
 void seeAgain(ActivityInstance ai)
          Move the activity instance from the suspension list to the worklist.
 void seeLater(ActivityInstance ai, java.util.Date d)
          Move the activity instance from the worklist to the suspension list.
 void seeLater(ActivityInstance ai, java.util.Date d, java.lang.String description)
          Move the activity instance from the worklist to the suspension list.
 void setAgent(ActivityInstance ai, Agent a)
          Give the activity instance to another agent.
 void setCheckedOut(ActivityInstance ai, boolean state)
          Set the activityInstance as checcked out or in (i.e. is on mobile server)
 void setContext(ActivityInstance ai)
           
 void setDescription(ActivityInstance ai, java.lang.String descr)
          Set the description of an activity instance.
 void setDuedate(ActivityInstance ai, java.util.Date d)
          Set the duedate of the activity instance.
 void setId(ProcessInstance pi, java.lang.String s)
          Set the id of the process instance.
 void setOrgUnit(ActivityInstance ai, OrgUnit d)
          Change the organizational unit of a process.
 void setPriority(ProcessInstance pi, int priority)
          Set the priority of the process instance.
 void setStepAgent(ActivityInstance ai, Agent a)
          Set the step-agent of the activity instance to another agent.
 void setSubject(ProcessInstance process)
          Set the subject of the process instance according to the definition in the process definition.
 void setSubjectToString(ProcessInstance process, java.lang.String str)
          Set the subject of the process instance o the given string value.
 void setUser(User u)
          Set the user.
 void start(ProcessInstance pi)
          Start a process instance, which was previously created, but not started.
 ProcessInstance startProcess(ProcessDefinition p, User u, OrgUnit d, java.util.Date duedate, java.lang.String id)
          Start a process.
 ProcessInstance startProcess(ProcessDefinition p, User u, OrgUnit d, java.util.Date duedate, java.lang.String id, DMSForm f)
          Start a process.
 ActivityInstance take(ActivityInstance ai)
          Take an activity: move it from the role-worklist to the worklist.
 ActivityInstance untake(ActivityInstance ai)
          Put back an activity: move it from the worklist to the role-worklist.
 void updateForm(DMSForm f)
          Update the form (make the changes persistent).
 

Field Detail

INVISIBLE

static final short INVISIBLE
See Also:
Constant Field Values

READ_ONLY

static final short READ_ONLY
See Also:
Constant Field Values

READ_WRITE

static final short READ_WRITE
See Also:
Constant Field Values

TEXT

static final short TEXT
See Also:
Constant Field Values

MUST

static final short MUST
See Also:
Constant Field Values

NO_ADDDEL

static final short NO_ADDDEL
See Also:
Constant Field Values
Method Detail

setUser

void setUser(User u)
             throws WfException,
                    java.rmi.RemoteException
Set the user.

Parameters:
u - a user
Throws:
WfException
java.rmi.RemoteException

getStore

Store getStore()
               throws java.rmi.RemoteException
Return the underlying store.

Returns:
a store object
Throws:
java.rmi.RemoteException

getProcessDefinition

ProcessDefinition getProcessDefinition(java.lang.String id)
                                       throws WfException,
                                              java.rmi.RemoteException
Find a process definition with the given id and status=active, if more than one is found, the process definition with the highest version number is returned.

Parameters:
id - the id of the process
Returns:
a process definition
Throws:
WfException
java.rmi.RemoteException

getProcessDefinition

ProcessDefinition getProcessDefinition(java.lang.String id,
                                       int version)
                                       throws WfException,
                                              java.rmi.RemoteException
Find a process definition with the given id and version.

Parameters:
id - the id of the process
version - the version of the process
Returns:
a process definition
Throws:
WfException
java.rmi.RemoteException

listProcessDefinitions

java.util.Vector listProcessDefinitions(Application appl)
                                        throws WfException,
                                               java.rmi.RemoteException
List the process definitions of the given application

Parameters:
appl - the application
Returns:
a vector of ProcessDefinition objects
Throws:
WfException
java.rmi.RemoteException

getStartableProcesses

java.util.Vector getStartableProcesses(Application appl)
                                       throws WfException,
                                              java.rmi.RemoteException
List the process definitions of the given application, which are startable for the user. A process is startable, if it is active and the agent of the first step is either the user or a role the user has.

Returns:
the list of pairs of processes and vectors of OrgUnits
Throws:
WfException
java.rmi.RemoteException

getTask

Task getTask(java.lang.String id)
             throws WfException,
                    java.rmi.RemoteException
Find a task with the given id and status=active, if more than one is found, the task with the highest version number is returned.

Parameters:
id - the id of the task
Returns:
a task, null if no task has the given id
Throws:
WfException
java.rmi.RemoteException

getTask

Task getTask(java.lang.String id,
             int version)
             throws WfException,
                    java.rmi.RemoteException
Find a task with the given id and version.

Parameters:
id - the id of the task
version - the version of the task
Returns:
a task
Throws:
WfException
java.rmi.RemoteException

startProcess

ProcessInstance startProcess(ProcessDefinition p,
                             User u,
                             OrgUnit d,
                             java.util.Date duedate,
                             java.lang.String id)
                             throws java.lang.Exception,
                                    java.rmi.RemoteException
Start a process. ProcessDefinition and OrgUnit must not be null.

Parameters:
p - the process definition
u - the user
d - the org. unit
duedate - the duedate
id - the id of the process instance
Returns:
the process instance
Throws:
java.lang.Exception
java.rmi.RemoteException

startProcess

ProcessInstance startProcess(ProcessDefinition p,
                             User u,
                             OrgUnit d,
                             java.util.Date duedate,
                             java.lang.String id,
                             DMSForm f)
                             throws java.lang.Exception,
                                    java.rmi.RemoteException
Start a process. ProcessDefinition and OrgUnit must not be null. The form must be already in the database.

Parameters:
p - the process definition
u - the user
d - the org. unit
duedate - the duedate
id - the id of the process instance
f - a form
Returns:
the process instance
Throws:
java.lang.Exception
java.rmi.RemoteException

createProcessInstance

ProcessInstance createProcessInstance(ProcessDefinition p,
                                      User u,
                                      OrgUnit d,
                                      java.util.Date duedate,
                                      java.lang.String id)
                                      throws java.lang.Exception,
                                             java.rmi.RemoteException
Create a process instance. ProcessDefinition and OrgUnit must not be null. The process instance waits at the begin step until this activityinstance will be finished explicitely, or until start(pi) is called.

Parameters:
p - the process definition
u - the user
d - the org. unit
duedate - the duedate
id - the id of the process instance
Returns:
the process instance
Throws:
java.lang.Exception
java.rmi.RemoteException

createProcessInstance

ProcessInstance createProcessInstance(ProcessDefinition p,
                                      User u,
                                      OrgUnit d,
                                      java.util.Date duedate,
                                      java.lang.String id,
                                      DMSForm f)
                                      throws java.lang.Exception,
                                             java.rmi.RemoteException
Create a process instance. ProcessDefinition and OrgUnit must not be null. The process instance waits at the begin step until this activityinstance will be finished explicitely, or until start(pi) is called.

Parameters:
p - the process definition
u - the user
d - the org. unit
duedate - the duedate
id - the id of the process instance
f - a form
Returns:
the process instance
Throws:
java.lang.Exception
java.rmi.RemoteException

start

void start(ProcessInstance pi)
           throws java.lang.Exception,
                  java.rmi.RemoteException
Start a process instance, which was previously created, but not started.

Parameters:
pi - the process instance to start
Throws:
java.lang.Exception
java.rmi.RemoteException

getWorklist

java.util.Vector getWorklist(Application a,
                             boolean withRepr)
                             throws WfException,
                                    java.rmi.RemoteException
Get the worklist of the current user.

Parameters:
a - the application, if null return work items for all applications
withRepr - if true add the work items assigned to persons the user substitutes.
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getRoleWorklist

java.util.Vector getRoleWorklist(Application a)
                                 throws WfException,
                                        java.rmi.RemoteException
Get the role worklist of the current user.

Parameters:
a - the application, if null return work items for all applications
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getSuspensionList

java.util.Vector getSuspensionList(Application a)
                                   throws WfException,
                                          java.rmi.RemoteException
Get the personal suspension list of the current user.

Parameters:
a - the application, if null return work items for all applications
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getRoleSuspensionList

java.util.Vector getRoleSuspensionList(Application a)
                                       throws WfException,
                                              java.rmi.RemoteException
Get the role suspension list of the current user.

Parameters:
a - the application, if null return work items for all applications
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getProcess

ProcessInstance getProcess(java.lang.String id)
                           throws WfException,
                                  java.rmi.RemoteException
Find a process instance from the given id.

Parameters:
id - the process instance id
Returns:
the process instance
Throws:
WfException
java.rmi.RemoteException

getProcess

ProcessInstance getProcess(long oid)
                           throws WfException,
                                  java.rmi.RemoteException
Find a process instance from the given oid.

Parameters:
oid - the process instance oid
Returns:
the process instance
Throws:
WfException
java.rmi.RemoteException

getProcessFromForm

ProcessInstance getProcessFromForm(long formoid)
                                   throws WfException,
                                          java.rmi.RemoteException
Find a process instance from the oid of a form.

Parameters:
formoid - the oid of a process form
Returns:
the process instance
Throws:
WfException
java.rmi.RemoteException

getActivityInstance

ActivityInstance getActivityInstance(long oid)
                                     throws WfException,
                                            java.rmi.RemoteException
Find a activity instance from the given oid.

Parameters:
oid - the activity instance oid
Returns:
the process instance
Throws:
WfException
java.rmi.RemoteException

getProcess

ProcessInstance getProcess(DMSForm f)
                           throws WfException,
                                  java.rmi.RemoteException
Find the process instance where the given form is attached. The method returns a process if and only if the form is a process form. It returns null for subforms.

Parameters:
f - the form
Returns:
the process instance
Throws:
WfException
java.rmi.RemoteException

getProcesses

java.util.Vector getProcesses(java.lang.String condition)
                              throws WfException,
                                     java.rmi.RemoteException
Find the process instances with a given condition.

Parameters:
condition - a SQL where clause
Returns:
a vector of process instances
Throws:
WfException
java.rmi.RemoteException

getActivities

java.util.Vector getActivities(java.lang.String condition)
                               throws WfException,
                                      java.rmi.RemoteException
Find the activity instances with a given condition.

Parameters:
condition - a SQL where clause
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getActiveTasks

java.util.Vector getActiveTasks(ProcessInstance process)
                                throws WfException,
                                       java.rmi.RemoteException
Get the list of active activities of a process instance.

Parameters:
process - the process instance
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getActiveTasks

java.util.Vector getActiveTasks(ProcessInstance process,
                                User u)
                                throws WfException,
                                       java.rmi.RemoteException
Get the list of active activities of a process instance assigned to a user.

Parameters:
u - the user
process - the process instance
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getActivityInstances

java.util.Vector getActivityInstances(ProcessInstance process)
                                      throws WfException,
                                             java.rmi.RemoteException
Get the list activity instances of a process instance.

Parameters:
process - the process instance
Returns:
a vector of activity instances
Throws:
WfException
java.rmi.RemoteException

getDocuments

java.util.Vector getDocuments(ProcessInstance process)
                              throws WfException,
                                     java.rmi.RemoteException
Get the list of DMS objects (e.g. documents, folders) attached to a process.

Parameters:
process - the process instance
Returns:
a vector of DMSObject
Throws:
WfException
java.rmi.RemoteException

getForm

DMSForm getForm(ProcessInstance pi,
                java.lang.String name)
                throws WfException,
                       java.rmi.RemoteException
Get a form of a process.

Parameters:
pi - the process instance
Returns:
the form
Throws:
WfException
java.rmi.RemoteException

getForms

java.util.Vector getForms(ProcessInstance process)
                          throws WfException,
                                 java.rmi.RemoteException
Get the forms of a process.

Parameters:
process - the process instance
Returns:
the forms (DMSForm objects)
Throws:
WfException
java.rmi.RemoteException

getMainProcess

ProcessInstance getMainProcess(ActivityInstance ai)
                               throws WfException,
                                      java.rmi.RemoteException
Get the root of the activity instance tree

Parameters:
ai - an activity instance
Returns:
the process instance of the main process of the given activity instance.
Throws:
WfException
java.rmi.RemoteException

getParent

ProcessInstance getParent(ActivityInstance ai)
                          throws WfException,
                                 java.rmi.RemoteException
Get the process instance of the given activity instance.

Parameters:
ai - an activity instance
Returns:
the process instance
Throws:
WfException
java.rmi.RemoteException

getNotes

java.util.Vector getNotes(ProcessInstance process)
                          throws WfException,
                                 java.rmi.RemoteException
Get the notes to a process instances

Parameters:
process - a process instance
Returns:
a vector of notes (DMSNote objects)
Throws:
WfException
java.rmi.RemoteException

hasDocuments

boolean hasDocuments(ProcessInstance process)
                     throws WfException,
                            java.rmi.RemoteException
Has the process documents attached?

Parameters:
process - a process instance
Returns:
true if documents are present
Throws:
WfException
java.rmi.RemoteException

hasNotes

boolean hasNotes(ProcessInstance process)
                 throws WfException,
                        java.rmi.RemoteException
Has the process notes attached?

Parameters:
process - a process instance
Returns:
true if notes are present
Throws:
WfException
java.rmi.RemoteException

getFieldModes

java.util.Map getFieldModes(ActivityInstance ai,
                            DMSForm f)
                            throws WfException,
                                   java.rmi.RemoteException
Get the notes to a process instances

Parameters:
ai - an activity instance
f - the form
Returns:
A map where the keys are the attribute names, the values are INVISIBLE, READ_ONLY, and READ_WRITE as short objects
Throws:
WfException
java.rmi.RemoteException

take

ActivityInstance take(ActivityInstance ai)
                      throws java.lang.Exception,
                             java.rmi.RemoteException
Take an activity: move it from the role-worklist to the worklist.

Parameters:
ai - an activity instance
Returns:
the activity instance now active, this may be the same as as the parameter but can alos be another object
Throws:
java.lang.Exception
java.rmi.RemoteException

finish

void finish(ActivityInstance ai)
            throws java.lang.Exception,
                   java.rmi.RemoteException
Finsh an activity, the engine starts the next step.

Parameters:
ai - an activity instance
Throws:
java.lang.Exception
java.rmi.RemoteException

getChoiceSteps

java.util.List getChoiceSteps(ActivityInstance ai)
                              throws WfException,
                                     java.rmi.RemoteException
Use this method to get the possible choice branches when the process execution reaches a choice. The method returns a list of lists, each inner list contains the choice branches belonging to one choice.

Parameters:
ai -
Returns:
a list of lists of ActivityInstances
Throws:
WfException
java.rmi.RemoteException

finishChoice

void finishChoice(ActivityInstance ai)
                  throws java.lang.Exception,
                         java.rmi.RemoteException
Finishs a choice branch, abort the other branches.

Parameters:
ai - the choice step on the branch you want to follows
Throws:
java.lang.Exception
java.rmi.RemoteException

listPreviousSteps

java.util.List listPreviousSteps(ActivityInstance ai)
                                 throws java.lang.Exception
List the previous steps of the process (possible go bakc targets).

Parameters:
ai - current activity instance
Returns:
a list of activity instances
Throws:
java.lang.Exception

goBack

ActivityInstance goBack(ActivityInstance ai,
                        ActivityInstance ai2,
                        java.lang.String comment)
                        throws java.lang.Exception,
                               java.rmi.RemoteException
Go back to a previous step. A clone of the given previous activity instance of this process instance is created, the comment is added to the new activity.

Parameters:
ai - an activity instance
ai2 - a finished activity instance
comment - a comment
Returns:
the activity instance now active
Throws:
java.lang.Exception
java.rmi.RemoteException

untake

ActivityInstance untake(ActivityInstance ai)
                        throws java.lang.Exception,
                               java.rmi.RemoteException
Put back an activity: move it from the worklist to the role-worklist.

Parameters:
ai - an activity instance
Returns:
the activity instance now active
Throws:
java.lang.Exception
java.rmi.RemoteException

seeLater

void seeLater(ActivityInstance ai,
              java.util.Date d)
              throws java.lang.Exception,
                     java.rmi.RemoteException
Move the activity instance from the worklist to the suspension list.

Parameters:
ai - an activity instance
d - the date, when the item should reappear in the worklist
Throws:
java.lang.Exception
java.rmi.RemoteException

seeLater

void seeLater(ActivityInstance ai,
              java.util.Date d,
              java.lang.String description)
              throws java.lang.Exception,
                     java.rmi.RemoteException
Move the activity instance from the worklist to the suspension list.

Parameters:
ai - an activity instance
d - the date, when the item should reappear in the worklist
description - an optional comment
Throws:
java.lang.Exception
java.rmi.RemoteException

seeAgain

void seeAgain(ActivityInstance ai)
              throws java.lang.Exception,
                     java.rmi.RemoteException
Move the activity instance from the suspension list to the worklist.

Parameters:
ai - an activity instance
Throws:
java.lang.Exception
java.rmi.RemoteException

setAgent

void setAgent(ActivityInstance ai,
              Agent a)
              throws WfException,
                     java.rmi.RemoteException
Give the activity instance to another agent.

Parameters:
ai - an activity instance
a - an agent (user or role)
Throws:
WfException
java.rmi.RemoteException

changeAgent

ActivityInstance changeAgent(ActivityInstance ai,
                             Agent a,
                             OrgUnit ou,
                             java.lang.String comment)
                             throws WfException,
                                    java.rmi.RemoteException
Give the activity instance to another agent. Change is visible in process history

Parameters:
ai - an activity instance
a - an agent (user or role)
ou - an org-unit, may be null
comment - optional comment to the next agent
Throws:
WfException
java.rmi.RemoteException

setStepAgent

void setStepAgent(ActivityInstance ai,
                  Agent a)
                  throws WfException,
                         java.rmi.RemoteException
Set the step-agent of the activity instance to another agent. This is the agent where a untake of the activity instance

Parameters:
ai - an activity instance
a - an agent (user or role)
Throws:
WfException
java.rmi.RemoteException

gotoTask

void gotoTask(ProcessInstance process,
              java.lang.String taskid,
              Agent ag,
              java.lang.String comment)
              throws java.lang.Exception,
                     java.rmi.RemoteException
Deprecated. the methodbehaves unpredictabe when more than one activity instance of the process is active and when the task appears more than once in the process definition.

Goto another task. The process flow leaves the defined route and jumps to the given task. The id of the task, an agent and a comment is given.

Parameters:
process - an processinstance instance
taskid - id of a task
ag - an agent (user or role)
comment - a comment string
Throws:
java.lang.Exception
java.rmi.RemoteException

gotoTask

void gotoTask(ActivityInstance ai,
              java.lang.String stepname,
              Agent ag,
              OrgUnit ou,
              java.lang.String comment)
              throws java.lang.Exception,
                     java.rmi.RemoteException
Goto another task. The process flow leaves the defined route and jumps to the given task.

Parameters:
ai - an activity instance
stepname - the name of a step to jump to, set the name in the process definition (editor or WDL).
ag - an agent (user or role), may be null
ou - the org.unit (may be null)
comment - a comment string
Throws:
java.lang.Exception
java.rmi.RemoteException

copyTo

ActivityInstance copyTo(ActivityInstance ai,
                        User u)
                        throws java.lang.Exception,
                               java.rmi.RemoteException
Send a copy to another user.

Parameters:
ai - an activity instance
u - a user
Returns:
the copy activity instance
Throws:
java.lang.Exception
java.rmi.RemoteException

makeBranch

void makeBranch(ProcessInstance process,
                Task t,
                Agent a,
                OrgUnit d,
                java.util.Vector forms)
                throws java.lang.Exception,
                       java.rmi.RemoteException
Deprecated. use method without form argument

Insert a new step - subprocess or task - to the running process. The step is added as a branch and can be completed independent of the process.

Throws:
java.lang.Exception
java.rmi.RemoteException

makeBranch

ActivityInstance makeBranch(ProcessInstance process,
                            Task t,
                            Agent a,
                            OrgUnit d)
                            throws java.lang.Exception,
                                   java.rmi.RemoteException
Insert a new step - subprocess or task - to the running process. The step is added as a branch and can be completed independent of the process.

Parameters:
process - instance of the process
t - a task assigned to the process
a - a user or role
d - an optional department
Throws:
java.lang.Exception
java.rmi.RemoteException

addParforInstances

void addParforInstances(java.lang.String stepid,
                        ActivityInstance ai)
                        throws java.lang.Exception
Start additional parfor branches for the given step. Branches are only started if there are already running branches.

Parameters:
stepid - the id of the parfor step
ai - an activity instance of the same process instance
Throws:
java.lang.Exception

setOrgUnit

void setOrgUnit(ActivityInstance ai,
                OrgUnit d)
                throws WfException,
                       java.rmi.RemoteException
Change the organizational unit of a process.

Parameters:
ai - an activity instance
d - the OrgUnit
Throws:
WfException
java.rmi.RemoteException

setDescription

void setDescription(ActivityInstance ai,
                    java.lang.String descr)
                    throws WfException,
                           java.rmi.RemoteException
Set the description of an activity instance.

Parameters:
ai - an activity instance
descr - the new desription
Throws:
WfException
java.rmi.RemoteException

setSubject

void setSubject(ProcessInstance process)
                throws WfException,
                       java.rmi.RemoteException
Set the subject of the process instance according to the definition in the process definition.

Parameters:
process - the process instance
Throws:
WfException
java.rmi.RemoteException

setSubjectToString

void setSubjectToString(ProcessInstance process,
                        java.lang.String str)
                        throws WfException,
                               java.rmi.RemoteException
Set the subject of the process instance o the given string value.

Parameters:
process - the process instance
str - the new subject
Throws:
WfException
java.rmi.RemoteException

updateForm

void updateForm(DMSForm f)
                throws java.lang.Exception,
                       java.rmi.RemoteException
Update the form (make the changes persistent).

Parameters:
f - the form
Throws:
java.lang.Exception
java.rmi.RemoteException

setDuedate

void setDuedate(ActivityInstance ai,
                java.util.Date d)
                throws WfException,
                       java.rmi.RemoteException
Set the duedate of the activity instance.

Parameters:
ai - an activity instance
d - the new due date
Throws:
WfException
java.rmi.RemoteException

setId

void setId(ProcessInstance pi,
           java.lang.String s)
           throws WfException,
                  java.rmi.RemoteException
Set the id of the process instance.

Parameters:
pi - a process instance
s - the new id
Throws:
WfException
java.rmi.RemoteException

setPriority

void setPriority(ProcessInstance pi,
                 int priority)
                 throws WfException,
                        java.rmi.RemoteException
Set the priority of the process instance.

Parameters:
pi - a process instance
priority - the new priority, two digit integer, starting with 0 (means lowest priority).
Throws:
WfException
java.rmi.RemoteException

abort

void abort(ProcessInstance process)
           throws java.lang.Exception,
                  java.rmi.RemoteException
Abort a process.

Parameters:
process - the process instance
Throws:
java.lang.Exception
java.rmi.RemoteException

reactivate

void reactivate(ProcessInstance process)
                throws java.lang.Exception,
                       java.rmi.RemoteException
Reactivate a process.

Parameters:
process - the process instance
Throws:
java.lang.Exception
java.rmi.RemoteException

archive

void archive(ProcessInstance process)
             throws java.lang.Exception,
                    java.rmi.RemoteException
Archive a process. Remove it from the database.

Parameters:
process - the process instance
Throws:
java.lang.Exception
java.rmi.RemoteException

abort

void abort(ProcessInstance process,
           java.lang.String comment)
           throws java.lang.Exception,
                  java.rmi.RemoteException
Abort a process and add a DMSNote with a generated Subject and a given comment.

Parameters:
process - the process instance
comment - a comment, why the process is aborted
Throws:
java.lang.Exception
java.rmi.RemoteException

reactivate

void reactivate(ProcessInstance process,
                java.lang.String comment)
                throws java.lang.Exception,
                       java.rmi.RemoteException
Reactivate a process.

Parameters:
process - the process instance
comment - a comment, why the process is reactivated
Throws:
java.lang.Exception
java.rmi.RemoteException

getContext

ActivityInstance getContext()
                            throws WfException,
                                   java.rmi.RemoteException
Return the current activity instance. This method returns a non-null value when called from a postcondition, preprocessing, compensation method of a task of from a system step or a condition in a process definition.

Returns:
an activity instance
Throws:
WfException
java.rmi.RemoteException

setContext

void setContext(ActivityInstance ai)
                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getServerProperty

java.lang.String getServerProperty(java.lang.String prop)
                                   throws WfException,
                                          java.rmi.RemoteException
Returns a property from the server

Returns:
the property, null if the property is unknown.
Throws:
WfException
java.rmi.RemoteException

listSuccessors

java.util.List listSuccessors(ActivityInstance ai)
                              throws WfException,
                                     java.rmi.RemoteException
Return the list of successor steps of an activity instance.

Returns:
a list of activity instances
Throws:
WfException
java.rmi.RemoteException

listPredecessors

java.util.List listPredecessors(ActivityInstance ai)
                                throws WfException,
                                       java.rmi.RemoteException
Return the list of predecessor steps of an activity instance.

Returns:
a list of activity instances
Throws:
WfException
java.rmi.RemoteException

addAgent

void addAgent(ActivityInstance ai,
              Agent a,
              OrgUnit ou,
              DMSNote note)
              throws WfException,
                     java.rmi.RemoteException
Add an agent which receives the process after the current agent

Parameters:
ai - the activity instance
a - a user or role
ou - an organizational unit, if null the ou of the previous activity instance is used
note - an (optional) note to the agent of the activity
Throws:
WfException
java.rmi.RemoteException

setCheckedOut

void setCheckedOut(ActivityInstance ai,
                   boolean state)
                   throws WfException,
                          java.rmi.RemoteException
Set the activityInstance as checcked out or in (i.e. is on mobile server)

Parameters:
state - if true we check it out
ai - the activity instance
Throws:
WfException
java.rmi.RemoteException

goBackToLastInteractive

void goBackToLastInteractive(ActivityInstance ai,
                             java.lang.String comment)
                             throws java.lang.Exception,
                                    java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

makeVersion

ActivityInstance makeVersion(ActivityInstance ai,
                             java.lang.String desc,
                             boolean withDocs)
                             throws java.lang.Exception,
                                    java.rmi.RemoteException
Versions the passed activity instance, the process forms and the documents (optional) and returns a new activity instance which is a copy of the passed one.

Parameters:
ai - the activity instance to version
desc - a comment for this version
withDocs - if true all the documents are also versioned
Returns:
the new activity instance
Throws:
java.lang.Exception
java.rmi.RemoteException

refreshWLCacheOrgData

void refreshWLCacheOrgData()
                           throws java.lang.Exception,
                                  java.rmi.RemoteException
Refresh the organizational data in the worklist cache.

Throws:
java.lang.Exception
java.rmi.RemoteException

refreshWLCache

void refreshWLCache(User u)
                    throws java.lang.Exception,
                           java.rmi.RemoteException
Refresh the organizational data in the WorklistCache for a particular user.

Parameters:
u - - the user
Throws:
java.lang.Exception
java.rmi.RemoteException


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.