Exemplary configuration
This section describes an example of how to use code methods. It is based on a process created to let employees update their data in Omada Identity, including name and email address.
Step 1 - Preparing the process template
In this example, you create a data object type called Data Update requests. Here, you must enable the setting Require process to create and modify objects. The following image shows the properties that are added to this data object type:

When this data object type is complete, you can create a process template based on this data object type. The following image shows a process template that is used for creating new data objects based on the Data Update request data object type.

The process has two activities defined:
- Maintain my data, and
- Approve changes.
When you have set up the data object type and the process template is working, you can set up the code method. You define the code method on the transition. This means that when the control moves from the first activity to the second activity, the code method is activated to carry out the action you have configured it to do.
Code methods in a process
After you have configured the code method, process, and data object, you should run the process to test the code method.
This section describes how to use code methods in a process, including how to assign and configure them for a transition. In this example, the default Maintain my data process, available in the Omada Identity Packaged Solution, is the basis for the following description.

The Process Designer shows the basic layout or workflow with all the activities from start to finish. In this particular case, you need more activities, in particular, a mechanism to move from start to finish in a process.
This is where you need transitions and event definitions. They are the components that ensures a step-by-step move through a process. Where you place an event definition and the actions they trigger, such as code methods, are vital for fulfilling the business logic requirement.
Adding a code method to a process
To add a code method to a process, you must create an event definition that can run an action such as a code method. The event definition is located in a transition of a process.
Define an event definition for a transition
-
Open the Process Designer by clicking Setup > Administration > Process templates.
-
Locate the process Maintain my data, click it to open it, then click Designer to see the process as shown in the image above.
-
Double-click the first transition to open the dialog box from which you can configure the transition.

-
Type a name for this transition. In this case, write Submit - use short names to keep your process design easy to read.

-
Click New to open the dialog box for the event definition. The event definition dialog box is where you describe the events and actions that should take place on this particular transition.

-
Type a name for event definition in the Event definition details field. You do not have to name the event definition, but it may help identify this particular event and contribute to general documentation best practices.
-
In the Event triggers on this object... list, choose the object that should trigger the event, but you must be sure that you select a proper object.

-
Click Apply after you select your object. The area listing actions is then activated in the bottom of the dialog box, then click New to open the Select an action to be created window to see a list of actions that you can add. The available actions are:
- Send email
- Execute code method
- Modify object
- Copy data
- Reassign activity
-
Choose the action that you want to take place when the event is triggered. Depending on what type of action you choose, you are sent to another window from which you can specify the details for the action.
When you select the object that triggers an event, you must know which object type the code method is written for and know what you expect to happen with this action. Consider the logic of your process. Otherwise, your process does not give you the expected results, for example, if the code method concerns the reassignment of an activity, the action object is typically the activity to be reassigned.
For more information, see the Omada Identity ES API documentation help file. Click here to go to the code method documentation file.