Invoke Workflow File - The target Element was not specified for this activity

Hi all,

I created a single Activity ( System.Activities.Statements.Sequence ) inside ‘OpenBrowser’ activity which does following things

  • MainSequence ( System.Activities.Statements.Sequence )

    • Open Browser(UiPath.Core.Activities.OpenBrower)
  •        - all steps to login to the websites
    
  •        - All steps to collect data from the website ( Data Scraping ) 
    

Every thing is working fine

Now I want to break above activity into two activities

  1. Login.xamal
  2. CollectData.xamal

I rearranged above flow as below

  • MainSequence ( System.Activities.Statements.Sequence )
  • - UiPath.Core.Activities.OpenBrower
    
  •          - UiPath.Core.Activities.InvokeWorkflowFile ( Login.xaml ) ----> Error here......
    
  •                 - all steps to login to the websites
    
  •          - UiPath.Core.Activities.InvokeWorkflowFile ( CollectData.xaml ) 
    
  •                  - All steps to collect data from the website ( Data Scraping ) 
    

The moment I try to execute above flow I am getting below error

Source: Click 'Login'
Message: The target Element was not specified for this activity. You should set its Target property or use this activity inside of a scope activity (Attach Browser, Open Browser, Open Application, Attach Window, Get Active Window, Element Scope activities).

Exception Type: UiPath.Core.Activities.ElementNotSetException

Any idea how to set Target property of InvokeWorkflowFile ?

Cheers,
Hemant