Appian RPA Outlook Error

Hi Everyone,

I am trying to automate outlook application. But I am getting the below error continuously. 

Caused by: com.novayre.jidoka.outlook.api.exception.JidokaMsOutlookException: Invoke of: RetentionPolicyName
Source: Microsoft Outlook
Description: The operation failed.

Has anyone faced similar scenario . Please guide me if you had overcome this scenario.

Thanks

  Discussion posts and replies are publicly visible

Parents
  • I had the same error reading mails from a folder, did u solved that?

  • Hi Carlos, I tried to close the outlook application and run the bot, the issue got resolved. Please post the execution logs so that i can help you. thanks

  • Hello, didn't work in my case. 

    The exception is thrown when I'm trying to access to a mail inside a folder.

    This is the error that is shown in the log

    [ERROR] 2021-04-27 06:24:16 05s (0h) - com.novayre.jidoka.outlook.api.exception.JidokaMsOutlookException: Invoke of: RetentionPolicyName
    Source: Microsoft Outlook
    Description: The operation failed.

        at com.novayre.jidoka.outlook.impl.util.JacobUtils.invokev(JacobUtils.java:418)
        at com.novayre.jidoka.outlook.impl.util.JacobUtils.getProperty(JacobUtils.java:342)
        at com.novayre.jidoka.outlook.impl.model.BaseObject.getProperty(BaseObject.java:52)
        at com.novayre.jidoka.outlook.impl.model.BaseObject.getPropertyAsString(BaseObject.java:124)
        at com.novayre.jidoka.outlook.impl.model.MailItem.getRetentionPolicyName(MailItem.java:927)
        at com.novayre.jidoka.outlook.impl.manager.MailManager.transformToOlMailItem(MailManager.java:470)
        at com.novayre.jidoka.outlook.impl.manager.OlFolderManager.lambda$getMailList$1(OlFolderManager.java:163)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.collect(Unknown Source)
        at com.novayre.jidoka.outlook.impl.manager.OlFolderManager.getMailList(OlFolderManager.java:165)

    And this is the code to open the folders and read the mail.

    	private void initOutlook() {
    		server.info("Show Folders:");
    		IOlFolderFW criteria = new OlFolderFW();
    		IOlMailItemFW criteriaMail = new OlMailItemFW();
    		criteria.setFolderPath(pathToMails);
    		criteriaMail.setSubject("TEST");
    		List<IOlFolder> folderList = outlook.getOlFolderManager().getAllMailFoldersList();
    		for (IOlFolder iOlFolder : folderList) {
    			if (iOlFolder.getFolderPath().equals(pathToMails)) {
    				outlook.getOlFolderManager().getMailList(iOlFolder.getEntryID());
    				break;
    			}
    		}
    	}

Reply
  • Hello, didn't work in my case. 

    The exception is thrown when I'm trying to access to a mail inside a folder.

    This is the error that is shown in the log

    [ERROR] 2021-04-27 06:24:16 05s (0h) - com.novayre.jidoka.outlook.api.exception.JidokaMsOutlookException: Invoke of: RetentionPolicyName
    Source: Microsoft Outlook
    Description: The operation failed.

        at com.novayre.jidoka.outlook.impl.util.JacobUtils.invokev(JacobUtils.java:418)
        at com.novayre.jidoka.outlook.impl.util.JacobUtils.getProperty(JacobUtils.java:342)
        at com.novayre.jidoka.outlook.impl.model.BaseObject.getProperty(BaseObject.java:52)
        at com.novayre.jidoka.outlook.impl.model.BaseObject.getPropertyAsString(BaseObject.java:124)
        at com.novayre.jidoka.outlook.impl.model.MailItem.getRetentionPolicyName(MailItem.java:927)
        at com.novayre.jidoka.outlook.impl.manager.MailManager.transformToOlMailItem(MailManager.java:470)
        at com.novayre.jidoka.outlook.impl.manager.OlFolderManager.lambda$getMailList$1(OlFolderManager.java:163)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.collect(Unknown Source)
        at com.novayre.jidoka.outlook.impl.manager.OlFolderManager.getMailList(OlFolderManager.java:165)

    And this is the code to open the folders and read the mail.

    	private void initOutlook() {
    		server.info("Show Folders:");
    		IOlFolderFW criteria = new OlFolderFW();
    		IOlMailItemFW criteriaMail = new OlMailItemFW();
    		criteria.setFolderPath(pathToMails);
    		criteriaMail.setSubject("TEST");
    		List<IOlFolder> folderList = outlook.getOlFolderManager().getAllMailFoldersList();
    		for (IOlFolder iOlFolder : folderList) {
    			if (iOlFolder.getFolderPath().equals(pathToMails)) {
    				outlook.getOlFolderManager().getMailList(iOlFolder.getEntryID());
    				break;
    			}
    		}
    	}

Children
No Data