Versions Compared

Key

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

Overview of the following lab

  • 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 Added

     

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

    Image Added

     

  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 Added

     

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

    Image Added

    Image Added

     

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

    Image Added

     

  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 Added

  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 Added

     

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 Added

     

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

    Image Added

     

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

    Image Added

     

  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 Added

     

  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 Added

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

    Image Added

  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 Added

  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 BeforeExecute event handler.

    Image Added

     

    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 Added

    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.

...

Test the Workflow

  1. Login into the EmpowerID.

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

    Image Added

     

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

    Image Added
Note

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