Package com.groiss.wf
Interface ApplicationAdapter
- All Superinterfaces:
HasResource
,Lifecycle
,Service
- All Known Implementing Classes:
DefaultApplicationAdapter
Interface for classes customizing the application behaviour. your implementation will be used for
an application if it is registered in the application administration as application class.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Right
Returns the right which is needed for sending the process to next agent The system checks if the sending user has this right for the agent and org.Return the list of finish rights used in this application.The method is called whenever a new process Id is neededdefault com.groiss.wf.distri.Packer
Return the Packer used for distributing activities of this application.default void
getToolbarActions
(ActivityInstance ai, List<Pair<String, List<Pair<String, ?>>>> actions) Determine the toolbar actions shown in the detail view of an activity instance.Returns the user properties a user can set.Returns the version of the application code.default void
modifyDetailPanes
(KeyedList<String, NavigationTreeNode> nodes, StringBuilder title, ProcessInstance pi, ActivityInstance ai) You can modify the title and tabs in the detail view of the process.void
notifyUser
(User u, ActivityInstance ai) The method is called when an email-notification about a new worklist entry is sent.static ApplicationAdapter
of
(Application appl) get the currentApplicationAdapter
instance for the passedApplication
static ApplicationAdapter
get the currentApplicationAdapter
instance for the passed application-Iddefault void
An activity is aborted (process is aborted, activity cancelled by goBack)default void
onAddDocument
(ProcessInstance pi, DMSFolder f, DMSObject o) Called before a document is added to a process (incl. subfolders) of this application.default void
onAnonymize
(User u, String newId) The method is called when the anonymize function is called for a user.default void
This method is called on installation of an application.default void
This method is called on application uninstall (delete).default void
onChangeAgent
(ActivityInstance oldAi, ActivityInstance newAi) Change agent has been performed for an activity instance.default void
onCopyProcess
(ProcessInstance originPI, ProcessInstance newPI) This method is called when task function "Create process copy" is executed.default void
The method is called when the user cancels the post-finish selection dialog (e.g. select choice-branch, follow-up-user etc.)default List<Pair<ActivityInstance,
List<ActivityInstance>>> Called when "go back" is executed.default void
A process is reactivateddefault void
onRemoveDocument
(ProcessInstance pi, DMSFolder f, DMSObject o) Called when a document is removed from a process (incl. subfolders) of this application.default void
An ActivityInstance is taken out of the suspension list.default void
An ActivityInstance is put into the suspension list.void
default String
upgrade
(Application appl) The method is called when the application server detects that the version of the application in the database is different from the version of the code.Methods inherited from interface com.groiss.org.HasResource
getResource, localizeNames
Methods inherited from interface com.groiss.component.Service
isRunning, reconfigure
-
Method Details
-
setApplication
-
of
get the currentApplicationAdapter
instance for the passed application-Id- Parameters:
applId
- the application-ID- Returns:
-
of
get the currentApplicationAdapter
instance for the passedApplication
- Parameters:
appl
- the application- Returns:
-
getNewProcessId
The method is called whenever a new process Id is needed- Parameters:
pi
- the process instance for which the id should be generated
-
onSeeLater
An ActivityInstance is put into the suspension list.- Parameters:
ai
- an activity instance
-
onSeeAgain
An ActivityInstance is taken out of the suspension list.- Parameters:
ai
- an activity instance
-
onChangeAgent
Change agent has been performed for an activity instance.- Parameters:
oldAi
- the old activity instancenewAi
- the new activity instance
-
onListPreviousSteps
default List<Pair<ActivityInstance,List<ActivityInstance>>> onListPreviousSteps(ActivityInstance ai, List<Pair<ActivityInstance, List<ActivityInstance>>> list) Called when "go back" is executed.- Parameters:
ai
- the activity instance the process is currently inlist
- a list of Pairs. The first element of the pair is a previous activity instance, the second is a list of activities that must be aborted when going back to this step (for example siblings in a parallelism).- Returns:
- the changed (or unchanged) list
-
onAbort
An activity is aborted (process is aborted, activity cancelled by goBack)- Parameters:
pi
- the aborted activity instance, may be a process instance, may be an activity instance
-
onReactivate
A process is reactivated- Parameters:
pi
- the process instance
-
onAddDocument
Called before a document is added to a process (incl. subfolders) of this application.- Parameters:
pi
- the process instancef
- the folder where the object will be addedo
- the object to add
-
onRemoveDocument
Called when a document is removed from a process (incl. subfolders) of this application.- Parameters:
pi
- the process instancef
- the foldero
- the object to remove
-
notifyUser
The method is called when an email-notification about a new worklist entry is sent.- Parameters:
u
- the recipientai
- an activity instance
-
getUserProperties
Returns the user properties a user can set. It is normally read from the application configuration.- Parameters:
u
- The user whose properties should be returned- Returns:
- a list of jdom elements describing the property.
-
getFinishRight
Returns the right which is needed for sending the process to next agent The system checks if the sending user has this right for the agent and org.-unit of the given ai.- Parameters:
ai
- the new ActivityInstance
-
getFinishRights
Return the list of finish rights used in this application.- Returns:
- a List of rights
-
getPacker
default com.groiss.wf.distri.Packer getPacker()Return the Packer used for distributing activities of this application.- Returns:
- a Packer object
-
modifyDetailPanes
default void modifyDetailPanes(KeyedList<String, NavigationTreeNode> nodes, StringBuilder title, ProcessInstance pi, ActivityInstance ai) You can modify the title and tabs in the detail view of the process. This method is called when the details of an item are to be displayed. This is not called every time, but rather for the first time and when the gui supposes that the item has been changed.- Parameters:
nodes
- a list of configured nodes, the keys are the node ids, for example 'history'. For forms the keys are 'form:<fid>' where fid is the id of the form in the process. The nodes are copied from the original ones and therefore mutable. Additional attributes can be set viaNavigationTreeNode.setAttrib(String, Object)
.title
- HTML text can be added to the StringBuilder, for getting the standard appearance, use the following structure:
<span class="scPID"><label>Id:</label> <span class="scValue">..id..</span></span>
<span class="scProcess"><label>Process:</label> <span class="scValue">..process name..</span></span>
<span class="scTask"><label>Task:</label> <span class="scValue">..task name..</span></span>
<span class="scSubject"><label>Subject:</label> <span class="scValue">..the subject..</span></span>ai
- activity instance object, may be null
-
getToolbarActions
default void getToolbarActions(ActivityInstance ai, List<Pair<String, List<Pair<String, ?>>>> actions) Determine the toolbar actions shown in the detail view of an activity instance.- Parameters:
ai
- the activity instanceactions
- the actions configured in the worklist
-
getVersion
String getVersion()Returns the version of the application code. The returning string is compared to the version in the database when the system starts up in restricted mode.- Returns:
- the version string
-
upgrade
The method is called when the application server detects that the version of the application in the database is different from the version of the code.- Throws:
Exception
-
onAnonymize
The method is called when the anonymize function is called for a user. It allows to add some application specific action for removing the user or user name from the database.- Parameters:
u
-newId
- the id after anonymize
-
onFinishNotComplete
The method is called when the user cancels the post-finish selection dialog (e.g. select choice-branch, follow-up-user etc.)- Parameters:
ai
- the last task that needs to be finished
-
onApplicationInstall
This method is called on installation of an application. When the method is called, the following actions have been done: application import, change of classpath, loading of configuration- Parameters:
appl
- the application object
-
onApplicationUninstall
This method is called on application uninstall (delete). It is performed before any of the application objects have been deleted.- Parameters:
appl
- the application object
-
onCopyProcess
This method is called when task function "Create process copy" is executed. It is performed after copy operation has been finished and the begin step of the process has been started. After executing this method the first interactive process step will be started.- Parameters:
originPI
- theProcessInstance
where "Create process copy" has been callednewPI
- theProcessInstance
which has been created by "Create process copy"
-