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.This is part of the old workflow engine, use the new workflow engine.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.LoggerLOGDeprecated.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 voidaddProcessingResult(long aktionsId, IProcessingResult value)Deprecated.neues Aktionsergebnisobjekt hinzuzufügenvoidaddProcessingResult(Integer aktionsId, IProcessingResult value)Deprecated.neues Aktionsergebnisobjekt hinzuzufügenvoidclose()Deprecated.IWorkflowExecutionEnvironmentDataenv()Deprecated.HashMap<Long,IProcessingResult>getAktionsErgebnisse()Deprecated.IConsumingFileHandlergetConsumingFileHandler()Deprecated.IEntityContextgetEntityContext()Deprecated.StringgetFilename(String targetName)Deprecated.IFormDataAdaptergetFormDataAdapter()Deprecated.IWorkflowProcessinggetProcessing()Deprecated.IProvidingFileHandlergetProvidingFileHandler()Deprecated.Map<String,Serializable>getSessionAttributeMap()Deprecated.SessionAttributesgetSessionAttributes()Deprecated.FilegetSourceDir(Aktion aktion)Deprecated.Path to the temporary source directory.StringgetSourceDirPath(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.FilegetTargetDir(Aktion aktion)Deprecated.Path to the temporary target directory.StringgetTargetDirPath(Aktion aktion)Deprecated.Path to the temporary target directory.StringgetTempDirPath(Aktion aktion)Deprecated.VorganggetVorgang()Deprecated.IXFormgetXForm()Deprecated.IXFormRenderConfiggetXFormRenderConfig()Deprecated.booleanhasKey(long aktionsId)Deprecated.ermitteln, ob ein Eintrag zu einer Aktions-ID vorhanden istIProcessingResultinstanceFor(long aktionsId)Deprecated.spezifisches Aktionsergebnisobjekt anhand des Keys ermittelnStringlatestValueFor(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.IWorkflowPlaceholderHandlerplaceholder()Deprecated.voidsetAktionsErgebnisse(HashMap<Long,IProcessingResult> aktionsErgebnisse)Deprecated.voidsetEntityContext(IEntityContext entityContext)Deprecated.voidsetFormDataAdapter(IFormDataAdapter formDataAdapter)Deprecated.voidsetSessionAttributes(SessionAttributes sessionAttributes)Deprecated.voidsetSessionAttributes(Map<String,Serializable> sessionAttributes)Deprecated.voidsetVorgang(Vorgang vorgang)Deprecated.voidsetxForm(IXForm xForm)Deprecated.usesetXForm(IXForm)voidsetXForm(IXForm xForm)Deprecated.voidshutdown()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)IProcessingResultvalueFor(long aktionsId)Deprecated.Find the processing result for a given action.StringvalueFor(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- theIWorkflowProcessingxForm- theIXFormxformConfig- theIXFormRenderConfigformDataAdapter- theIFormDataAdapterentityContext- theIEntityContextsessionAttributes- a map of session attributes
-
-
Method Detail
-
addProcessingResult
public void addProcessingResult(Integer aktionsId, IProcessingResult value)
Deprecated.neues Aktionsergebnisobjekt hinzuzufügen- Specified by:
addProcessingResultin 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:
addProcessingResultin 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 derAktionfür die die Ergebnismenge ermittelt werden soll.- Returns:
- Objekt, welches das Aktionsergebnis darstellt
-
placeholder
public IWorkflowPlaceholderHandler placeholder()
Deprecated.- Specified by:
placeholderin 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:IWorkflowProcessingContextFind the processing result for a given action.- Specified by:
valueForin interfaceIWorkflowProcessingContext- Parameters:
aktionsId- The ID of theAktion- Returns:
- The processing result for the given action, if present, or
nullotherwise.
-
getTempDirPath
@Deprecated public String getTempDirPath(Aktion aktion) throws IOException
Deprecated.- Specified by:
getTempDirPathin 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:IWorkflowProcessingContextPath 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:
getTargetDirPathin interfaceIWorkflowProcessingContext- Parameters:
aktion- TheAktionfor 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:IWorkflowProcessingContextPath 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:
getTargetDirin interfaceIWorkflowProcessingContext- Parameters:
aktion- TheAktionfor 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:IWorkflowProcessingContextPath 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:
getSourceDirin interfaceIWorkflowProcessingContext- Parameters:
aktion- TheAktionfor 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:IWorkflowProcessingContextPath 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:
getSourceDirPathin interfaceIWorkflowProcessingContext- Parameters:
aktion- TheAktionfor 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:
getConsumingFileHandlerin 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:
getProvidingFileHandlerin 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:IWorkflowProcessingContextMethode 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:
getSourceFilein interfaceIWorkflowProcessingContext- Type Parameters:
E- Type of a file providing entity, such as a client or project resource.- Parameters:
aktion-Aktiondie Aktion in welcher die Datei zur Verfügung gestellt werden sollfile-IFileProvidingDie Entität dessen Datei ausgelesen werden soll- Returns:
Filedie temporär abgelegte Datei- Throws:
IOException- wenn Fehler beim Anlegen der Datei auftreten
-
getFilename
public String getFilename(String targetName)
Deprecated.- Specified by:
getFilenamein 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 IOExceptionDeprecated.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:
shutdownin 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:
hasKeyin interfaceIWorkflowProcessingContext- Parameters:
aktionsId- - ID der Aktion, deren Existenz geprüft werden soll- Returns:
truewenn element vorhanden, ansonstenfalse
-
valueFor
public String valueFor(long aktionId, EProcessingResult processingResult, int index, String key)
Deprecated.Description copied from interface:IWorkflowProcessingContextIn general, a workflow action returns aListofMaps as the result. This method find the result value at a given index and key.- Specified by:
valueForin interfaceIWorkflowProcessingContext- Parameters:
aktionId- The ID of anAktionfor 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 theprocessingResultis 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:IWorkflowProcessingContextChecks whether a processing result is available for the given actions, and returns the result for the action that was executed most recently.- Specified by:
latestValueForin interfaceIWorkflowProcessingContext- Parameters:
actionIds- Collection of IDs ofAktions 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 theprocessingResultis 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:
getXFormin interfaceIWorkflowProcessingContext- Returns:
- The
IXFormfor the current form record.
-
getXFormRenderConfig
public IXFormRenderConfig getXFormRenderConfig()
Deprecated.- Specified by:
getXFormRenderConfigin interfaceIWorkflowProcessingContext- Returns:
- The configuration that was used for rendering the form for the current form record.
-
getVorgang
public Vorgang getVorgang()
Deprecated.- Specified by:
getVorgangin interfaceIWorkflowProcessingContext- Returns:
- The current
Vorgangfor which workflow processing is executed.
-
setVorgang
public void setVorgang(Vorgang vorgang)
Deprecated.- Specified by:
setVorgangin interfaceIWorkflowProcessingContext
-
getFormDataAdapter
public IFormDataAdapter getFormDataAdapter()
Deprecated.- Specified by:
getFormDataAdapterin interfaceIWorkflowProcessingContext- Returns:
- The
IFormDataAdapterfor 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:
getEntityContextin interfaceIWorkflowProcessingContext- Returns:
- The current
IEntityContextthat 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:
getProcessingin interfaceIWorkflowProcessingContext- Returns:
- The workflow action handler for the action that is current being executed.
-
getSessionAttributeMap
public Map<String,Serializable> getSessionAttributeMap()
Deprecated.- Specified by:
getSessionAttributeMapin 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
setSessionAttributes
@Deprecated public void setSessionAttributes(SessionAttributes sessionAttributes)
Deprecated.
-
getSessionAttributes
@Deprecated public SessionAttributes getSessionAttributes()
Deprecated.- Specified by:
getSessionAttributesin interfaceIWorkflowProcessingContext
-
setxForm
@Deprecated public void setxForm(IXForm xForm)
Deprecated.usesetXForm(IXForm)
-
env
public IWorkflowExecutionEnvironmentData env()
Deprecated.- Specified by:
envin interfaceIBaseWorkflowExecutionContext- Returns:
- Data from the current workflow execution, such as the form for which the workflow is executed, and the current client.
-
-