Apply FreeMarker
Start from http://freemarker.org/docs/dgui_quickstart_basics.html
- Overall
- Template + data-model = output
- The template at a glance
- Expressions
- Built-in Reference http://freemarker.org/docs/ref_builtins.html
WorkFusion Template Variables
Review Template variables
Use FreeMarker Test Tool
Online FreeMarker Template Tester http://freemarker-online.kenshoo.com/
Complex Manual Task example
- Upload files
- Validation. AJAX calls with jQuery, show results to worker
- external instructions in iFrame
Task Layouts and Embedding Media Content
Assignments
1. Practice FreeMarker built-ins
- Explore online FreeMarker user guide - http://freemarker.org/docs/
- Prepare
.CSVwith 5 columns and fill 1 row with data- In WorkFusion create Manual Task and use .CSV as input data
- Using FreeMarker build-ins output all 5 fields as HTML table (do NOT use TASK DESIGNER, work in CODE EDITOR mode). I.e. put data into HTML table. Make HTML table headers out of UPPER CASE variable names. WorkFusion injects into FreeMarker variable with all input data: **question.data **Use #list build-in to iterate through question.data

2. Advanced Task Design and Media Content Embedding
Input: scanned invoices (pdf), html invoices, invoice id.
1st step: Detect invoice language and is it WorkFusion related or not. Input = pdf invoices

- Use Bootstrap styles and controls
- Create a custom layout: show records as tabs (block size > 1)
- Show PDF invoice on the left
- Show answers on the right
- (optional)
- show video player in Instructions section – any video file
- make an AJAX request to some open API (weather, Wikipedia, news) and display a response
Rule: if invoice is not WF related, go to end. Otherwise, go to Step #2.
2nd step: Extract information from invoice (use groups for products table). Input = html invoices
- Display instructions in an iframe https://pub_demo.s3.amazonaws.com/ie-help/index.html.
- Display answers from previous step.