Package de.xima.fc.bl.fdv
Class WorkflowProcessingContext
- java.lang.Object
-
- de.xima.fc.bl.fdv.WorkflowProcessingContext
-
- All Implemented Interfaces:
IWorkflowProcessingContext
,IBaseWorkflowExecutionContext
,Closeable
,AutoCloseable
@Deprecated public class WorkflowProcessingContext extends Object implements IWorkflowProcessingContext
Deprecated.Use the new workflow engine (IWorkflowEventRunner
).Diese Klasse bildet einen Container, um Objekte, die bei der Verarbeitung einer Aktion erzeugt wurden, einer anderen Aktion zur Verfügung zu stellen, wobei diese beiden Aktionen innerhalb einer Verarbeitung (eines Statuswechsels) sein müssen. Alle Ergebnisse einer Aktion werden als Key-Value-Paare in einer Map abgelegt. Diese Map befindet sich wiederum in einer Map, welche die Zuordnung der Aktion, welche die Ergebnismenge erzeugt hat, abbildet. Das Ablegen von Ergebnismengen sieht also wie folgt aus:- AktionsId=1
- "key1":"value1"
- "key2":"value2"
- "key3":"value3"
- AktionsId=2
- "key1":"value1"
- "key2":"value2"
- "key3":"value3"
Object
. Beim Auslesen könnte ein Type-Cast notwendig werden.- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
Deprecated.Beinhaltet die Zuordnung zwischen Aktion und Aktionsergebnisobjekten Die Aktionsergebnisobjekte sind Key-Value-Paare, die in Form einer Map in einer dieser Map abgelegt werden und anhand der AktionsId zugreifbar sind.
-
Constructor Summary
Constructors Constructor Description WorkflowProcessingContext(Vorgang process, IWorkflowProcessing processing, IXForm xForm, IXFormRenderConfig xformConfig, IFormDataAdapter formDataAdapter, IEntityContext entityContext, Map<String,Serializable> sessionAttributes)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addProcessingResult(long aktionsId, IProcessingResult value)
Deprecated.neues Aktionsergebnisobjekt hinzuzufügenvoid
addProcessingResult(Integer aktionsId, IProcessingResult value)
Deprecated.neues Aktionsergebnisobjekt hinzuzufügenvoid
close()
Deprecated.IWorkflowExecutionEnvironmentData
env()
Deprecated.HashMap<Long,IProcessingResult>
getAktionsErgebnisse()
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.ermitteln, ob ein Eintrag zu einer Aktions-ID vorhanden istIProcessingResult
instanceFor(long aktionsId)
Deprecated.spezifisches Aktionsergebnisobjekt anhand des Keys ermittelnString
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.IWorkflowPlaceholderHandler
placeholder()
Deprecated.void
setAktionsErgebnisse(HashMap<Long,IProcessingResult> aktionsErgebnisse)
Deprecated.void
setEntityContext(IEntityContext entityContext)
Deprecated.void
setFormDataAdapter(IFormDataAdapter formDataAdapter)
Deprecated.void
setSessionAttributes(SessionAttributes sessionAttributes)
Deprecated.void
setSessionAttributes(Map<String,Serializable> sessionAttributes)
Deprecated.void
setVorgang(Vorgang vorgang)
Deprecated.void
setxForm(IXForm xForm)
Deprecated.usesetXForm(IXForm)
void
setXForm(IXForm xForm)
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 aktionId, EProcessingResult processingResult, int index, String key)
Deprecated.
-
-
-
Constructor Detail
-
WorkflowProcessingContext
public WorkflowProcessingContext(Vorgang process, IWorkflowProcessing processing, IXForm xForm, IXFormRenderConfig xformConfig, IFormDataAdapter formDataAdapter, IEntityContext entityContext, Map<String,Serializable> sessionAttributes)
Deprecated.- Parameters:
process
- the processprocessing
- theIWorkflowProcessing
xForm
- theIXForm
xformConfig
- theIXFormRenderConfig
formDataAdapter
- theIFormDataAdapter
entityContext
- theIEntityContext
sessionAttributes
- a map of session attributes
-
-
Method Detail
-
addProcessingResult
public void addProcessingResult(Integer aktionsId, IProcessingResult value)
Deprecated.neues Aktionsergebnisobjekt hinzuzufügen- Specified by:
addProcessingResult
in interfaceIWorkflowProcessingContext
- Parameters:
aktionsId
- - Id der Aktion zu welcher die Aktionsergebnisobjekte zugeordnet werdenvalue
- - Value das eigentliche Aktionsergebnisobjekt das abgelegt werden soll
-
addProcessingResult
public void addProcessingResult(long aktionsId, IProcessingResult value)
Deprecated.neues Aktionsergebnisobjekt hinzuzufügen- Specified by:
addProcessingResult
in interfaceIWorkflowProcessingContext
- Parameters:
aktionsId
- - Id der Aktion zu welcher die Aktionsergebnisobjekte zugeordnet werdenvalue
- - Value das eigentliche Aktionsergebnisobjekt das abgelegt werden soll
-
instanceFor
public IProcessingResult instanceFor(long aktionsId)
Deprecated.spezifisches Aktionsergebnisobjekt anhand des Keys ermitteln- Parameters:
aktionsId
- - die Id derAktion
für die die Ergebnismenge ermittelt werden soll.- Returns:
- Objekt, welches das Aktionsergebnis darstellt
-
placeholder
public IWorkflowPlaceholderHandler placeholder()
Deprecated.- Specified by:
placeholder
in interfaceIBaseWorkflowExecutionContext
- Returns:
- A handler for replacing placeholders in strings, using the current workflow execution context. This is a shortcut for the methods provided by {code de.xima.fc.placeholder.PlaceholderReplacer} that supplies the required parameters automatically.
-
valueFor
public IProcessingResult valueFor(long aktionsId)
Deprecated.Description copied from interface:IWorkflowProcessingContext
Find the processing result for a given action.- Specified by:
valueFor
in interfaceIWorkflowProcessingContext
- Parameters:
aktionsId
- The ID of theAktion
- Returns:
- The processing result for the given action, if present, or
null
otherwise.
-
getTempDirPath
@Deprecated public String getTempDirPath(Aktion aktion) throws IOException
Deprecated.- Specified by:
getTempDirPath
in interfaceIWorkflowProcessingContext
- 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
public String getTargetDirPath(Aktion aktion) throws IOException
Deprecated.Description copied from interface:IWorkflowProcessingContext
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.- Specified by:
getTargetDirPath
in interfaceIWorkflowProcessingContext
- 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:
IWorkflowProcessingContext.getTargetDir(Aktion)
-
getTargetDir
public File getTargetDir(Aktion aktion) throws IOException
Deprecated.Description copied from interface:IWorkflowProcessingContext
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.- Specified by:
getTargetDir
in interfaceIWorkflowProcessingContext
- 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:
IWorkflowProcessingContext.getTargetDirPath(Aktion)
-
getSourceDir
public File getSourceDir(Aktion aktion) throws IOException
Deprecated.Description copied from interface:IWorkflowProcessingContext
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, useIWorkflowProcessingContext.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.- Specified by:
getSourceDir
in interfaceIWorkflowProcessingContext
- 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:
IWorkflowProcessingContext.getSourceDirPath(Aktion)
-
getSourceDirPath
public String getSourceDirPath(Aktion aktion) throws IOException
Deprecated.Description copied from interface:IWorkflowProcessingContext
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, useIWorkflowProcessingContext.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.- Specified by:
getSourceDirPath
in interfaceIWorkflowProcessingContext
- 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:
IWorkflowProcessingContext.getSourceDir(Aktion)
-
getConsumingFileHandler
public IConsumingFileHandler getConsumingFileHandler()
Deprecated.- Specified by:
getConsumingFileHandler
in interfaceIWorkflowProcessingContext
- Returns:
- Utility methods for working with files and file consuming actions, ie. actions that require or read files.
-
getProvidingFileHandler
public IProvidingFileHandler getProvidingFileHandler()
Deprecated.- Specified by:
getProvidingFileHandler
in interfaceIWorkflowProcessingContext
- Returns:
- Utility methods for working with files and file providing actions, ie. actions create files.
-
getSourceFile
public <E extends IFileDataEntity<?>> File getSourceFile(Aktion aktion, IFileProviding<?,E> file) throws IOException
Deprecated.Description copied from interface:IWorkflowProcessingContext
Methode zum Ermitteln und temporären Ablegen von Dateien aus der Datenbank. Diese werden in das VerzeichnisIWorkflowProcessingContext.getSourceDir(Aktion)
abgelegt und werden entsprechend beim Schließen des Kontextes mit gelöscht.- Specified by:
getSourceFile
in interfaceIWorkflowProcessingContext
- 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
-
getFilename
public String getFilename(String targetName)
Deprecated.- Specified by:
getFilename
in interfaceIWorkflowProcessingContext
- 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:
IWorkflowProcessingContext.getTargetDir(Aktion)
,IWorkflowProcessingContext.getTargetDirPath(Aktion)
-
shutdown
public 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)- Specified by:
shutdown
in interfaceIWorkflowProcessingContext
- Throws:
IOException
- - wenn ein Fehler beim Löschen des temporären Verzeichnisses auftritt
-
hasKey
public boolean hasKey(long aktionsId)
Deprecated.ermitteln, ob ein Eintrag zu einer Aktions-ID vorhanden ist- Specified by:
hasKey
in interfaceIWorkflowProcessingContext
- Parameters:
aktionsId
- - ID der Aktion, deren Existenz geprüft werden soll- Returns:
true
wenn element vorhanden, ansonstenfalse
-
valueFor
public String valueFor(long aktionId, EProcessingResult processingResult, int index, String key)
Deprecated.Description copied from interface:IWorkflowProcessingContext
In general, a workflow action returns aList
ofMap
s as the result. This method find the result value at a given index and key.- Specified by:
valueFor
in interfaceIWorkflowProcessingContext
- Parameters:
aktionId
- 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
.key
- Key indicating which value to return.- Returns:
- The processing result value for the given action, at the given index and key.
-
latestValueFor
public String latestValueFor(Set<Long> actionIds, EProcessingResult processingResult, int index, String key)
Deprecated.Description copied from interface:IWorkflowProcessingContext
Checks whether a processing result is available for the given actions, and returns the result for the action that was executed most recently.- Specified by:
latestValueFor
in interfaceIWorkflowProcessingContext
- 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.
-
getXForm
public IXForm getXForm()
Deprecated.- Specified by:
getXForm
in interfaceIWorkflowProcessingContext
- Returns:
- The
IXForm
for the current form record.
-
getXFormRenderConfig
public IXFormRenderConfig getXFormRenderConfig()
Deprecated.- Specified by:
getXFormRenderConfig
in interfaceIWorkflowProcessingContext
- Returns:
- The configuration that was used for rendering the form for the current form record.
-
getVorgang
public Vorgang getVorgang()
Deprecated.- Specified by:
getVorgang
in interfaceIWorkflowProcessingContext
- Returns:
- The current
Vorgang
for which workflow processing is executed.
-
setVorgang
public void setVorgang(Vorgang vorgang)
Deprecated.- Specified by:
setVorgang
in interfaceIWorkflowProcessingContext
-
getFormDataAdapter
public IFormDataAdapter getFormDataAdapter()
Deprecated.- Specified by:
getFormDataAdapter
in interfaceIWorkflowProcessingContext
- Returns:
- The
IFormDataAdapter
for the current form record that can be used to access the current form data.
-
setFormDataAdapter
public void setFormDataAdapter(IFormDataAdapter formDataAdapter)
Deprecated.
-
getEntityContext
public IEntityContext getEntityContext()
Deprecated.- Specified by:
getEntityContext
in interfaceIWorkflowProcessingContext
- Returns:
- The current
IEntityContext
that can be used to access the database.
-
getAktionsErgebnisse
public HashMap<Long,IProcessingResult> getAktionsErgebnisse()
Deprecated.
-
setAktionsErgebnisse
public void setAktionsErgebnisse(HashMap<Long,IProcessingResult> aktionsErgebnisse)
Deprecated.
-
setXForm
public void setXForm(IXForm xForm)
Deprecated.
-
setEntityContext
public void setEntityContext(IEntityContext entityContext)
Deprecated.
-
getProcessing
public IWorkflowProcessing getProcessing()
Deprecated.- Specified by:
getProcessing
in interfaceIWorkflowProcessingContext
- Returns:
- The workflow action handler for the action that is current being executed.
-
getSessionAttributeMap
public Map<String,Serializable> getSessionAttributeMap()
Deprecated.- Specified by:
getSessionAttributeMap
in interfaceIWorkflowProcessingContext
- Returns:
- A map that contains the session attributes of the current
HttpSession
. Changes to this map will not be reflected or apply to theHttpSession
.
-
setSessionAttributes
public void setSessionAttributes(Map<String,Serializable> sessionAttributes)
Deprecated.
-
close
public void close()
Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
setSessionAttributes
@Deprecated public void setSessionAttributes(SessionAttributes sessionAttributes)
Deprecated.
-
getSessionAttributes
@Deprecated public SessionAttributes getSessionAttributes()
Deprecated.- Specified by:
getSessionAttributes
in interfaceIWorkflowProcessingContext
-
setxForm
@Deprecated public void setxForm(IXForm xForm)
Deprecated.usesetXForm(IXForm)
-
env
public IWorkflowExecutionEnvironmentData env()
Deprecated.- Specified by:
env
in interfaceIBaseWorkflowExecutionContext
- Returns:
- Data from the current workflow execution, such as the form for which the workflow is executed, and the current client.
-
-