Class WorkflowEventDataFactory


  • public final class WorkflowEventDataFactory
    extends Object
    Factory class for creating common types of IWorkflowEventData. The created event data can be passed to WorkflowEventRunner or related API methods.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • WorkflowEventDataFactory

        public WorkflowEventDataFactory()
    • Method Detail

      • doiVerified

        @Deprecated
        public static IDoiVerifiedEventData doiVerified​(Vorgang formRecord,
                                                        WorkflowNode doiInitWorkflowNode,
                                                        IUser user,
                                                        Locale locale)
        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 verified
        doiInitWorkflowNode - Workflow node that initiated the DOI event.
        user - that started the Double Opt-In verification event
        locale - 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 verified
        doiInitWorkflowNode - Workflow node that initiated the DOI event.
        user - that started the Double Opt-In verification event
        locale - used for the Double Opt-In verification event
        Returns:
        the data for the Double Opt-In verified 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 type FC_USER_INVOCATION or no workflow will run.
        Returns:
        A builder for a specific user trigger event.
        Since:
        8.2.0