Versions Compared

Key

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

...

  1. In the Workspace tree of Solution Explorer, right-click the Package node where you want to create the Workflow and select New Workflow > Flow Chart WorkFlow BotFlow > Conversation BotFlow from the context menu.

    Image Removed


    Image Added


  2. In the Workflow designer, the BasicBotFlowTemplate will load with basic activity shapes.

    Image Added

  3. We will now convert the Flow Chart Workflow into a BotFlow. Click on the Properties tab of the Workflow and change the WorkflowType property to BotFlow.


  4. Save the BotFlow with an appropriate name. Click on the Save icon, provide a File Name in the dialog, and click the Save button. In the screenshot below, we are saving the Workflow with the Name ActivatePreApprovedGroupWorkflow.

    Insert excerpt
    IL:Folder Structure Callout
    IL:Folder Structure Callout
    nameFolderStructure
    nopaneltrue




  5. Once you save the BotFlow, the WFS will reload the Activity.

  6. Let’s add an activity. Click on the Activities Tab and Search for SystemCodeActivity. Drag and drop the Activity to the designer window.


  7. Select the Activity, click on the Properties tab and change the Name to meaningful. In this example, we renamed it as SetResourceOptions.


  8. Add the following snippet of the code. Double-click on the SetResourceOptions and replace the codes of the Implement method. You will also need to include the “TheDotNetFactory.Framework.BotWF.Common” library with a using statement to use bot features like HeroCard.

    Code Block
    using TheDotNetFactory.Framework.BotWF.Common;


    Code Block
    [TheDotNetFactory.Framework.Common.ActivityEventHandlerPostSharpAttribute()]
            public virtual void Implement(object sender, System.EventArgs e)
            {
    			 //TODO: Implementation goes here!
    
    
    			BotHeroCard botHeroCard = new BotHeroCard
    	            {
    	                Title = "BotRequestAppAndMgmtRolesTitle".ToEidResxString(),
    	                Text = "BotRequestAppAndMgmtRolesDescription".ToEidResxString(),
    	                Buttons = new List<BotCardAction> {
    
    	                new BotCardAction { Type = BotActionTypes.ImBack, Title = "ITShop_Common_ApplicationRole".ToEidResxString(),  Value = "ApplicationRole" },
    	                new BotCardAction { Type = BotActionTypes.ImBack, Title = "ITShop_Common_ManagementRole".ToEidResxString(), Value =  "ManagementRole",  }
    	                   }
    	            };
    
    				this.CurrentWorkflow.ResourceOptions.HeroCard = botHeroCard;
    				
            }


  9. Click on the Activities Tab and Search for BotHeroCardActivity. Drag and drop the Activity to the designer window. Please rename it to reflect its purpose. We have renamed it to ResourceOptions.


  10. Please make sure that all the activities are connected with lines. The Workflow should look similar to the image below.


  11. Click on the compile (tick) button to compile the Workflow.


...

  1. Click on the Compile (tick) button in Workflow Studio to compile the Workflow.

  2. Click on the ▶️ Compile and Publish button and complete the necessary step to publish a Workflow if you haven’t already.

  3. If you have already uploaded the Botflow by following the instructions in the section Publish & Test BotFlow from EID Chatbot, proceed to the next step to test the BotFlow, or else complete the steps provided in that section to publish it. You can also print the Botflow using the EmpowerID Web UI. Instructions to publish Workflow Studio items using Web UI are provided here.

  4. Type the Name of Botflow in your Ms-Teams and follow the instructions of the Chatbot. You should see the output of the Botflow you created.

    Image Removed


    Image Added


Insert excerpt
IL:External Stylesheet
IL:External Stylesheet
nopaneltrue

...