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.

Image Added

Image Added

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 Modified

     

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

    Image Modified

     

  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 Modified

     

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

    Image Modified

    Image Modified

     

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

    Image Modified

     

  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 Modified

  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 Modified

     

Create a Workflow

  1. 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 Modified

     

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

    Image Modified

     

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

    Image Modified

     

  4. 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 Modified

     

  5. 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 Modified

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

    Image Modified

  7. 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 view.

    Image Modified

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

    Code Block
                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];
    

     

  9. Select the second form. Open the properties window and paste the following code into the AfterExecute event handler.

    Image Modified

     

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

     

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

    Image Modified

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

  11. 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 Modified

Test the Workflow

  1. Login into the EmpowerID.

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

    Image Modified

     

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

    Image Modified
Note

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