Class WorkflowTriggerFactory
java.lang.Object
de.xima.fc.workflow.processor.factory.WorkflowTriggerFactory
Factory methods for creating various kinds of
WorkflowTriggers.- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic WorkflowTriggerstatic WorkflowTriggercatchError(FcCatchErrorProps props) static WorkflowTriggerstatic WorkflowTriggercustom(IWorkflowElementTypeProviding type, Object data, Mandant client) static WorkflowTriggerstatic WorkflowTriggerstatic WorkflowTriggerstatic WorkflowTriggerdoiVerified(WorkflowNode targetNode) static WorkflowTriggerdoiVerified(NodeKey targetNode) Creates a new event of typeEWorkflowTriggerType.FC_FORM_RECORD_MESSAGE_POSTEDthat occurs when a form record message was posted to chat.Creates a new event of typeEWorkflowTriggerType.FC_FORM_RECORD_MESSAGE_UPLOAD_REQUEST_FULFILLEDthat occurs when a pending upload request was fulfilled.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 WorkflowTriggerCreates a new event of typeEWorkflowTriggerType.FC_INVITATION_ERRORthat occurs when an invitation email could not be sent.static WorkflowTriggerCreates 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.Creates a builder for a new event of typeEWorkflowTriggerType.FC_USER_INVOCATIONthat occurs when a portal user initiates it.
-
Method Details
-
catchError
- Throws:
FastJsonException
-
catchError
- Throws:
FastJsonException
-
custom
-
custom
public static WorkflowTrigger custom(IWorkflowElementTypeProviding type, Object data, Mandant client) throws FastJsonException - Throws:
FastJsonException
-
custom
-
custom
public static WorkflowTrigger custom(String type, Object data, Mandant client) throws FastJsonException - Throws:
FastJsonException
-
doiVerified
- Throws:
FastJsonException
-
doiVerified
- Throws:
FastJsonException
-
doiVerified
- Throws:
FastJsonException
-
formRecordMessagePosted
Creates a new event of typeEWorkflowTriggerType.FC_FORM_RECORD_MESSAGE_POSTEDthat occurs when a form record message was posted to chat.- Returns:
- A new trigger for a form record message posted event.
-
formRecordMessageUploadRequestFulfilled
public static IFormRecordMessageUploadRequestFulfilledBuilder formRecordMessageUploadRequestFulfilled()Creates a new event of typeEWorkflowTriggerType.FC_FORM_RECORD_MESSAGE_UPLOAD_REQUEST_FULFILLEDthat occurs when a pending upload request was fulfilled.- Returns:
- A new trigger for a form record message upload request fulfilled event.
-
formSubmitButton
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.
-
invitationError
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
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
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.
-
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.
-
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.
-
userInvocation
Creates a builder for a new event of typeEWorkflowTriggerType.FC_USER_INVOCATIONthat occurs when a portal user initiates it.- Returns:
- A builder for a new trigger for a user invocation event.
- Throws:
FastJsonException- When the properties model could not be serialized as JSON.
-