Class WorkflowTriggerFactory
- java.lang.Object
 - 
- de.xima.fc.workflow.processor.factory.WorkflowTriggerFactory
 
 
- 
public final class WorkflowTriggerFactory extends Object
Factory methods for creating various kinds ofWorkflowTriggers.- Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WorkflowTriggercatchError()static WorkflowTriggercatchError(FcCatchErrorProps props)static WorkflowTriggercustom(IWorkflowElementTypeProviding type)static WorkflowTriggercustom(IWorkflowElementTypeProviding type, Object data, Mandant client)static WorkflowTriggercustom(String data)static WorkflowTriggercustom(String type, Object data, Mandant client)static WorkflowTriggerdoiVerified()static WorkflowTriggerdoiVerified(WorkflowNode targetNode)static WorkflowTriggerdoiVerified(NodeKey targetNode)static WorkflowTriggerformSubmitButton(String buttonName)Creates a new event of typeEWorkflowTriggerType.FC_FORM_SUBMIT_BUTTONthat occurs when an a form was submitted via any button with a given name.static WorkflowTriggerinvitationError()Creates a new event of typeEWorkflowTriggerType.FC_INVITATION_ERRORthat occurs when an invitation email could not be sent.static WorkflowTriggerinvitationSent()Creates a new event of typeEWorkflowTriggerType.FC_INVITATION_SENTthat occurs when an invitation was created successfully.static WorkflowTriggermanual()Creates a new event of typeEWorkflowTriggerType.FC_MANUALthat occurs when a user initiates it.static WorkflowTriggermanual(Iterable<WorkflowState> states, Iterable<BenutzerGruppe> userGroups)Creates a new event of typeEWorkflowTriggerType.FC_MANUALthat occurs when a user initiates it.static WorkflowTriggerqualifiedFormSubmitButton(String qualifier, String buttonName)Creates a new event of typeEWorkflowTriggerType.FC_QUALIFIED_FORM_SUBMIT_BUTTONthat occurs when an a form was submitted via a specific button of a certain button list element.static WorkflowTriggerstateTimer(WorkflowState state, Duration duration)static WorkflowTriggertimePointExpression(String dateTimeTemplate, String dateTimeFormat, WorkflowState... allowedStates)static WorkflowTriggertimePointExpression(String dateTimeTemplate, String dateTimeFormat, ETimePointTriggerOperation offsetOperation, String offsetDuration, ETimePointTriggerDurationUnit offsetUnit, WorkflowState... allowedStates)static WorkflowTriggertimePointExpressionOrPast(String dateTimeTemplate, String dateTimeFormat, WorkflowState... allowedStates)static WorkflowTriggertimePointExpressionOrPast(String dateTimeTemplate, String dateTimeFormat, ETimePointTriggerOperation offsetOperation, String offsetDuration, ETimePointTriggerDurationUnit offsetUnit, WorkflowState... allowedStates)static WorkflowTriggertimePointFixed(Instant instant, Iterable<WorkflowState> allowedStates)Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at a certain point in time.static WorkflowTriggertimePointFixed(Instant instant, ZoneId zoneId, Iterable<WorkflowState> allowedStates)Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at a certain point in time.static WorkflowTriggertimePointFixed(LocalDateTime dateTime, ZoneId zoneId, Iterable<WorkflowState> allowedStates)Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at a certain point in time.static WorkflowTriggertimePointFixedOrPast(Instant instant, Iterable<WorkflowState> allowedStates)Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at or after a certain point in time.static WorkflowTriggertimePointFixedOrPast(Instant instant, ZoneId zoneId, Iterable<WorkflowState> allowedStates)Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at or after a certain point in time.static WorkflowTriggertimePointFixedOrPast(LocalDateTime dateTime, ZoneId zoneId, Iterable<WorkflowState> allowedStates)Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at or after a certain point in time. 
 - 
 
- 
- 
Method Detail
- 
catchError
public static WorkflowTrigger catchError() throws FastJsonException
- Throws:
 FastJsonException
 
- 
catchError
public static WorkflowTrigger catchError(FcCatchErrorProps props) throws FastJsonException
- Throws:
 FastJsonException
 
- 
custom
public static WorkflowTrigger custom(IWorkflowElementTypeProviding type)
 
- 
custom
public static WorkflowTrigger custom(IWorkflowElementTypeProviding type, Object data, Mandant client) throws FastJsonException
- Throws:
 FastJsonException
 
- 
custom
public static WorkflowTrigger custom(String data)
 
- 
custom
public static WorkflowTrigger custom(String type, Object data, Mandant client) throws FastJsonException
- Throws:
 FastJsonException
 
- 
doiVerified
public static WorkflowTrigger doiVerified() throws FastJsonException
- Throws:
 FastJsonException
 
- 
doiVerified
public static WorkflowTrigger doiVerified(NodeKey targetNode) throws FastJsonException
- Throws:
 FastJsonException
 
- 
doiVerified
public static WorkflowTrigger doiVerified(WorkflowNode targetNode) throws FastJsonException
- Throws:
 FastJsonException
 
- 
formSubmitButton
public static WorkflowTrigger formSubmitButton(String buttonName) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_FORM_SUBMIT_BUTTONthat occurs when an a form was submitted via any button with a given name.- Parameters:
 buttonName- Name of the submit button to which the trigger should react. Leave empty to react to all submit buttons.- Returns:
 - A new trigger for a submit button event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
qualifiedFormSubmitButton
public static WorkflowTrigger qualifiedFormSubmitButton(String qualifier, String buttonName) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_QUALIFIED_FORM_SUBMIT_BUTTONthat occurs when an a form was submitted via a specific button of a certain button list element.- Parameters:
 qualifier- Qualifier of the submit button, e.g. the name of the button list element.buttonName- Name of the submit button to which the trigger should react.- Returns:
 - A new trigger for a qualified submit button event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
invitationError
public static WorkflowTrigger invitationError() throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_INVITATION_ERRORthat occurs when an invitation email could not be sent.- Returns:
 - A new trigger for an invitation sent event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
invitationSent
public static WorkflowTrigger invitationSent() throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_INVITATION_SENTthat occurs when an invitation was created successfully.- Returns:
 - A new trigger for an invitation sent event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
manual
public static WorkflowTrigger manual() throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_MANUALthat occurs when a user initiates it. Does not restrict the event to a particular state or user group.- Returns:
 - A new trigger for a manual event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
manual
public static WorkflowTrigger manual(Iterable<WorkflowState> states, Iterable<BenutzerGruppe> userGroups) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_MANUALthat occurs when a user initiates it.- Parameters:
 states- States a form record must have for a user to be allowed to initiate the event.userGroups- User groups a user must be part of for them to be allowed to initiate the event.- Returns:
 - A new trigger for a manual event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
stateTimer
public static WorkflowTrigger stateTimer(WorkflowState state, Duration duration) throws FastJsonException
- Throws:
 FastJsonException
 
- 
timePointExpression
public static WorkflowTrigger timePointExpression(String dateTimeTemplate, String dateTimeFormat, ETimePointTriggerOperation offsetOperation, String offsetDuration, ETimePointTriggerDurationUnit offsetUnit, WorkflowState... allowedStates) throws FastJsonException
- Throws:
 FastJsonException
 
- 
timePointExpression
public static WorkflowTrigger timePointExpression(String dateTimeTemplate, String dateTimeFormat, WorkflowState... allowedStates) throws FastJsonException
- Throws:
 FastJsonException
 
- 
timePointExpressionOrPast
public static WorkflowTrigger timePointExpressionOrPast(String dateTimeTemplate, String dateTimeFormat, ETimePointTriggerOperation offsetOperation, String offsetDuration, ETimePointTriggerDurationUnit offsetUnit, WorkflowState... allowedStates) throws FastJsonException
- Throws:
 FastJsonException
 
- 
timePointExpressionOrPast
public static WorkflowTrigger timePointExpressionOrPast(String dateTimeTemplate, String dateTimeFormat, WorkflowState... allowedStates) throws FastJsonException
- Throws:
 FastJsonException
 
- 
timePointFixed
public static WorkflowTrigger timePointFixed(Instant instant, Iterable<WorkflowState> allowedStates) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at a certain point in time.- Parameters:
 instant- Instant at which the event occurs.allowedStates- States to which to restrict the event. Leave empty for all states.- Returns:
 - A new trigger for a time point event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
timePointFixed
public static WorkflowTrigger timePointFixed(Instant instant, ZoneId zoneId, Iterable<WorkflowState> allowedStates) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at a certain point in time.- Parameters:
 instant- Instant at which the event occurs.zoneId- Time zone to use.allowedStates- States to which to restrict the event. Leave empty for all states.- Returns:
 - A new trigger for a time point event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
timePointFixed
public static WorkflowTrigger timePointFixed(LocalDateTime dateTime, ZoneId zoneId, Iterable<WorkflowState> allowedStates) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at a certain point in time.- Parameters:
 dateTime- Date and time at which the event occurs.zoneId- Time zone to use.allowedStates- States to which to restrict the event. Leave empty for all states.- Returns:
 - A new trigger for a time point event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
timePointFixedOrPast
public static WorkflowTrigger timePointFixedOrPast(Instant instant, Iterable<WorkflowState> allowedStates) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at or after a certain point in time.- Parameters:
 instant- Instant at which the event occurs.allowedStates- States to which to restrict the event. Leave empty for all states.- Returns:
 - A new trigger for a time point event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
timePointFixedOrPast
public static WorkflowTrigger timePointFixedOrPast(Instant instant, ZoneId zoneId, Iterable<WorkflowState> allowedStates) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at or after a certain point in time.- Parameters:
 instant- Instant at which the event occurs.zoneId- Time zone to use.allowedStates- States to which to restrict the event. Leave empty for all states.- Returns:
 - A new trigger for a time point event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
- 
timePointFixedOrPast
public static WorkflowTrigger timePointFixedOrPast(LocalDateTime dateTime, ZoneId zoneId, Iterable<WorkflowState> allowedStates) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINTthat occurs at or after a certain point in time.- Parameters:
 dateTime- Date and time at which the event occurs.zoneId- Time zone of the date time.allowedStates- States to which to restrict the event. Leave empty for all states.- Returns:
 - A new trigger for a time point event.
 - Throws:
 FastJsonException- When the properties model could not be serialized as JSON.
 
 - 
 
 -