Subprogram Questions/Issues

Hi there!

I feel as though I have made some critical mistakes with the workflows that have been built, as they were all built start to finish per process without using the Subprogram activities.

I am trying to maximize my overall build efficiency using the program and so I have been heavily researching into Subprogram.

Inside of the Processes folder, I have 3 folders–one for Shared processes across multiple services we provide, one for the CARES credit, and one for the WOTC credit. I noticed that the file has to be a .neek file for it to be used with Subprogram.

I started out with two global processes–Get_Current_Date and Get_Current_User. Both are stored inside the Shared sub-folder of the Processes folder. I opened Studio Pro and clicked Playground to test by adding a Subprogram activity. I selected the Get_Current_Date .neek file and received the following error.

What does this mean? If it helps, we are using the RDP environment to house the ElectroNeek Server that runs the bots. The projects and .neek files are saved on network folders.

I created the mini workflows using Playground and saved from there. Below are screenshots of folder paths and files:

Main Location
image

Shared Sub-Folder in Main Location
image

Thank you in advance!

1 Like

Hello @BrandonTerry,

In this situation, I would suggest you to try instead of working in playground mode, create a project and then call the subprograms. Please try it and let me know if it works for you.

2 Likes

Thanks for your response! I must be doing something wrong. I think I’ve tried every way possible. My latest try includes these steps:

  • Open Studio Pro
  • Click Create Project
  • Add Activities to Canvas
  • Click Save

I repeated these steps for a few different workflows–two OS Automation workflows and one Web Automation. I created a new project instead of using Playground, and then I added some activities as well as the two OS Automation subprograms and the one Web Automation program. When I ran the workflow, it gave me the same error and didn’t have any of the elements in the Browser Element parameter. The OS Automation subprogram worked fine. The Web Automation subprogram did not.

Could it be an issue with how I have everything organized? Below is my current organization.

Subprogram Workflows

  • Desktop
    • ElectroNeek
      • Subprograms
        • Shared
          • OS_Processes
            • Get_Current_Date (contains .neek and corresponding files)
            • Get_Current_User (contains .neek and corresponding files)
          • UI_Processes
          • Web_Processes
        • CARES
        • WOTC
          • OS_Processes
            • Update_Batch_File_Output_Folder (contains .neek and corresponding files)
            • Get_Current_User (contains .neek and corresponding files)
          • UI_Processes
          • Web_Processes
            • Shared
            • CertLink_Platform
            • Colorado_Platform
            • GeoSolutions_Platform
            • Individual_Platforms
            • Kentucky_Platform
              • RI
                • LogInWebsite (contains .neek and corresponding files)
                • SelectMenuItem (contains .neek and corresponding files)

Thank you for all your help!

Brandon

2 Likes

Okay, may have figured this out… I think! :slight_smile:

From what I can tell (and this may not be correct), in order for the subprograms to work, we have to perform the following steps:

  • Open Studio Pro.
  • Click Create Project.
  • Add activities, as needed.
  • Click the + icon to open a new tab.
  • Add activities to the new tab.
  • Save and close new tab.
  • Add subprogram to main tab, and select new file in same folder.
  • Repeat until done.
  • Run process to test.

When I completed the above steps, I noticed that the web elements were saved in the subprograms, so I am assuming that is how it needs to work.

The Help article talks about absolute and relative paths, which makes me think that we could connect to any .neek file within the home directory; however, it doesn’t seem to work in the way that is said.

If someone could assist me in getting some clarification, I would be so appreciative! If it’s working, then I have to build from the master process down to the smallest subprogram.

Also, I ran into another issue. The main program reads an Excel file and saves the data to a variable. These actions are followed by a For Each Row loop that houses subprograms. When I ran the process, it stopped with the error that stated the abbreviation variable did not exist. When I stepped through the process, I saw that the variable existed and it had the correct value. It just wasn’t being passed to the subprogram. I even added a variable to capture the abbreviation info, but it still gave me the same error.

2 Likes

Hi @BrandonTerry ,

That is correct, the .neek file does not contain all elements picked for the workflow. It is save in the Project structured, which means that for running subprogramas that uses elements, this subprogram “.neek” must be in the same project folder.

Regarding the variables, to pass values between main program and subprograms, the variable must be marked as “Global”:

Then it will be possible to receive the value of this variable in the subprogram of the project.

4 Likes

Thank you so much for verifying that for me! The Help article is very unclear about Subprograms. I would love to see it discuss the functionality of Subprograms from start to finish–i.e., how to create a subprogram inside a main project, etc.

The part where it is unclear is where it references absolute paths. It states, “an absolute path is used when the required workflow file is placed in any other place different from the directory that contains the current workflow.”

I appreciate you clarifying how this works! Have a great day!

Brandon