close

Filter

loading table of contents...

Studio Developer Manual / Version 2010

Table Of Contents
7.22.1.3.1 Studio Server

At the Studio server, you can define or change validators that create issues for your workflow. The issues will be shown in the so-called nagbar of the Studio's StartWorkflowWindow, or WorkflowWindow. Each validator is linked to a workflow task and optionally its state, so that you can define different validators for every stage of your process.

Additionally, it is possible to change the icon for the workflows in your inbox panel, so you can highlight certain workflow steps, depending on your current workflow task.

Adding custom workflow validators

In order to add validators for your workflow, you need to provide a Bean of type WorkflowValidatorsModel within your studio-lib extension. In that model you need to set the processName accordingly to the process, that you want to add validators for. Now you need to define validators that have to implement the Interface com.coremedia.rest.cap.workflow.validation.WorkflowValidator. Depending if you want to use the validator for the start of a workflow or for a certain task you need to either place you validator in the workflowStartValidators or the workflowTaskValidators.

Note

Note

If you want to add a validator for already existing Workflows you need to adapt the existing WorkflowValidatorsModel bean for that process.

Already existing validators

There is a set of already defined validators available, that you can use for your own validator lists. You can get these validators via the Spring configuration class com.coremedia.rest.cap.workflow.validation.WorkflowValidationConfiguration.

Writing your own validator

If you want to define your own validator you need to implement the interface WorkflowValidator and create issues within the method addIssuesIfInvalid. The method will receive a parameter object that you can use to compute your issues from. Within the parameter object, the isAbortRequestedRunnable object is stored, that you need to check if the validation was aborted. You need to call the isAbortRequestedRunnable within your validator regularly to make sure an aborted validation does not go on longer than necessary.

Search Results

Table Of Contents