Package de.xima.fc.workflow.event
Class WorkflowEventDataFactory
- java.lang.Object
-
- de.xima.fc.workflow.event.WorkflowEventDataFactory
-
public final class WorkflowEventDataFactory extends Object
Factory class for creating common types ofIWorkflowEventData
. The created event data can be passed toWorkflowEventRunner
or related API methods.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description WorkflowEventDataFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static IDoiVerifiedEventData
doiVerified(Vorgang formRecord, WorkflowNode doiInitWorkflowNode, IUser user, Locale locale)
Deprecated.static IDoiVerifiedEventData
doiVerified(Vorgang formRecord, WorkflowNode doiInitWorkflowNode, IUser user, Locale locale, Clock clock)
Creates the data for the event that is triggered when the double opt-in process of a form record has been verified.static FormRecordMessagePostedEventBuilder
formRecordMessagePosted(Vorgang formRecord, FormRecordMessage message)
Creates a new builder for configuring aform record message posted event
.static FormRecordMessageUploadRequestFulfilledEventBuilder
formRecordMessageUploadRequestFulfilled(Vorgang formRecord, FormRecordMessageUploadRequest uploadRequest)
Creates a new builder for configuring aform record message upload request fulfilled event
.static FormSubmissionEventDataBuilder
formSubmissionBuilder(Vorgang formRecord)
Creates a new builder for a form submission event, i.e.static InvitationErrorEventDataBuilder
invitationErrorBuilder(Vorgang formRecord)
Creates a new builder for a form record invitation error event, i.e.static InvitationSentEventDataBuilder
invitationSentBuilder(Vorgang formRecord)
Creates a new builder for a form record invitation sent event, i.e.static SpecificTriggerEventDataBuilder
specificTrigger(Vorgang formRecord, WorkflowTrigger trigger)
Creates a new builder for a specific trigger event, i.e.static IUnhandledExceptionEventData
unhandledException(IWorkflowExecutionEnvironmentData environmentData, IWorkflowEventData originalEvent, NodeThrewException unhandledException)
Creates the event data for when an unhandled error occurred during execution of a workflow task.static UserInvocationEventDataBuilder
userInvocation(Vorgang formRecord, WorkflowTrigger trigger)
Creates a new builder for a specific user trigger event, i.e.
-
-
-
Method Detail
-
doiVerified
@Deprecated public static IDoiVerifiedEventData doiVerified(Vorgang formRecord, WorkflowNode doiInitWorkflowNode, IUser user, Locale locale)
Deprecated.Creates the data for the event that is triggered when the double opt-in process of a form record has been verified.- Parameters:
formRecord
- for which the Double Opt-In has been verifieddoiInitWorkflowNode
- Workflow node that initiated the DOI event.user
- that started the Double Opt-In verification eventlocale
- used for the Double Opt-In verification event- Returns:
- the data for the Double Opt-In verified event
-
doiVerified
public static IDoiVerifiedEventData doiVerified(Vorgang formRecord, WorkflowNode doiInitWorkflowNode, IUser user, Locale locale, Clock clock)
Creates the data for the event that is triggered when the double opt-in process of a form record has been verified.- Parameters:
formRecord
- for which the Double Opt-In has been verifieddoiInitWorkflowNode
- Workflow node that initiated the DOI event.user
- that started the Double Opt-In verification eventlocale
- used for the Double Opt-In verification event- Returns:
- the data for the Double Opt-In verified event
-
formRecordMessagePosted
public static FormRecordMessagePostedEventBuilder formRecordMessagePosted(Vorgang formRecord, FormRecordMessage message)
Creates a new builder for configuring aform record message posted event
.- Parameters:
formRecord
- The form record for which the message was posted.message
- The message that was posted.- Returns:
- A builder for a form record message posted event.
-
formRecordMessageUploadRequestFulfilled
public static FormRecordMessageUploadRequestFulfilledEventBuilder formRecordMessageUploadRequestFulfilled(Vorgang formRecord, FormRecordMessageUploadRequest uploadRequest)
Creates a new builder for configuring aform record message upload request fulfilled event
.- Parameters:
formRecord
- The form record for which an upload request was fulfilled.uploadRequest
- The upload request that was fulfilled.- Returns:
- A builder for a form record message upload request fulfilled event.
-
formSubmissionBuilder
public static FormSubmissionEventDataBuilder formSubmissionBuilder(Vorgang formRecord)
Creates a new builder for a form submission event, i.e. when an online form was submitted via a POST request.- Parameters:
formRecord
- The form record corresponding to the submitted form.- Returns:
- A builder for a form submission event.
-
invitationErrorBuilder
public static InvitationErrorEventDataBuilder invitationErrorBuilder(Vorgang formRecord)
Creates a new builder for a form record invitation error event, i.e. when an error occurred while trying to send an invitation to a form record.- Parameters:
formRecord
- The form record for which sending invitation failed.- Returns:
- A builder for an invitation error event.
-
invitationSentBuilder
public static InvitationSentEventDataBuilder invitationSentBuilder(Vorgang formRecord)
Creates a new builder for a form record invitation sent event, i.e. when an invitation to a form record has been sent.- Parameters:
formRecord
- The form record for which an invitation has been sent.- Returns:
- A builder for an invitation sent event.
-
specificTrigger
public static SpecificTriggerEventDataBuilder specificTrigger(Vorgang formRecord, WorkflowTrigger trigger)
Creates a new builder for a specific trigger event, i.e. an event that applies only to a certain trigger. This is used, for example, to invoke asynchronous triggers such as timed triggers, or for custom triggers.- Parameters:
formRecord
- The form record to which the event should apply.trigger
- The trigger that should be invoked.- Returns:
- A builder for a specific trigger event.
-
unhandledException
public static IUnhandledExceptionEventData unhandledException(IWorkflowExecutionEnvironmentData environmentData, IWorkflowEventData originalEvent, NodeThrewException unhandledException)
Creates the event data for when an unhandled error occurred during execution of a workflow task. The user can define a global error trigger to handle these kind of events.- Parameters:
environmentData
- Current environment data of the active workflow execution.originalEvent
- The original event that triggered the workflow to be executed.unhandledException
- The unhandled exception that occurred during workflow execution.- Returns:
- The error event data for the given error.
-
userInvocation
public static UserInvocationEventDataBuilder userInvocation(Vorgang formRecord, WorkflowTrigger trigger)
Creates a new builder for a specific user trigger event, i.e. an event that applies only to a certain user trigger.- Parameters:
formRecord
- The form record to which the event should apply.trigger
- The trigger that should be invoked. Must be of typeFC_USER_INVOCATION
or no workflow will run.- Returns:
- A builder for a specific user trigger event.
- Since:
- 8.2.0
-
-