/// <summary>
    /// Gets the automation state and move contact to next step. Called when the "Move to next step" button is pressed.
    /// Expects the CreateAutomationState method to be run first.
    /// </summary>
    private bool MoveContactToNextStep()
    {
        // Get dataset of contacts
        string where = "ContactLastName LIKE N'My New Contact%'";
        int topN     = 1;
        var contacts = ContactInfoProvider.GetContacts().Where(where).TopN(topN);

        // Get the process
        WorkflowInfo process = WorkflowInfoProvider.GetWorkflowInfo("MyNewProcess", WorkflowTypeEnum.Automation);

        if (!DataHelper.DataSourceIsEmpty(contacts) && (process != null))
        {
            // Get the contact from dataset
            ContactInfo contact = contacts.First <ContactInfo>();

            // Get the instance of automation manager
            AutomationManager manager = AutomationManager.GetInstance(CurrentUser);

            // Get the process state
            AutomationStateInfo state = contact.Processes.FirstItem as AutomationStateInfo;

            if (state != null)
            {
                // Move contact to next step
                manager.MoveToNextStep(contact, state, "Move to next step");

                return(true);
            }
        }

        return(false);
    }