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.
To add the action to the workflow, do the following:
- In the
RSSVWorkOrderEntry_Workflow
class, in the static Configure method, locate the AddDefaultFlow method. (You have added this method in Step 3: Overriding the Configure Method in the Screen Configuration: To Prepare a Screen Configuration for a Form Without a Predefined Workflow activity.) - 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(graph => graph.ReleaseFromHold, action => action.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 in this activity, 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.