Workflow Rule
A Workflow Rule is tied to a netFORUM Object and can fire on the Insert, Update, and/or Delete of that Object. The Workflow Rule can fire all the time during these events, or only when the value of a specific database Table/Column changes. For Table/Column data changes, the rule can trigger on any change, or on a change to or from a specific value.
For example, you might have a Workflow Rule on the Membership object that fires during every Update. You could narrow that Rule more finely to have it fire only when the Membership Status field changes. You could further narrow that Rule to have it fire only when the Membership Status changes to or from "Former".
An Object can have more than one Workflow Rule; in this case, they are fired one after another based on the order.
Managing Records
Creating a workflow rule tells netFORUM what processes will trigger workflow tasks. The Add - Workflow Rule form contains the object and other information necessary to trigger workflow.
Leaving the active? flag unchecked will allow you to build the workflow and get it all configured before releasing the workflow to trigger when data is created or modified. Once the active? flag is checked, the workflow will be triggered based on the rest of the setup.
The rule name field is a descriptor of the workflow to make it easier to find during a search.
The object drop-down will define the object to which this workflow is related.
The data object is a list of tables associated with this object via the Data Object. This is used in conjunction with the data object control and value to trigger rule fields and the trigger on new value? and trigger on old value? check boxes.
The data object control drop-down is a list of fields in the data object.
The value to trigger rule field is the value of the data object control field that will trigger the workflow. For check box fields, a value of 1 is checked and a value of 0 is unchecked. (Beginning in 2011.05, the entry of this field can be a Parsed Value; prior to that the entry is not parsed when it's evaluated.)
The trigger on new value? check box instructs the workflow to start when the column in the data object control field is changed to the value in the value to trigger rule.
The trigger on old value? check box instructs the workflow to start when the column in the data object control field is changed from the value in the value to trigger rule. If both the trigger on new value? and trigger on old value? checkboxes are selected, then the rule will be triggered any time the data object control is changed, regardless of what the old value or new value is.
The trigger on insert? check box instructs the workflow to start when a new record is created from the object. [NOTE: If this is checked, the workflow does not consider the value to trigger rule for processing. To conditionally run the workflow rule, a workflow task with a condition type needs to be used within this rule.]
The trigger on update? check box instructs the workflow to start when an existing record is changed from the object.
The trigger on delete? check box instructs the workflow to start when a record is deleted from the object.
The order field defines the order in which this workflow will start. One object can have multiple workflows associated with it and they will be run based on the value in the order field. The lower value will run first.
Once you have set up when the workflow will be called, the next step is to set up Workflow Tasks. Be sure that you save the Workflow Rule prior to clicking on the Workflow Designer icon to create Workflow Tasks.
Value to Trigger Rule
Fire Rule for Specific Records
Suppose you want a Rule to fire only for individuals who are students. In this case, set the following:
- Object = Individual
- Data Object = Individual
- Data Object Control = Individual Type
- Value to Trigger Rule = Student (do not add quotes)
- Trigger on New Value = unchecked
- Trigger on Old Value = unchecked
With these settings, the Rule will fire any time the Individual Type is Student.
Fire Rule for Records Where Value Changes
Suppose you want a Rule to fire whenever a particular field, like Individual Type, is changed. You don't care about the value it changes to or from, just the fact that it was updated.
- Object = Individual
- Data Object = Individual
- Data Object Control = Individual Type
- Value to Trigger Rule = leave blank
- Trigger on New Value = checked
- Trigger on Old Value = checked
With these settings, the Rule will fire any time the value of Individual Type is changed.