Package de.xima.fc.workflow.model
Class WorkflowTaskRunnerParams.Builder
java.lang.Object
de.xima.fc.workflow.model.WorkflowTaskRunnerParams.Builder
- All Implemented Interfaces:
org.apache.commons.lang3.builder.Builder<IWorkflowTaskRunnerParams>
- Enclosing class:
- WorkflowTaskRunnerParams
public static final class WorkflowTaskRunnerParams.Builder
extends Object
implements org.apache.commons.lang3.builder.Builder<IWorkflowTaskRunnerParams>
A builder for creating the
IWorkflowTaskRunnerParams. Only the Vorgang is required, all other
parameters can either be inferred from the form record, or have an appropriate default.
Normally, you want to at least set a locale(Locale), otherwise the client's default locale is used.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddWorkflowExecutionPostProcessor(IWorkflowExecutionPostProcessor workflowExecutionPostProcessor) build()defaultSystemState(EWorkflowStateType defaultSystemState) formDataAdapter(IFormDataAdapter formDataAdapter) formReordLockContext(IFormRecordLockContext formRecordLockContext) httpContextData(IHttpContextData httpContextData) unsafeSkipFormRecordLock(boolean unsafeSkipFormRecordLock) Deprecated.Deprecated.Useuser(IUser)instead.workflowExecutionPostProcessors(Iterable<IWorkflowExecutionPostProcessor> workflowExecutionPostProcessors) workflowVersion(WorkflowVersion workflowVersion) xFormRenderConfig(IXFormRenderConfig xFormRenderConfig)
-
Constructor Details
-
Builder
Creates a new builder for executing a task of the given form record.- Parameters:
formRecord- Form record for which a task is to be executed. Must not benull.
-
-
Method Details
-
addWorkflowExecutionPostProcessor
public WorkflowTaskRunnerParams.Builder addWorkflowExecutionPostProcessor(IWorkflowExecutionPostProcessor workflowExecutionPostProcessor) - Parameters:
workflowExecutionPostProcessor- A post processor to add, seeIWorkflowExecutionPostProcessorfor details.- Returns:
- This builder for chaining method calls.
-
anonymize
- Parameters:
anonymize- Whether data related to individual persons or users must be anonymized. When not given, defaults tonull. Whennull, an appropriate default is used: (truewhen theProjekt.isAnonymize()requires it, orfalseotherwise.)- Returns:
- This builder for chaining method calls.
-
build
- Specified by:
buildin interfaceorg.apache.commons.lang3.builder.Builder<IWorkflowTaskRunnerParams>
-
client
- Parameters:
client- The client to use for executing the workflow. If not given, the client of the form record or the user is used, if available.- Returns:
- This builder for chaining method calls.
-
clock
- Parameters:
clock- The clock to use for obtaining the current time.- Returns:
- This builder for chaining method calls.
-
defaultSystemState
- Parameters:
defaultSystemState- The system state set automatically when a form record has got no state (i.e. whenVorgang.getCurrentWorkflowState()isnull. Must no beEWorkflowStateType.CUSTOM(as that is not a system state).- Returns:
- This builder for chaining method calls.
-
formDataAdapter
- Parameters:
formDataAdapter- The adapter containing the form data of the form record. When not given, a new form data adapter is created with the data from theVorgang.getCurrentFormeingang().- Returns:
- This builder for chaining method calls.
-
formReordLockContext
public WorkflowTaskRunnerParams.Builder formReordLockContext(IFormRecordLockContext formRecordLockContext) - Parameters:
formRecordLockContext- The context that is locking the form record.- Returns:
- this for chaining.
-
httpContextData
- Parameters:
httpContextData- Data of the current HTTP session, if one exists. If not given, dummy or empty data is used.- Returns:
- This builder for chaining method calls.
-
locale
- Parameters:
locale- Locale to use for locale-sensitive operations. When not given, the locale of the client or the default locale is used.- Returns:
- this for chaining.
-
project
- Parameters:
project- The project to which the form record belongs. When not given, the project is read from the form record.- Returns:
- This builder for chaining method calls.
-
unsafeSkipFormRecordLock
@Deprecated public WorkflowTaskRunnerParams.Builder unsafeSkipFormRecordLock(boolean unsafeSkipFormRecordLock) Deprecated.UseformReordLockContext(IFormRecordLockContext)with a dummy context.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.- Parameters:
unsafeSkipFormRecordLock- Whether the form record should be locked for exclusive use before a task is executed.- Returns:
- This builder for chaining method calls.
-
user
Deprecated.Useuser(IUser)instead.- Parameters:
user- The user who initiated the workflow execution. If not given, an anonymous user is used.- Returns:
- This builder for chaining method calls.
-
user
- Parameters:
user- The user who initiated the workflow execution. If not given, an anonymous user is used.- Returns:
- This builder for chaining method calls.
-
workflowExecutionPostProcessors
public WorkflowTaskRunnerParams.Builder workflowExecutionPostProcessors(Iterable<IWorkflowExecutionPostProcessor> workflowExecutionPostProcessors) - Parameters:
workflowExecutionPostProcessors- The post processors to set (overwrites the current ones), seeIWorkflowExecutionPostProcessorfor details.- Returns:
- This builder for chaining method calls.
-
workflowVersion
- Parameters:
workflowVersion- The workflow version with the process to execute. If not given, theVorgang.getWorkflowVersion()is used.- Returns:
- This builder for chaining method calls.
-
xForm
- Parameters:
xForm- The form belonging to the form record. If not given, the form is read from the currentVorgang.getFormVersion().- Returns:
- This builder for chaining method calls.
-
xFormRenderConfig
- Parameters:
xFormRenderConfig- The configuration that was used to render the form. If not given, a new configuration is created for the project.- Returns:
- This builder for chaining method calls.
-
formReordLockContext(IFormRecordLockContext)with a dummy context.