A set fields operation on an action sets values for specified
fields on either the object that a workflow is processing or one or more related objects.
Before you begin
Define a workflow and add stages and actions to it. For information
about how to define an action, Defining a workflow action.
About this task
If a set fields operation sets a field on a child object,
conditional on another field on that child object, the action works only if all children meet the
condition. If any child object does not meet the condition, then no changes are made to any child. A
solution for this is to add a Filter by condition on the
When panel so that only a subset of children are included. An error is
issued if a set fields operation sets a field on related objects but no
related objects exist. A solution for this is to include a condition that confirms that at least one
related object exists. For example, include a condition that confirms that a required field, such as
Name, is not empty. Such a condition returns false if no related objects exist and, therefore,
prevents the operation from being executed.
Procedure
- In the GRC Workflow Designer,
click the action that you want to edit.
The Action
Properties panel opens.
- Expand Validations and Operations.
- Click New Operation. The
Operations panel opens.
-
Set Operation to set fields.
-
Provide a Name for the operation.
- Optional: You can define one or more conditions.
- Set Execute As System to
False to run the action as the logged in user. Set Execute As
System to True to run the action as the OPSystem user. The action
can then perform operations that the logged-in user cannot. The history on the
Activity tab shows OPSystem as the user who performed the action.
When you set
Execute As System to
True, all set
field operations where
Target Objects is set to
Self
run as the OPSystem user.
The setting of Execute As System doesn't affect the applicability check on the workflow.
-
Click Edit next to Target Objects. Define
what objects contain the fields that will be set.
- Select a Relationship Type:
- Self
- Direct Child
- Direct Parent
- Ancestor
- Descendant
- Select a Related Object Type. The list is filtered based on what you
chose in Relationship Type.
- Click New Condition to add a condition for setting the field on the
target object.
- If you chose Ancestor or Descendant in Relationship Type, select a path
in Relationship Paths.
- Click Done.
-
Add Fields and set their values on the selected object.
-
Click Done.