Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A wizard workflow allows users to navigate through a series of steps or conditions to execute a workflow. Creating a wizard aims to divide a workflow into multiple screens and easily instruct the user on completing the workflow.

When running a workflow in the EmpowerID Web UI, you can determine whether it's a Wizard Workflow or a Simple Workflow by looking at the top of the interface. There, you'll find a line with circles, each circle representing a step in the workflow. If the circle's border is filled, it means you are currently on that step. If the circle itself is filled and displays a check icon, it means you have completed that step.

This tutorial demonstrates how to create a wizard workflow for EmpowerID. In this tutorial, you will be covering.

  • Create a form for the wizard.

  • Create wizard workflow and Add forms.

  • Publish the workflow into the EmpowerID environment.

  • Test the Workflow.

Create a Form

  1. In the Workspace tree of Solution Explorer, right-click the Package node in which you want to create the form and select New User Interface > Form from the context menu.

    Image Removed

     

  2. A form will appear in the workspace with a default name.

    Image Removed

     

  3. Let’s add some fields to the form. Click on the Other Objects → Add Object. In the Add Object window, select String and click on Add.

    Image Removed

     

    Image RemovedImage Removed
  4. Rename the object String1 to First Name, and drag and drop the object into the form.

    Image Removed

    Image Removed

     

  5. The Next & Back button must be enabled for a wizard. Expand the Approval Decisions and select the Back & Next Button.

    Image Removed

     

  6. Save the form with a meaningful name. You must click on the Save 💾 icon and select the file path. Provide a meaningful name and click on save.

    Image Removed

  7. After the form is saved, you will see the form loaded in the designer with the name you provided.

  8. Click on Compile and publish button, to publish the workflow. You can find more information about deploying here in Build and Deploy.

    Image Removed

     

Create a Workflow

  • In the Workspace tree of Solution Explorer, Navigate to the Package node and select Workflows Applications → New Workflow → Flow Chart Workflow from the context menu.

    Image Removed

     

  • The workflow will load with default shapes. Click on the Save icon to save it with a meaningful name.

    Image Removed

     

  • Select the file path. Provide a name and click on Save.

    Image Removed

     

  • Drag and drop the form we created earlier into the workflow. Expand the User Interface → Forms and select the form created earlier into the workflow.

    Image Removed

     

  • Repeat the above step two more times. For simplicity of the tutorial, we will use the same form three times in the wizard workflow.

    Image Removed

  • Connect the shapes with lines; the lines must be connected from the Start to the End shape.

    Image Removed

  • Select the first form added to the workflow. Open the Properties window and create a new Event Handler. Please provide an event name in the BeforeExecute events and double-click on it to open the

    Code Block

    view.

    Paste the code in the event handler created in the earlier step. You can modify the code based on your requirements.

    Code Block

    Image Removed

                CurrentWorkflow.UiSteps = new WorkflowUISteps();
                  
    			 var step1 = new UIStep();
    			 step1.Name = this.CurrentWorkflow.myNewWizardFormActivity1.QualifiedName;
    			 step1.FriendlyName = "My First Step";
    			 step1.Description =  "My First Step";
    
    			 var step2 = new UIStep();
    			 step2.Name = this.CurrentWorkflow.myNewWizardFormActivity2.QualifiedName;
    			 step2.FriendlyName = "My Second Step";
    			 step2.Description =  "My Second Step";
    
    			 var step3 = new UIStep();
    			 step3.Name = this.CurrentWorkflow.myNewWizardFormActivity3.QualifiedName;
    			 step3.FriendlyName = "My Third Step";
    			 step3.Description =  "My Third Step";
    
                 CurrentWorkflow.UiSteps.Steps.Add(step1);
    			 CurrentWorkflow.UiSteps.Steps.Add(step2);
    			 CurrentWorkflow.UiSteps.Steps.Add(step3);
    
    
    			 CurrentWorkflow.UiSteps.CurrentStep = CurrentWorkflow.UiSteps.Steps[0];
    

     

  • Select the second form. Open the properties window and paste the following code into the BeforeExecute event handler.

    Image Removed

     

    Code Block
    			 CurrentWorkflow.UiSteps.CurrentStep = CurrentWorkflow.UiSteps.Steps[1];

     

  • Similarly, select the third form and paste the following code into the BeforeExecute event.

    Image Removed

    Code Block
    CurrentWorkflow.UiSteps.CurrentStep = CurrentWorkflow.UiSteps.Steps[2];

  • Click on Compile and publish button, to publish the workflow. Complete the publish wizard; you can find more information about deploying here in Build and Deploy.

  • Publish the Workflow

    Once the workflow and forms are compiled and published, the published file items should be deployed into EmpowerID. All details about publishing the items are available on Publish Workflow Studio Items to EmpowerID Environment. Please make sure that the “.pub” file for both form and workflow is published.

    Image Removed

    Test the Workflow

    1. Login into the EmpowerID.

    2. Navigate to Object Administration → Workflows, and search the workflow published in the previous step.

      Image Removed

       

    3. Click on the name of the workflow to execute it. The UI of the workflow will appear on the screen.

      Image Removed
    NoteIIS reset must be done after publishing the workflow, and the workflow might not appear in the listing above without the IIS reset.