Hi, I'm trying to execute a robotic process that open and close Outlook, but I receive this message [ERROR] 2020-06-16 15:58:20 - - java.lang.reflect.InvocationTargetException
Anyone know what could be due to it? I attach my short code here:
Java class:
package com.novayre.jidoka.robot.test; import com.novayre.jidoka.client.api.IJidokaServer; import com.novayre.jidoka.client.api.IRobot; import com.novayre.jidoka.client.api.JidokaFactory; import com.novayre.jidoka.client.api.annotations.Robot; import com.novayre.jidoka.client.api.exceptions.JidokaFatalException; import com.novayre.jidoka.client.api.multios.IClient; import com.novayre.jidoka.outlook.api.IJidokaOutlook; import com.novayre.jidoka.outlook.api.exception.JidokaMsOutlookException; /** * The Class OutlookTestRobot. */ @Robot public class OutlookTestRobot implements IRobot { /** * Pause between interactions imitating the human behavior. */ private static final int PAUSE = 5000; /** The server. */ private IJidokaServer< ? > server; /** The client. */ private IClient client; IJidokaOutlook outlook; /** * Initialize the modules */ @Override public boolean startUp() throws Exception { try { // Initialization of the robot components server = JidokaFactory.getServer(); client = IClient.getInstance(this); outlook = IJidokaOutlook.getInstance(this); return IRobot.super.startUp(); } catch (Exception e) { throw new JidokaFatalException("Error startUp"); } } @Override public String[] cleanUp() throws Exception { try { client.killAllProcesses("outlook.exe", 1000); return new String[0]; } catch (Exception e) { throw new JidokaFatalException("Error cleanUp"); } } /** * Initial action 'Init'. */ public void init() { try { // Default pause after typing or using the mouse client.pause(PAUSE); } catch (Exception e) { throw new JidokaFatalException("Error initializing"); } } public void openOutlook() throws Exception { try { outlook.open(); client.pause(PAUSE); } catch (JidokaMsOutlookException e) { throw new JidokaFatalException("Error opening Outlook"); } } public void closeOutlook() { try { client.pause(PAUSE); outlook.close(); } catch (JidokaMsOutlookException e) { throw new JidokaFatalException("Error closing Outlook"); } } /** * End. */ public void end() { server.debug("Robot finished!"); } }
pom.xml:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.novayre.jidoka.robot.test</groupId> <artifactId>OutlookTest</artifactId> <packaging>jar</packaging> <version>0.0.1</version> <name>Outlook Test Robot</name> <properties> <jidoka.version>7.0.0</jidoka.version> </properties> <parent> <groupId>com.novayre.jidoka.robot</groupId> <artifactId>jidoka-robot-parent</artifactId> <version>7.0.0</version> <!-- VC --> </parent> <profiles> <profile> <id>jidoka-repo</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>jidoka</id> <url>https://domain.appiancloud.com/rpa-repo/repository/jidoka/</url> <releases> </releases> <snapshots> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jidoka</id> <url>https://domain.appiancloud.com/rpa-repo/repository/jidoka/</url> <releases> </releases> <snapshots> </snapshots> </pluginRepository> </pluginRepositories> <distributionManagement> <repository> <id>jidoka</id> <url>https://domain.appiancloud.com/rpa-repo/repository/jidoka/</url> <layout>default</layout> </repository> </distributionManagement> </profile> </profiles> <dependencies> <dependency> <groupId>com.novayre.jidoka.module</groupId> <artifactId>jidoka-msoutlook-api</artifactId> <version>${jidoka.version}</version> </dependency> </dependencies> </project>
The Error:
Discussion posts and replies are publicly visible