Package de.xima.fc.interfaces.processing
Interface IWorkflowProcessingContext
-
- All Superinterfaces:
AutoCloseable
,Closeable
,IBaseWorkflowExecutionContext
- All Known Implementing Classes:
WorkflowProcessingContext
@Deprecated public interface IWorkflowProcessingContext extends IBaseWorkflowExecutionContext, AutoCloseable, Closeable
Deprecated.Use the new workflow engine (IWorkflowEventRunner
).Context object that contains data related to the current execution of the workflow processing. It is the context for the entire workflow processing and is created by the system and is closed automatically once workflow processing finishes.This class also represents a container that encapsulates objects returned as the result of a workflow action. It also makes these result available to other actions during one execution of the workflow. In general, the result of a single workflow action is a
List
ofMap
s (key-value-pairs). Furthermore, there is also aMap
between the action ID and the corresponding processing result for quickly accessing the result of a given action. That is, the entire map workflow action results looks as follows:- AktionsId=1
-
-
- key11
- value11
- key12
- value12
- key13
- value13
-
- key21
- value21
-
- AktionsId=2
-
-
- key11
- value11
- key12
- value12
- key13
- value13
-
- key21
- value21
- key22
- value22
-
- key31
- value31
- key32
- value32
- key33
- value33
-
String
s. If you require custom data types, you need to serialize and deserialize them manually.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addProcessingResult(long aktionsId, IProcessingResult value)
Deprecated.Add a new processing result for a given action.void
addProcessingResult(Integer aktionsId, IProcessingResult value)
Deprecated.IConsumingFileHandler
getConsumingFileHandler()
Deprecated.IEntityContext
getEntityContext()
Deprecated.String
getFilename(String targetName)
Deprecated.IFormDataAdapter
getFormDataAdapter()
Deprecated.IWorkflowProcessing
getProcessing()
Deprecated.IProvidingFileHandler
getProvidingFileHandler()
Deprecated.Map<String,Serializable>
getSessionAttributeMap()
Deprecated.SessionAttributes
getSessionAttributes()
Deprecated.File
getSourceDir(Aktion aktion)
Deprecated.Path to the temporary source directory.String
getSourceDirPath(Aktion aktion)
Deprecated.Path to the temporary source directory.<E extends IFileDataEntity<?>>
FilegetSourceFile(Aktion aktion, IFileProviding<?,E> file)
Deprecated.Methode zum Ermitteln und temporären Ablegen von Dateien aus der Datenbank.File
getTargetDir(Aktion aktion)
Deprecated.Path to the temporary target directory.String
getTargetDirPath(Aktion aktion)
Deprecated.Path to the temporary target directory.String
getTempDirPath(Aktion aktion)
Deprecated.Vorgang
getVorgang()
Deprecated.IXForm
getXForm()
Deprecated.IXFormRenderConfig
getXFormRenderConfig()
Deprecated.boolean
hasKey(long aktionsId)
Deprecated.String
latestValueFor(Set<Long> actionIds, EProcessingResult processingResult, int index, String key)
Deprecated.Checks whether a processing result is available for the given actions, and returns the result for the action that was executed most recently.void
setVorgang(Vorgang vorgang)
Deprecated.void
shutdown()
Deprecated.alle geöffneten Referenzen des Kontexts schließen und temporär angelegte Dateien löschen (sollte erst passieren, wenn der Statuswechsel vollzogen ist und kein Kontext mehr benötigt wird)IProcessingResult
valueFor(long aktionsId)
Deprecated.Find the processing result for a given action.String
valueFor(long id, EProcessingResult processingResult, int index, String value)
Deprecated.-
Methods inherited from interface de.xima.fc.interfaces.workflow.execution.IBaseWorkflowExecutionContext
env, placeholder
-
-
-
-
Method Detail
-
addProcessingResult
@Deprecated void addProcessingResult(Integer aktionsId, IProcessingResult value)
Deprecated.- Parameters:
aktionsId
- ID of a workflow action.value
- Value returned by the workflow action.
-
addProcessingResult
void addProcessingResult(long aktionsId, IProcessingResult value)
Deprecated.Add a new processing result for a given action.- Parameters:
aktionsId
- The ID of the action for which a processing result should be added.value
- The value which should be added as a result of the given action.
-
valueFor
IProcessingResult valueFor(long aktionsId)
Deprecated.Find the processing result for a given action.- Parameters:
aktionsId
- The ID of theAktion
- Returns:
- The processing result for the given action, if present, or
null
otherwise.
-
getTempDirPath
@Deprecated String getTempDirPath(Aktion aktion) throws IOException
Deprecated.- Parameters:
aktion
- A workflow action for which to find the temporary path.- Returns:
- A unique temporary path for the given action that is guaranteed to be different from the path for other actions. The returned directory is guaranteed to exist.
- Throws:
IOException
- When the temporary directory does not exist and could not be created.
-
getTargetDirPath
String getTargetDirPath(Aktion aktion) throws IOException
Deprecated.Path to the temporary target directory. This directory may be used to store files created by an action. The directory path that is returned will refer to a directory that exists on the file system (if necessary, it is created when calling this method). The directory will be deleted once workflow processing finishes.- Parameters:
aktion
- TheAktion
for which the target directory should be returned.- Returns:
- The path to the directory for the given action.
- Throws:
IOException
- When the the target directory could not be acquired or created.- See Also:
getTargetDir(Aktion)
-
getTargetDir
File getTargetDir(Aktion aktion) throws IOException
Deprecated.Path to the temporary target directory. This directory may be used to store files created by an action. The directory path that is returned will refer to a directory that exists on the file system (if necessary, it is created when calling this method). The directory will be deleted once workflow processing finishes.- Parameters:
aktion
- TheAktion
for which the target directory should be returned.- Returns:
- The file for the directory for the given action.
- Throws:
IOException
- When the the target directory could not be acquired or created.- See Also:
getTargetDirPath(Aktion)
-
getSourceDirPath
String getSourceDirPath(Aktion aktion) throws IOException
Deprecated.Path to the temporary source directory. This directory contains files that were created for this action. It may be read from, but you should not create new files from this directory. If you want to create new files for the action, usegetTargetDirPath(Aktion)
. The directory path that is returned will refer to a directory that exists on the file system (if necessary, it is created when calling this method). The directory will be deleted once workflow processing finishes.- Parameters:
aktion
- TheAktion
for which the source directory should be returned.- Returns:
- The path to the source directory for the given action.
- Throws:
IOException
- When the the source directory could not be acquired or created.- See Also:
getSourceDir(Aktion)
-
getSourceDir
File getSourceDir(Aktion aktion) throws IOException
Deprecated.Path to the temporary source directory. This directory contains files that were created for this action. It may be read from, but you should not create new files from this directory. If you want to create new files for the action, usegetTargetDir(Aktion)
. The directory path that is returned will refer to a directory that exists on the file system (if necessary, it is created when calling this method). The directory will be deleted once workflow processing finishes.- Parameters:
aktion
- TheAktion
for which the source directory should be returned.- Returns:
- The file for the source directory for the given action.
- Throws:
IOException
- When the the source directory could not be acquired or created.- See Also:
getSourceDirPath(Aktion)
-
getFilename
String getFilename(String targetName)
Deprecated.- Parameters:
targetName
- A possibly unsafe name (user input) that you would like to use a a filename.- Returns:
- A safe filename that can be used to create a new file on the file system. It is only a file name without a directory.
- See Also:
getTargetDir(Aktion)
,getTargetDirPath(Aktion)
-
getSourceFile
<E extends IFileDataEntity<?>> File getSourceFile(Aktion aktion, IFileProviding<?,E> file) throws IOException
Deprecated.Methode zum Ermitteln und temporären Ablegen von Dateien aus der Datenbank. Diese werden in das VerzeichnisgetSourceDir(Aktion)
abgelegt und werden entsprechend beim Schließen des Kontextes mit gelöscht.- Type Parameters:
E
- Type of a file providing entity, such as a client or project resource.- Parameters:
aktion
-Aktion
die Aktion in welcher die Datei zur Verfügung gestellt werden sollfile
-IFileProviding
Die Entität dessen Datei ausgelesen werden soll- Returns:
File
die temporär abgelegte Datei- Throws:
IOException
- wenn Fehler beim Anlegen der Datei auftreten
-
shutdown
void shutdown() throws IOException
Deprecated.alle geöffneten Referenzen des Kontexts schließen und temporär angelegte Dateien löschen (sollte erst passieren, wenn der Statuswechsel vollzogen ist und kein Kontext mehr benötigt wird)- Throws:
IOException
- - wenn ein Fehler beim Löschen des temporären Verzeichnisses auftritt
-
hasKey
boolean hasKey(long aktionsId)
Deprecated.- Parameters:
aktionsId
- ID of anAktion
to check.- Returns:
true
, when a processing result exists for the given action, orfalse
otherwise.
-
getConsumingFileHandler
IConsumingFileHandler getConsumingFileHandler()
Deprecated.- Returns:
- Utility methods for working with files and file consuming actions, ie. actions that require or read files.
-
getProvidingFileHandler
IProvidingFileHandler getProvidingFileHandler()
Deprecated.- Returns:
- Utility methods for working with files and file providing actions, ie. actions create files.
-
getXFormRenderConfig
IXFormRenderConfig getXFormRenderConfig()
Deprecated.- Returns:
- The configuration that was used for rendering the form for the current form record.
-
getVorgang
Vorgang getVorgang()
Deprecated.- Returns:
- The current
Vorgang
for which workflow processing is executed.
-
setVorgang
void setVorgang(Vorgang vorgang)
Deprecated.
-
getFormDataAdapter
IFormDataAdapter getFormDataAdapter()
Deprecated.- Returns:
- The
IFormDataAdapter
for the current form record that can be used to access the current form data.
-
getEntityContext
IEntityContext getEntityContext()
Deprecated.- Returns:
- The current
IEntityContext
that can be used to access the database.
-
getSessionAttributeMap
Map<String,Serializable> getSessionAttributeMap()
Deprecated.- Returns:
- A map that contains the session attributes of the current
HttpSession
. Changes to this map will not be reflected or apply to theHttpSession
.
-
valueFor
String valueFor(long id, EProcessingResult processingResult, int index, String value)
Deprecated.In general, a workflow action returns aList
ofMap
s as the result. This method find the result value at a given index and key.- Parameters:
id
- The ID of anAktion
for which to find the processing value.processingResult
- The type of expected processing result.index
- Zero-based index indicating which processing value to return. Ignored unless theprocessingResult
is set toEProcessingResult.RESULT
.value
- Key indicating which value to return.- Returns:
- The processing result value for the given action, at the given index and key.
-
getProcessing
IWorkflowProcessing getProcessing()
Deprecated.- Returns:
- The workflow action handler for the action that is current being executed.
-
getSessionAttributes
@Deprecated SessionAttributes getSessionAttributes()
Deprecated.
-
latestValueFor
String latestValueFor(Set<Long> actionIds, EProcessingResult processingResult, int index, String key)
Deprecated.Checks whether a processing result is available for the given actions, and returns the result for the action that was executed most recently.- Parameters:
actionIds
- Collection of IDs ofAktion
s for which to find the processing value.processingResult
- The type of expected processing result.index
- Zero-based index indicating which processing value to return. Ignored unless theprocessingResult
is set toEProcessingResult.RESULT
.key
- indicating which value to return.- Returns:
- The processing result value for the given action, at the given index and key.
-
-