Defining a workflow action that sets fields

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

  1. In the GRC Workflow Designer, click the action that you want to edit.
    The Action Properties panel opens.
  2. Expand Validations and Operations.
  3. Click New Operation. The Operations panel opens.
  4. Set Operation to set fields.
  5. Provide a Name for the operation.
  6. Optional: You can define one or more conditions.
    For more information, see Defining conditions.
  7. 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.

  8. Click Edit next to Target Objects. Define what objects contain the fields that will be set.
    1. Select a Relationship Type:
      • Self
      • Direct Child
      • Direct Parent
      • Ancestor
      • Descendant
    2. Select a Related Object Type. The list is filtered based on what you chose in Relationship Type.
    3. Click New Condition to add a condition for setting the field on the target object.
    4. If you chose Ancestor or Descendant in Relationship Type, select a path in Relationship Paths.
    5. Click Done.
  9. Add Fields and set their values on the selected object.
  10. Click Done.