Using OData actions
In the next step, we’ll call an OData action to validate whether the workflow step can be completed. OData actions are special methods executed on data entities that are decorated with the SysODataAction
attribute. For example, the validate method looks as follows:
[SysODataAction('validate', false), Hookable(false)] public static boolean validate(WorkflowWorkItemInstanceId WorkflowWorkItemInstanceId)
We can see that the method takes one parameter. When calling the action from Postman, for example, we need to include the parameters in the JSON body of the request. To do it in Power Automate, we can use the Execute action action of the F&O connector (see Figure 4.5):
Figure 4.5 – Using the execute action
When you select the OData action, the Power Automate action will update its UI and you will see a new field for each parameter that the action you’ve selected has. In the case of the validate action...