PU L1 - Assignment 2 - Run the process


You can see the events log on the page with the business processes list.

In order to update OCR, you need to install a new version of RPA Express.
Which version are you using?


@ashapkina, I am currently using version 1.1.5


@quentin_prev the OCR license for this version has expired. You need to update to version 2.0 to be able to use it. You should be able to use the link that was sent to you when you registered for RPA Express.


When followed every step as provided in this solution by you, my business process is throwing errors :slight_smile:

05.30.2018 09:47:14
Step name ‘Task - looking for the document at the OCR cache - BP OCR’ has failed. Reason: ‘Host name may not be null’
05.30.2018 09:47:14
Step name ‘Task - looking for the document at the OCR cache - BP OCR’ has failed. Reason: ‘Host name may not be null’
05.30.2018 09:47:14
Step name ‘Task - looking for the document at the OCR cache - BP OCR’ has failed. Reason: ‘Host name may not be null’

What might be the issue here?


Unable to Create Process via - Import (ing ZIP file).

Error : Input file cannot be parsed:invalid format or not CSV file.

Please check snapshot for details.


Hi, Manish! Please write the version of RPA Express you are working with.



I have followed the instructions a few times now and come to a halt when I run the process. The following message keeps coming up on every line item in the file.

I’ve also tried to manually access the link where the invoices are and was successful in opening. Is it perhaps something that I’m doing wrong?

2018-06-07 09:50:01 ERROR 64 Step name ‘Transform invoice image to HTML page (OCR)’ has failed. Reason: ‘IO error during HTTP execution for URL: https://s3.amazonaws.com/wf-vr-training/trainings/invoices_scan/invoice1_scan.png

NOTE: I did however, pick up this message when I imported the BP.

The package was exported in WorkFusion version 8.4.2-RPAX r.924abccb. This environment has WorkFusion version 8.5.1 r.594e6623

Not sure if this is adding to my nightmare.

Thanks in advance for your guidance.


Hi, Nico! Could You, please, provide screenshots of your BP, error message and programming code of the 1st bot.


Hi Abrakovich,

Below is the error message.


Code for the BOT

<?xml version="1.0" encoding="UTF-8"?>
     Input parameters:
         doc_uuid: Optional (can be empty): Document UUID
         image_link: URL to document
         custom_regions: Optional (can be empty): [{"left":0, "top":1000, "right":100000, "bottom": 100000}]
         format: txt, html
         ocrMap: {contentUrl, content, htmlContent} - the last one will be empty if format is txt
<function name="performOcr">
	<var-def name="ocrUrl">localhost:15580/api/v1/cloud/</var-def>

	<!-- for an unknown reason without var http-extended does not send the body -->
	<var-def name="j">{"username":"workfusion","password":"workfusion"}</var-def>
	<var-def name="tokenJson">
		<http-extended url="localhost:15280/workfusion/api/login" method="POST" charset="UTF-8" content-type="application/json">
			<var name="j"/>
  <var-def name="token">
      <json expression="$.token"><var name="tokenJson"/></json>
  	<var-def name="document_uuid">
    	<var name="doc_uuid"/>
    	<if condition="${document_uuid.toString().length() == 0}">
        	<var-def name="document_uuid">

	<var-def name="document_image_link">
		<var name="image_link"/>
	<var-def name="customRegions">
        <var name="custom_regions"/>

    	<if condition="${customRegions.toString().length() == 0}">
        	<var-def name="customRegions">
            	[{"left":0, "top":0, "right":2000, "bottom":2000}]

	<function name="checkForErrors">
		<var-def name="status">
			<xpath expression="//task/@status">
				<var name="response" />
       		// "OCR Status: " + status                              
			positiveStatusList = ["Submitted","Queued","InProgress","Completed"]
			if (!positiveStatusList.any {it.equals(status.toString())}) {
				throw new RuntimeException("OCR task has error status. Details:\n" + response);

	<var-def name="processResponse">	
	   	<http url="${ocrUrl}/processImage" method="post" multipart="true">
			<!--<http-header name="Authorization"><script return="'Bearer ' + token.get(0).wrappedObject.asText()"/></http-header>-->
			<http-param name="file" isfile="true"><http url="${document_image_link}"/></http-param>
	       	<http-param name="profile">documentConversion</http-param>
	       	<http-param name="exportFormat"><var name="format"/></http-param>
	       	<http-param name="language">English</http-param>
	       	<http-param name="engine">abbyy</http-param>
			<http-param name="customRegions"><template>${customRegions}</template></http-param>
			<http-param name="useOnlyCustomRegions">true</http-param>
	       	<http-param name="correctSkew">true</http-param>
	       	<http-param name="xml:writeRecognitionVariants">true</http-param>
	       	<http-param name="correctOrientation">true</http-param>

	<call name="checkForErrors">
	   <call-param name="response">
	<var-def name="taskId">
		<xpath expression="//response/task/@id">

	<var-def name="taskStatus">Unknown</var-def>

	<while condition="${!taskStatus.toString().equals('Completed')}" maxloops="300">
		<var-def name="statusResponse">
			<http url="${ocrUrl}/getTaskStatus?taskId=${taskId}" method="get">
				<!--<http-header name="Authorization"><script return="'Bearer ' + token.get(0).wrappedObject.asText()"/></http-header>-->
	    <call name="checkForErrors">
			<call-param name="response">
	    <var-def name="taskStatus">
			<xpath expression="string(//response/task/@status)">
				<var name="statusResponse"/>

	<var-def name="resultUrl">
    	<xpath expression="string(//response/task/@resultUrl)">
        	<var name="statusResponse" />

	<var-def name="resultContent">
		<http url="${resultUrl}" method="get">
			<!--<http-header name="Authorization"><script return="'Bearer ' + token.get(0).wrappedObject.asText()"/></http-header>-->
	<var-def name="resultHtml">
    		<if condition='${"html".equals(format.toString())}'>
	        		<script return="res"><![CDATA[
	            		// Removing BOM and DOCTYPE
	            		res = resultContent.toString().replaceAll("^\uFEFF", "")
	            		res = res.replaceAll("<!DOCTYPE[^>]*>", "")
	            		// "OCR results: " + res                              
	           		]]> </script>

        <script return="ocrMap"><![CDATA[
           Map resultMap = new HashMap();
           resultMap.put("contentUrl", resultUrl.toString());
           resultMap.put("content", resultContent.toString()); // May give wrong results if PDF is requested but this case is not in our scenario
           resultMap.put("htmlContent", resultHtml.toString());
           ocrMap = resultMap;
<required name="s3_invoice_link"/>

<var-def name="ocrResultsPart">
    <call name="performOcr">
     	<call-param name="image_link"><var name="s3_invoice_link"/></call-param>
    	<call-param name="doc_uuid"></call-param>
        <call-param name="custom_regions"></call-param>
        <call-param name="format">html</call-param>

<var-def name="partUrl">

<var-def name="partContent">

<var-def name="partContentHtml">
<export include-original-data="true">
	<single-column name="content_url" value="${partUrl}"/>
	<single-column name="content" value="${partContent}"/>
	<single-column name="html_content" value="${partContentHtml}"/>


Here is the problem with execution. Event log is attached to this post.


Same issue happened to me :joy:


@dakhmetov you need to update to a newer version of RPA express.


Hi all,
I use the newest RPA Express version but I got an issue during running this exercise:

I changed //task/@status -> //response/task/@status but it also didn’t solve the issue.

Could someone assist with this issue?


I have the same issue, I don’t know how to fix it. waiting the solution , thanks.


Hi tedbihina, Did you have any idea? Does it still not work ?



I suppose there is OCR step issue. I commented internal details of checkForErrors function and I got an issue with extracting task id.

Unfortunately, I can’t figure out how to fix it for now


@nico_makgato and @josephbei have you had any luck with your errors? I have the exact same issue and have tried multiple browsers. Yet if I click the link on the data file the invoice opens.


I tried many times, but same issue, sometimes it prompt "
Step name ‘Transform invoice image to HTML page (OCR)’ has failed. Reason: ‘Error parsing XPath expression (XPath = [//task/@status])!’"

no idea for the issue


I got the same issue both latest Control Tower and Workfusion Studio (2.0.3)
[ERROR] Error parsing XPath expression (XPath = [//task/@status])!


Does anybody know how to fix this issue:
Step name ‘Transform invoice image to HTML page (OCR)’ has failed. Reason: ‘Error parsing XPath expression (XPath = [//task/@status])!’

I get this error in the first step every time I try to run this process. Any help would be appreciated.