共用方式為


Workflow Approval Checklist

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

The following topic shows how you can create an approval for a rich client or web client in a Microsoft Dynamics AX workflow. Before you can create approvals, you must have a workflow type. For more information, see Creating a Workflow Type.

Approval Checklist for a Rich Client

  1. Create an approval in the Application Object Tree (AOT). For more information, see, How to: Create a Workflow Approval.

  2. Create approval event handler classes for the StartedEventHandler and CanceledEventHandler property settings and then bind the event handlers to the approval. For more information, see How to: Create a Workflow Event Handler.

  3. Set the Document property for the workflow approval to match the workflow type Document property setting. For more information, see How to: Create a New Workflow Type.

  4. Create a display menu item and then bind the menu item to the DocumentMenuItem property for the approval. For more information, see How to: Associate a Display Menu item with a Workflow Task or Approval.

  5. Create menu item classes for Resubmit and Delegate. Bind the classes to the action menu items that you will create in the next step. For more information, see Classes in X++.

    Note

    You can optionally use the WorkflowWorkItemActionManager Class for the Delegate action menu item. Optionally, create your own class to handle the approval delegate action.

  6. Create action menu items for the approval ResubmitMenuItem and DelegateMenuItem properties and then bind the actions to the approval. For more information, see How to: Associate an Action Menu Item with a Workflow Task or Approval Outcome.

  7. Create classes for each approval outcome. Bind the classes to the action menu items that you will create in the next step. For more information, see Classes in X++.

    Note

    You can use the WorkflowWorkItemActionManager Class for the approval action menu items. Optionally, create your own class to handle approval outcomes.

  8. Create an action menu item for each approval outcome created in the previous step. Bind the actions to the approval in the approval Outcomes node. For more information, see How to: Associate an Action Menu Item with a Workflow Task or Approval Outcome.

    Note

    Each approval must have one outcome of type Complete.

  9. Set the workflow approval outcome Enabled property to No for approval outcome types that are not used.

Approval Checklist for a Web Client

  1. Create an approval in the Application Object Tree (AOT). For more information, see, How to: Create a Workflow Approval.

  2. Create approval event handler classes for StartedEventHandler and CanceledEventHandler and then bind the event handlers to the approval. For more information, see How to: Create a Workflow Event Handler.

  3. Set the Document property for the workflow approval to match the workflow type Document property setting. For more information, see How to: Create a New Workflow Type.

  4. In the Web Menu Items node, create a URLs object and then bind the web menu item to the DocumentWebMenuItem property for the approval. For more information, see How to: Associate a Display Menu item with a Workflow Task or Approval.

  5. Create classes for Resubmit and Delegate. Bind the classes to the ResubmitWebMenuItem and DelegateWebMenuItem actions menu items that you will create in the next step. For more information, see Classes in X++.

    Note

    You can use the EPWorkflowWorkItemActionManager Class for the Delegate actions menu item. Optionally, create your own class to handle the approval delegate action.

  6. In the Web Menu Items node, create two actions menu items for ResubmitWebMenuItem and DelegateWebMenuItem properties and then bind the actions to the approval. For more information, see How to: Associate an Action Menu Item with a Workflow Task or Approval Outcome.

  7. Create classes for each approval outcome. Bind the classes to the actions menu items that you will create in the next step. For more information, see Classes in X++.

    Note

    You can use the EPWorkflowWorkItemActionManager Class for the approval actions menu items. Optionally, create your own class to handle approval outcomes.

  8. In the Web Menu Items node, create actions menu items for approval outcome class created in the previous step. Bind the actions to the ActionWebMenuItem property of the approval in the Outcomes node. For more information, see How to: Associate an Action Menu Item with a Workflow Task or Approval Outcome.

    Note

    Each approval must have one outcome of type Complete and an actions menu item for the approval work item button to display in the user interface.

  9. Set the workflow approval outcome Enabled property to No for approval outcome types that are not used.

Cc636485.collapse_all(en-us,AX.60).gifNext Steps

After you create an approval, you can bind it to the Supported Elements node of the workflow type in the AOT. For more information, see Creating Workflow Tasks, Automated Tasks, and Approvals.

See also

How to: Create a Workflow Approval

Workflow Approval State Transitions

How to: Associate an Action Menu Item with a Workflow Task or Approval Outcome

Walkthrough: Creating a Workflow with a Task and an Approval

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.