Class WorkflowTriggerFactory
- java.lang.Object
-
- de.xima.fc.workflow.processor.factory.WorkflowTriggerFactory
-
public final class WorkflowTriggerFactory extends Object
Factory methods for creating various kinds ofWorkflowTrigger
s.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WorkflowTrigger
catchError()
static WorkflowTrigger
catchError(FcCatchErrorProps props)
static WorkflowTrigger
custom(IWorkflowElementTypeProviding type)
static WorkflowTrigger
custom(IWorkflowElementTypeProviding type, Object data, Mandant client)
static WorkflowTrigger
custom(String data)
static WorkflowTrigger
custom(String type, Object data, Mandant client)
static WorkflowTrigger
doiVerified()
static WorkflowTrigger
doiVerified(WorkflowNode targetNode)
static WorkflowTrigger
doiVerified(NodeKey targetNode)
static IFormRecordMessagePostedBuilder
formRecordMessagePosted()
Creates a new event of typeEWorkflowTriggerType.FC_FORM_RECORD_MESSAGE_POSTED
that occurs when a form record message was posted to chat.static IFormRecordMessageUploadRequestFulfilledBuilder
formRecordMessageUploadRequestFulfilled()
Creates a new event of typeEWorkflowTriggerType.FC_FORM_RECORD_MESSAGE_UPLOAD_REQUEST_FULFILLED
that occurs when a pending upload request was fulfilled.static WorkflowTrigger
formSubmitButton(String buttonName)
Creates a new event of typeEWorkflowTriggerType.FC_FORM_SUBMIT_BUTTON
that occurs when an a form was submitted via any button with a given name.static WorkflowTrigger
invitationError()
Creates a new event of typeEWorkflowTriggerType.FC_INVITATION_ERROR
that occurs when an invitation email could not be sent.static WorkflowTrigger
invitationSent()
Creates a new event of typeEWorkflowTriggerType.FC_INVITATION_SENT
that occurs when an invitation was created successfully.static WorkflowTrigger
manual()
Creates a new event of typeEWorkflowTriggerType.FC_MANUAL
that occurs when a user initiates it.static WorkflowTrigger
manual(Iterable<WorkflowState> states, Iterable<BenutzerGruppe> userGroups)
Creates a new event of typeEWorkflowTriggerType.FC_MANUAL
that occurs when a user initiates it.static WorkflowTrigger
qualifiedFormSubmitButton(String qualifier, String buttonName)
Creates a new event of typeEWorkflowTriggerType.FC_QUALIFIED_FORM_SUBMIT_BUTTON
that occurs when an a form was submitted via a specific button of a certain button list element.static WorkflowTrigger
stateTimer(WorkflowState state, Duration duration)
static WorkflowTrigger
timePointExpression(String dateTimeTemplate, String dateTimeFormat, WorkflowState... allowedStates)
static WorkflowTrigger
timePointExpression(String dateTimeTemplate, String dateTimeFormat, ETimePointTriggerOperation offsetOperation, String offsetDuration, ETimePointTriggerDurationUnit offsetUnit, WorkflowState... allowedStates)
static WorkflowTrigger
timePointExpressionOrPast(String dateTimeTemplate, String dateTimeFormat, WorkflowState... allowedStates)
static WorkflowTrigger
timePointExpressionOrPast(String dateTimeTemplate, String dateTimeFormat, ETimePointTriggerOperation offsetOperation, String offsetDuration, ETimePointTriggerDurationUnit offsetUnit, WorkflowState... allowedStates)
static WorkflowTrigger
timePointFixed(Instant instant, Iterable<WorkflowState> allowedStates)
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINT
that occurs at a certain point in time.static WorkflowTrigger
timePointFixed(Instant instant, ZoneId zoneId, Iterable<WorkflowState> allowedStates)
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINT
that occurs at a certain point in time.static WorkflowTrigger
timePointFixed(LocalDateTime dateTime, ZoneId zoneId, Iterable<WorkflowState> allowedStates)
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINT
that occurs at a certain point in time.static WorkflowTrigger
timePointFixedOrPast(Instant instant, Iterable<WorkflowState> allowedStates)
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINT
that occurs at or after a certain point in time.static WorkflowTrigger
timePointFixedOrPast(Instant instant, ZoneId zoneId, Iterable<WorkflowState> allowedStates)
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINT
that occurs at or after a certain point in time.static WorkflowTrigger
timePointFixedOrPast(LocalDateTime dateTime, ZoneId zoneId, Iterable<WorkflowState> allowedStates)
Creates a new event of typeEWorkflowTriggerType.FC_TIME_POINT
that occurs at or after a certain point in time.static IUserInvocationTriggerBuilder
userInvocation()
Creates a builder for a new event of typeEWorkflowTriggerType.FC_USER_INVOCATION
that occurs when a portal user initiates it.
-
-
-
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
-
formRecordMessagePosted
public static IFormRecordMessagePostedBuilder formRecordMessagePosted()
Creates a new event of typeEWorkflowTriggerType.FC_FORM_RECORD_MESSAGE_POSTED
that 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_FULFILLED
that occurs when a pending upload request was fulfilled.- Returns:
- A new trigger for a form record message upload request fulfilled event.
-
formSubmitButton
public static WorkflowTrigger formSubmitButton(String buttonName) throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_FORM_SUBMIT_BUTTON
that 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
public static WorkflowTrigger invitationError() throws FastJsonException
Creates a new event of typeEWorkflowTriggerType.FC_INVITATION_ERROR
that 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_SENT
that 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_MANUAL
that 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_MANUAL
that 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_BUTTON
that 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_POINT
that 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_POINT
that 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_POINT
that 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_POINT
that 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_POINT
that 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_POINT
that 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
public static IUserInvocationTriggerBuilder userInvocation() throws FastJsonException
Creates a builder for a new event of typeEWorkflowTriggerType.FC_USER_INVOCATION
that 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.
-
-