Skip to main content
Version: 10.2.9

Install Work.AI Developer to VDI

First, let's consider why you may need to install Work.AI Developer on Virtual Desktop Infrastructure (VDI).

The recommended approach is to use a local workstation for Work.AI Developer. Though sometimes, you can access a corporate network from VDI only. The virtual machine has access to all applications within the network. In this case, the preferred approach is to develop on a VDI machine.

Set up environment

To set up a development environment on a VDI machine, perform the following steps:

  1. Request the IT team to create an account and provide a VDI machine, and set up a connection to the VDI machine.

  2. Get access to your corporate Git system.

  3. Check access to remote Control Towers (DEV, QA, PROD).

  4. Install Work.AI Developer.

    note

    Usually, you don't have Administrator rights on your VDI for auto-installation of Work.AI Developer. In this case, download the Work.AI Developer package and create a request to install Developer on your VDI.

  5. Configure Maven settings. You need specific Maven settings to work in your corporate environment. For configuration, change the Maven settings.xml file as appropriate.

  6. Configure JDK settings. Import all certificates and set up the local Java home variable for the current user.

  7. Get a link to the project repository.

  8. Obtain parameters to connect to remote DEV RPA servers needed for RPA bots to test and troubleshoot Business Processes after deployment to the server environment.

Check virtual environment

To verify the VDI configuration, perform the following steps:

  1. Build a project with the mvn clean install command. If the action is successful, the setup is correct.

  2. Deploy the project to Control Tower by running the mvn bundle:import command for pom.xml located in the [ARTIFACT]-package module.

    For more details, refer to Publish Asset Bundle with Maven | Deploy Asset Bundle to local Control Tower.

A successful deployment means that certificates are settled, and there are no issues.

Troubleshoot major problems

The main issue you can have with VDI usage is the one with Administrator rights. If the company policy allows, get the permissions assigned to you. Otherwise, request the IT team for any installations.

caution

Nexus from the installation has out-of-the-box Maven plugins with specific versions only. Your local Maven can expect different versions. As a result, you need access to another Nexus to download Maven plugins.

Set up local system variable

Perform a basic environment setup.

To use Java and Maven from the command line (optional), make sure you have Java 8 SDK and Maven 3 installed. After that, set several Windows environment variables:

warning

It may not work because of security policies.

  1. To set up a local Java home variable for the current user, in Windows cmd, run the following command:

    setx JAVA_HOME "C:\..."
  2. To use Maven from the command line, in Windows cmd, run the following command. You may need Administrator rights to run it. If you don't have them, define the path via the interface.

    setx -m PATH "%PATH%;%MAVEN_HOME%\bin"
  3. Сhoose the IDE to create bots: Eclipse or IDEA.

Set up Maven profile

To configure Maven, go to the settings.xml file and link the WorkFusion dependencies to repository.workfusion.com.

Expand to learn more

Edit the settings.xml file to add an active profile with links to Nexus from the installation. Remember to provide server credentials for server wf-dependencies and ml-sdk.

<profiles>
<profile>
<id>wf-repo</id>
<repositories>
<repository>
<id>wf-dependencies</id>
<url>https://nexus-url.wf.com/nexus/content/repositories/wf-dependencies</url>
</repository>
<repository>
<id>ml-sdk</id>
<url>https://nexus-url.wf.com/nexus/content/repositories/ml-sdk/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>wf-dependencies</id>
<url>https://nexus-url.wf.com/nexus/content/repositories/wf-dependencies</url>
</pluginRepository>
<pluginRepository>
<id>ml-sdk</id>
<url>https://nexus-url.wf.com/nexus/content/repositories/ml-sdk/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>wf-repo</activeProfile>
</activeProfiles>

Set up proxy

When you configure proxy on VDI, sometimes Maven, IDEA, or Eclipse have no access to specific repositories. In this case, configure proxies for each application separately. Use the provided guide both for Maven and Eclipse. If you use IDEA, set it up via the IDEA UI.

Expand to learn more

Symptoms

Nexus is available from the browser but is not available during the Maven build.

Exception example for central repo:

[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Connection timed out: connect -> [Help 1]

Resolution

  1. In the console, execute the command:

    netsh winhttp show proxy
  2. Check that Proxy Server(s) is not empty and has a host with a port, for example, proxy.wf.com:80.

  3. Edit the .m2/settings.xml file. Add the following code in the root element.

    <proxies>
    <proxy>
    <id>httpproxy</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>proxy.wf.com</host>
    <port>80</port>
    <nonProxyHosts>localhost</nonProxyHosts>
    </proxy>
    <proxy>
    <id>httpsproxy</id>
    <active>true</active>
    <protocol>https</protocol>
    <host>proxy.wf.com</host>
    <port>80</port>
    <nonProxyHosts>localhost</nonProxyHosts>
    </proxy>
    </proxies>

Set up Java certificates for Nexus and Control Tower

A lot of common issues can be related to certificates. To solve them, add certificates to Java certs.

Expand to learn more

Symptoms

The build is not started. The exception in logs is as follows:

[ERROR] Non-resolvable parent POM: Could not transfer artifact com.workfusion.odf:odf:pom:10.1.0.9 from/to wf-dependencies (https://nexus-url.wf.com/nexus/content/repositories/wf-dependencies/): peer not authenticated and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]

Resolution

  1. Launch the console.

  2. Export a certificate from the remote host to the file, for example, nexus-lb-test.wf.com:443, using the following command:

    keytool -J-Djava.net.useSystemProxies=true -printcert -rfc -sslserver nexus-lb-test.wf.com:443 > customer.pem
  3. Import the customer.pem certificate into Java certs and provide the path to your JDK using the following command:

    keytool -importcert -file customer.pem -alias customer-ca -storepass changeit -keystore "%JAVA_HOME%\jre\lib\security\cacerts"

If you have access to Maven Central from VDI, make the same operation for URL=https://repo.maven.apache.org/maven2.

Handle HTTPS required exception during build

An error with Maven transferring dependencies from the Maven Central Repository can occur because old plugins refer to HTTP, not HTTPS.

Expand to learn more

Symptoms

The exception is "[ERROR] ... Could not transfer artifact ... from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: ... . Return code is: 501 , ReasonPhrase:HTTPS Required.".

Resolution

    <repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>