Step 3: Adding the Action to the Workflow
In this step, you will add the ReleaseFromHold
action to the workflow and
specify a category for the associated Remove Hold command on the More
menu.
Defining the Remove Hold Action in the Workflow
To add the ReleaseFromHold
action to the workflow, do the following:
- In the
RSSVWorkOrderWorkflow
class, in the Configure method, locate the AddDefaultFlow method. (You have added this method in Step 3: Overriding the Configure Method.) - For the screen parameter, call the WithActions method after the
WithCategories method, as the following code
shows.
.WithActions(actions => { })
- In the lambda expression of the WithActions method, add the
ReleaseFromHold
action by calling the Add method, as the following code shows.actions.Add(g => g.ReleaseFromHold, c => c .WithCategory(processingCategory));
In the code above, you have added the
ReleaseFromHold
action, which you defined in theRSSVWorkOrderEntry
graph in Step 1: Implementing the Action in the Graph, to the screen configuration. By calling the WithCategory method, you have specified the category in which the command associated with the action is displayed on the More menu. - Save your changes.
You will use this action later to trigger a transition.