public interface IWorkflowProcessingContext extends AutoCloseable, Closeable
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
of Map
s (key-value-pairs). Furthermore, there is also a Map
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:
String
s. If you require custom data types, you need to serialize and deserialize
them manually.Modifier and Type | Method and Description |
---|---|
void |
addProcessingResult(Integer aktionsId,
IProcessingResult value)
Deprecated.
|
void |
addProcessingResult(long aktionsId,
IProcessingResult value)
Add a new processing result for a given action.
|
IConsumingFileHandler |
getConsumingFileHandler() |
IEntityContext |
getEntityContext() |
String |
getFilename(String targetName) |
IFormDataAdapter |
getFormDataAdapter() |
IWorkflowProcessing |
getProcessing() |
IProvidingFileHandler |
getProvidingFileHandler() |
Map<String,Serializable> |
getSessionAttributeMap() |
SessionAttributes |
getSessionAttributes()
Deprecated.
|
File |
getSourceDir(Aktion aktion)
Path to the temporary source directory.
|
String |
getSourceDirPath(Aktion aktion)
Path to the temporary source directory.
|
<E extends IFileDataEntity<?>> |
getSourceFile(Aktion aktion,
IFileProviding<?,E> file)
Methode zum Ermitteln und temporären Ablegen von Dateien aus der Datenbank.
|
File |
getTargetDir(Aktion aktion)
Path to the temporary target directory.
|
String |
getTargetDirPath(Aktion aktion)
Path to the temporary target directory.
|
String |
getTempDirPath(Aktion aktion)
Deprecated.
|
Vorgang |
getVorgang() |
IXForm |
getXForm() |
IXFormRenderConfig |
getXFormRenderConfig() |
boolean |
hasKey(long aktionsId) |
String |
latestValueFor(Set<Long> actionIds,
EProcessingResult processingResult,
int index,
String key)
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) |
void |
shutdown()
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)
Find the processing result for a given action.
|
String |
valueFor(long id,
EProcessingResult processingResult,
int index,
String value)
|
@Deprecated void addProcessingResult(Integer aktionsId, IProcessingResult value)
addProcessingResult(long, IProcessingResult)
void addProcessingResult(long aktionsId, IProcessingResult value)
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.IProcessingResult valueFor(long aktionsId)
aktionsId
- The ID of the Aktion
null
otherwise.@Deprecated String getTempDirPath(Aktion aktion) throws IOException
getTargetDirPath(Aktion)
IOException
String getTargetDirPath(Aktion aktion) throws IOException
aktion
- The Aktion
for which the target directory should be returned.IOException
- When the the target directory could not be acquired or created.getTargetDir(Aktion)
File getTargetDir(Aktion aktion) throws IOException
aktion
- The Aktion
for which the target directory should be returned.IOException
- When the the target directory could not be acquired or created.getTargetDirPath(Aktion)
String getSourceDirPath(Aktion aktion) throws IOException
getTargetDirPath(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.aktion
- The Aktion
for which the source directory should be returned.IOException
- When the the source directory could not be acquired or created.getSourceDir(Aktion)
File getSourceDir(Aktion aktion) throws IOException
getTargetDir(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.aktion
- The Aktion
for which the source directory should be returned.IOException
- When the the source directory could not be acquired or created.getSourceDirPath(Aktion)
String getFilename(String targetName)
targetName
- A possibly unsafe name (user input) that you would like to use a a filename.getTargetDir(Aktion)
,
getTargetDirPath(Aktion)
<E extends IFileDataEntity<?>> File getSourceFile(Aktion aktion, IFileProviding<?,E> file) throws IOException
getSourceDir(Aktion)
abgelegt und werden entsprechend beim Schließen des Kontextes mit gelöscht.aktion
- Aktion
die Aktion in welcher die Datei zur Verfügung gestellt werden sollfile
- IFileProviding
Die Entität dessen Datei ausgelesen werden sollFile
die temporär abgelegte DateiIOException
- wenn Fehler beim Anlegen der Datei auftretenvoid shutdown() throws IOException
IOException
- - wenn ein Fehler beim Löschen des temporären Verzeichnisses auftrittboolean hasKey(long aktionsId)
aktionsId
- ID of an Aktion
to check.true
, when a processing result exists for the given action, or false
otherwise.IConsumingFileHandler getConsumingFileHandler()
IProvidingFileHandler getProvidingFileHandler()
IXFormRenderConfig getXFormRenderConfig()
Vorgang getVorgang()
Vorgang
for which workflow processing is executed.void setVorgang(Vorgang vorgang)
IFormDataAdapter getFormDataAdapter()
IFormDataAdapter
for the current form record that can be used to access the current form data.IEntityContext getEntityContext()
IEntityContext
that can be used to access the database.Map<String,Serializable> getSessionAttributeMap()
HttpSession
. Changes to this map will not
be reflected or apply to the HttpSession
.String valueFor(long id, EProcessingResult processingResult, int index, String value)
List
of Map
s as the result. This method find the result
value at a given index and key.id
- The ID of an Aktion
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 the
processingResult
is set to EProcessingResult.RESULT
.value
- Key indicating which value to return.IWorkflowProcessing getProcessing()
@Deprecated SessionAttributes getSessionAttributes()
getSessionAttributeMap()
String latestValueFor(Set<Long> actionIds, EProcessingResult processingResult, int index, String key)
actionIds
- Collection of IDs of Aktion
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 the
processingResult
is set to EProcessingResult.RESULT
.key
- indicating which value to return.Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.