Class WorkflowValidationBean
- java.lang.Object
-
- de.xima.fc.workflow.designer.bean.WorkflowValidationBean
-
- All Implemented Interfaces:
Serializable
@ViewScoped @Named public class WorkflowValidationBean extends Object implements Serializable
Bean for controlling the validation aspect of the workflow flowchart and node / trigger properties.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WorkflowValidationBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertiesFormRenderOptions
onPropertiesPanelRender()
Invoked when the properties panel is about to be rendered.void
onPropertiesPanelValidated(ValidationCompleteEvent event)
Invoked when the properties panel was validated.void
onValidateClicked()
Called when the validate button is clicked in the workflow designer.void
saveInvalidWorkflow()
Saves an invalid workflow when the user confirmed they wish to do so.void
validateAndSave()
Persist the process in the database, irrespective of whether it is valid.void
validateBackground()
Validate the current workflow in the background while the user is editing the workflow.
-
-
-
Method Detail
-
onPropertiesPanelRender
public PropertiesFormRenderOptions onPropertiesPanelRender()
Invoked when the properties panel is about to be rendered. Makes sure that validation messages are displayed even when the properties panel is opened the first time for a certain workflow node.PropertiesFormRenderOptions.getJsfValidationResult()
is set to theFacesMessage
s stored byonPropertiesPanelValidated(ValidationCompleteEvent)
, if any.PropertiesFormRenderOptions.isForceValidation()
is set totrue
when there no storedJsfValidationResult
can be found. The exception is when the user opens the workflow element properties for the first time, as we do not want to show validation errors before the user has had any chance to enter data.
- Returns:
- The options for the properties panel, as required by the
PropertiesForm.onPreRender(javax.faces.context.FacesContext, javax.faces.event.PreRenderViewEvent)
callback.
-
onPropertiesPanelValidated
public void onPropertiesPanelValidated(ValidationCompleteEvent event)
Invoked when the properties panel was validated. Stores the validation result so that faces messages can be restored later when the same workflow element is selected again; and so that validation messages can be displayed in the flowchart area.- Parameters:
event
- The validation event that occurred, as triggered by the properties form.
-
onValidateClicked
public void onValidateClicked()
Called when the validate button is clicked in the workflow designer. Validates all elements for all validation groups.
-
saveInvalidWorkflow
public void saveInvalidWorkflow()
Saves an invalid workflow when the user confirmed they wish to do so.
-
validateAndSave
public void validateAndSave()
Persist the process in the database, irrespective of whether it is valid. Then performs a full validation and informs the user in case the process is invalid.
-
validateBackground
public void validateBackground()
Validate the current workflow in the background while the user is editing the workflow. This provides incremental feedback to the user. Once they attempt to save the workflow, a full validation is performed.
-
-