kind: AdaptiveDialog
modelDescription: This topic is to support creating a new project as a Project Manager Role.
beginDialog:
  kind: OnRecognizedIntent
  id: main
  intent: {}
  actions:
    - kind: SetVariable
      id: setVariable_pfyZ7N
      variable: Topic.Role
      value: Project Manager

    - kind: Question
      id: Question_1p21XI
      variable: Topic.PlanType
      prompt: Please Select a Plan Type (e.g., Project)
      entity:
        kind: EmbeddedEntity
        definition:
          kind: ClosedListEntity
          optionSetName: PlanTypeOptions
          items:
            - id: project
              displayName: Project

            - id: idea
              displayName: Idea

    - kind: ConditionGroup
      id: conditionGroup_6b6NKl
      conditions:
        - id: conditionItem_tpwXYY
          condition: =Topic.PlanType = PlanTypeOptions.idea || Topic.PlanType = PlanTypeOptions.project

      elseActions:
        - kind: SendActivity
          id: sendActivity_824qlR
          activity: I could not find that Plan type.

        - kind: GotoAction
          id: dh9OrY
          actionId: Question_1p21XI

    - kind: Question
      id: Question_qj6GpM
      variable: Topic.ProjectDescription
      prompt: Please provide a description or prompt for the project.
      entity: StringPrebuiltEntity

    - kind: Question
      id: question_BZZfAX
      interruptionPolicy:
        allowInterruption: true

      variable: init:Topic.GenerateSchedule
      prompt: Would you like to generate a preliminary schedule?
      entity:
        kind: EmbeddedEntity
        definition:
          kind: ClosedListEntity
          items:
            - id: Yes
              displayName: Yes

            - id: No
              displayName: No

    - kind: SendActivity
      id: SendActivity_88JSYN
      activity: |-
        Your responses have been collected and I will create a new Plan:
        - Plan Type: {Topic.PlanType}
        - Description: {Topic.ProjectDescription}

    - kind: InvokeFlowAction
      id: invokeFlowAction_YkCwrk
      input:
        binding:
          text: =Topic.ProjectDescription
          text_1: =Text(Topic.Role)
          text_2: =Text(Topic.PlanType)
          text_3: =System.User.Email
          text_4: =Text(Topic.GenerateSchedule)

      output:
        binding:
          planurl: Topic.PlanURL
          response: Topic.response

      flowId: a0e03483-a3d4-f011-8543-7c1e525b5dd4

    - kind: SendActivity
      id: sendActivity_rCEDvV
      activity: ✅ Your plan has been created successfully! [Find your plan here]({Topic.PlanURL})

    - kind: EndDialog
      id: F42egy

inputType: {}
outputType: {}