Using Constraints to Veto Process Submittal or Table Modifications
Constraint definitions allow you to veto process submittal with parameters that violate certain rules defined by the constraint class.
Tabs & Fields
The following table illustrates the fields of each tab of Constraint Definition editor dialogs.
Tab | Field | Description |
---|---|---|
Constraint Definition | Partition | Partitions allow you to group objects security-wise. |
Constraint Definition | Name | Names must start with a letter and contain only letters of the ASCII alphabet (no umlaut, for example), underscores (_), and digits. |
Constraint Definition | Application | Applications allow you to group objects functionally. |
Constraint Definition | Description | Descriptions accept free text, any printable UTF-8 character combination; ensure the client systems have both browsers and fonts required to display the characters. |
Constraint Definition | Library | Library containing the Constraint class. |
Constraint Definition | Factory Class Name | FQCN of the Constraint class, for example com.redwood.scheduler.custom.constraint.MyConstraint |
Documentation | Documentation | Documentation fields accept free text, any printable UTF-8 character combination. You use the Documentation field to document the object for co-workers and as a future reference; this field is also used on some objects to place specific markers that alter the behavior of the object. |
Security | Object privileges on the constraint definition. |
The actual constraint is defined in the library.
Attaching a Constraint Definition to a Process or Chain Definition
There is no way to attach a constraint definition to a process or chain definition in the user interface, you use RedwoodScript.
{
ConstraintDefinition cd = jcsSession.getConstraintDefinitionByName("MyConstraintDefinition");
JobDefinition jd = jcsSession.getJobDefinitionByName("MyProcessDefinition");
jd.createJobDefinitionConstraint(cd);
jcsSession.persist();
}