Interface IWorkflowEventRunner

  • All Known Implementing Classes:
    WorkflowEventRunner

    public interface IWorkflowEventRunner
    The workflow event runner is similar to IWorkflowTaskRunner. The task runner is given a set of tasks and executes those; while the event runner is given an event, determines all triggers that apply to the event, finds the tasks to which these triggers belong; and finally invokes the IWorkflowTaskRunner with those tasks.

    See IWorkflowTaskRunner for details on how tasks are executed.

    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • triggerEvent

        com.google.common.collect.Table<Projekt,​Vorgang,​IEventExecutionResult> triggerEvent​(IWorkflowEventData eventData)
                                                                                                 throws WorkflowEventRunnerException
        Finds all WorkflowTrigger to which the given event applies and executes them in order. Note that an event may apply to multiple form records or event form records of different projects. All applicable form records are grouped by the project they belong to, and executed in that order. Returns the workflow result for each form record, grouped first by the Projekt, then by the Vorgang.
        Parameters:
        eventData - Data of the event to run.
        Returns:
        The result of the workflow execution for each form record, grouped first by the project of the form record and then by the form record itself.
        Throws:
        WorkflowEventRunnerException - When an unhandled exception while attempting to execute the workflow. Note that this does not include errors in the configured workflow tasks themselves (such as when an email could not be sent)-- use IEventExecutionResult.getException() to check for the result of each workflow task.
      • triggerFormRecordEvent

        IEventExecutionResult triggerFormRecordEvent​(IFormRecordProvidingEvent eventData)
        Similar to triggerEvent(IWorkflowEventData), but for an event that pertains to a specific Vorgang. This guarantees that only the tasks of that specific form record are executed. Returns the result for that form record.
        Parameters:
        eventData - Event data for a form record specific event.
        Returns:
        The result of running the tasks of the triggers that were triggered by the given event.