Compartir a través de


How to: Create a Workflow Approval

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

You can use workflow approvals to track the status of a workflow document that has fixed workflow outcomes types such as Approve, Reject, Deny, or RequestChange. This procedure describes how to create a workflow approval in the AOT.

Depending on the needs of the business application, you can enable or disable workflow approval outcomes. The following table describes the four workflow approval outcome types.

Workflow outcome type

Description

Complete

Completes the workflow approval and continues the workflow forward.

Note

Each approval must have one outcome of type Complete.

Return

Returns the approval to the originator for changes and resubmission back to workflow.

RequestChange

Sends the approval to a specific user for changes and resubmission back to workflow.

Deny

Completes the approval as denies and continues the workflow forward.

To create a workflow approval

  1. In the AOT, expand the Workflow node.

  2. Right-click the Approvals node, and then click Add-Ins > Approval wizard. The Workflow wizard is displayed. This wizard will help you create a new workflow approval.

  3. Click Next.

  4. Set the following values for the wizard.

    Value

    Description

    Name

    The name that will be used for the workflow approval.

    Workflow document

    The class that defines the workflow document for which you are creating an approval.

    Note

    This setting must match the Document property setting used in the workflow type for the approval.

    Document preview field group

    The initial set of fields displayed in the unified work list. Select a field group from the root table specified in the Workflow document that you selected. The Workflow document value must be set before you can select a field group.

    Document menu item

    Choose the menu item that points to the main form that displays the document for which you are creating a workflow approval.

    Document web menu item

    Choose the web menu item that points to the Enterprise Portal page that displays the document for which you are creating a workflow approval.

  5. Specify which types of menu items you want to create. You can create menu items for the Microsoft Dynamics AX client, web menu items for Enterprise Portal, or items for both.

  6. Specify whether you want to enable the Deny outcome.

  7. Click Next. A list of all of the resources that will be created for the workflow approval is displayed.

  8. Click Finish to create the resources. The wizard will create classes, menu items, web menu items, the approval, and a project that contains all of the items.

  9. A dialog box will be displayed that indicates the status. Click OK. The project that contains the workflow type resources is displayed.

After a workflow approval is created, you can add the approval to the Supported Elements node of a workflow type. A workflow approval can be bound to more than one workflow type. For more information, see How to: Add a Task, Automated Task, or Approval to a Workflow Type. To add code for the approval, see Handling Workflow Events.

See also

Creating a Workflow Type

Creating Workflow Tasks, Automated Tasks, and Approvals

Workflow Approval Checklist

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.