Package de.xima.fc.workflow.model
Class WorkflowTaskRunnerParams
- java.lang.Object
-
- de.xima.fc.workflow.model.WorkflowTaskRunnerParams
-
- All Implemented Interfaces:
IWorkflowTaskRunnerParams
public final class WorkflowTaskRunnerParams extends Object implements IWorkflowTaskRunnerParams
POJO implementation ofIWorkflowTaskRunnerParams
with a builder.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorkflowTaskRunnerParams.Builder
A builder for creating theIWorkflowTaskRunnerParams
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static WorkflowTaskRunnerParams.Builder
builder(Vorgang formRecord)
Mandant
getClient()
Clock
getClock()
EWorkflowStateType
getDefaultSystemState()
IFormDataAdapter
getFormDataAdapter()
Vorgang
getFormRecord()
IFormRecordLockContext
getFormRecordLockContext()
IHttpContextData
getHttpContextData()
Locale
getLocale()
Projekt
getProject()
Benutzer
getUser()
Deprecated.UsegetUserModel()
instead.IUser
getUserModel()
Iterable<IWorkflowExecutionPostProcessor>
getWorkflowExecutionPostProcessors()
Callback that is invoked after the workflow was executed.WorkflowVersion
getWorkflowVersion()
IXForm
getXForm()
IXFormRenderConfig
getXFormRenderConfig()
Boolean
isAnonymize()
boolean
isUnsafeSkipFormRecordLock()
Whether the form record should be locked for exclusive use, to ensure that a form record is not processed by multiple threads.
-
-
-
Method Detail
-
getClient
public Mandant getClient()
- Specified by:
getClient
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The current client. This is required and must not be
null
.
-
getClock
public Clock getClock()
- Specified by:
getClock
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The clock to use for obtaining the current time.
-
getDefaultSystemState
public EWorkflowStateType getDefaultSystemState()
- Specified by:
getDefaultSystemState
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The default state to be set on a form record when, after workflow processing is complete, the
Vorgang.getCurrentWorkflowState()
is stillnull
. Must not beEWorkflowStateType.CUSTOM
(as that is not a system state).
-
getFormDataAdapter
public IFormDataAdapter getFormDataAdapter()
- Specified by:
getFormDataAdapter
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The adapter containing the form data of the form record.
-
getFormRecord
public Vorgang getFormRecord()
- Specified by:
getFormRecord
in interfaceIWorkflowTaskRunnerParams
- Returns:
- Form record for which a task is to be executed.
-
getFormRecordLockContext
public IFormRecordLockContext getFormRecordLockContext()
- Specified by:
getFormRecordLockContext
in interfaceIWorkflowTaskRunnerParams
- Returns:
- the context that is locking the form record. May be
null
-
getHttpContextData
public IHttpContextData getHttpContextData()
- Specified by:
getHttpContextData
in interfaceIWorkflowTaskRunnerParams
- Returns:
- Data of the current HTTP request. When no HTTP request is active, this will contain dummy data.
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfaceIWorkflowTaskRunnerParams
- Returns:
- Locale to use for locale-sensitive operations.
-
getProject
public Projekt getProject()
- Specified by:
getProject
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The project to which the task belongs that is to be executed.
-
getUser
@Deprecated public Benutzer getUser()
Deprecated.UsegetUserModel()
instead.- Specified by:
getUser
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The user who initiated the workflow.
-
getUserModel
public IUser getUserModel()
- Specified by:
getUserModel
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The user who initiated the workflow execution. May be an anonymous or system user, but must not be
null
.
-
getWorkflowExecutionPostProcessors
public Iterable<IWorkflowExecutionPostProcessor> getWorkflowExecutionPostProcessors()
Description copied from interface:IWorkflowTaskRunnerParams
Callback that is invoked after the workflow was executed. Lets you modify the workflow execution state before the final result is created.- Specified by:
getWorkflowExecutionPostProcessors
in interfaceIWorkflowTaskRunnerParams
- Returns:
- Post processor to apply, may be
null
or empty.
-
getWorkflowVersion
public WorkflowVersion getWorkflowVersion()
- Specified by:
getWorkflowVersion
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The workflow version of the
Projekt.getWorkflowVersions()
that is to be executed.
-
getXForm
public IXForm getXForm()
- Specified by:
getXForm
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The form belonging to the form record.
-
getXFormRenderConfig
public IXFormRenderConfig getXFormRenderConfig()
- Specified by:
getXFormRenderConfig
in interfaceIWorkflowTaskRunnerParams
- Returns:
- The configuration that was used to render the form.
-
isAnonymize
public Boolean isAnonymize()
- Specified by:
isAnonymize
in interfaceIWorkflowTaskRunnerParams
- Returns:
true
if data related to individual persons or users must be anonymized. Whennull
, an appropriate default is used: (true
when theProjekt.isAnonymize()
requires it, orfalse
otherwise.)
-
isUnsafeSkipFormRecordLock
public boolean isUnsafeSkipFormRecordLock()
Description copied from interface:IWorkflowTaskRunnerParams
Whether the form record should be locked for exclusive use, to ensure that a form record is not processed by multiple threads. This should normally be left at the defaultfalse
.- Specified by:
isUnsafeSkipFormRecordLock
in interfaceIWorkflowTaskRunnerParams
- Returns:
true
to skip locking, orfalse
to lock the form record for exclusive use before executing a task.
-
builder
public static WorkflowTaskRunnerParams.Builder builder(Vorgang formRecord)
- Parameters:
formRecord
- Form record for which a task is to be executed. Must not benull
.- Returns:
- A new builder for executing a task of the given form record.
-
-