This is the first major feature release since June of 2016. It focuses on greater power in Scripts, but also includes a significant change to workflow processing as well. Our goal with this release is to provide even greater power to power users. The version 10 Reference Persona takes these features and makes them easy to use for the “more casual” user.
Note: We skipped version 4.5 because of a significant issue found late in the testing cycle. Version 4.5.1 is the first release in the 4.5 series provided to end-users … in case you’re worried you missed it. 🙂
There are so many updates in this release that in order to keep track of them myself, I’ve had to order the issues numerically below rather than by order of importance which has been the case before. One result of that is that some of the descriptions below don’t make much sense until you read further. Another issue is you might get bored before you get to the good stuff. Sorry about that – I recommend you read this entire post.
RF-1 Script Utilities
There are now additional utility objects available to scripts and templates. The list of utilities will expand in later releases, so find the up-to-date list HERE.
RF-2 Add Script as a Filter type
In defining a new Filter you will now see the option to use a Script as a Filter. The result of script execution is evaluated as a number and the number used in the comparison defined for the Filter. For example, you might create a script that returned a random number and use that result in a comparison to route the document to two different workflows. See a more detailed description of this feature HERE.
RF-3 Remove Plagiarism from Filter setup
This feature was not useful as it was never completely integrated into the Filter framework. It is now removed and a script utility (RF-1) added to provide the same and better support. See the documentation for RF-1.
RF-7 Allow setting of (some) document meta-data
To use custom meta-data fields (RF-20) requires the ability to get and set their values from scripts. We also have the need to modify some standard document properties as well. This update allows both. The document properties that can be modified are title and description. The name field is the document’s unique identifier so it must be read-only and the optional feedItemUrl has special significance so it has been made read-only as well. For a complete list of the variables, objects, and methods available to scripts see HERE.
RF-13(a) Asynchronous Workflow execution
This is a particularly involved change. In prior versions of ResultFlow, a long chain of workflow rules could fail at an early workflow rule because of a error in a downstream rule. This is because the entire chain of rules was being executed in a single transaction that would either commit or rollback as a unit. The user visible result of this is that it was very tedious to find workflow errors in complex processes. The point of observed failure could be many steps upstream of the actual problem.
This is no longer the case. Now a document will “come to rest” in the folder where the offending workflow rule is attached.
RF-13(b) Asynchronous ‘Run Workflows’ button
This is not a separate feature – it is just a separately observable outcome of asynchronous workflow execution. When pressing the ‘Run Workflows’ button, you will no longer see the workflows started immediately, because they don’t start immediately. The start command is sent but you will need to do a page refresh to see the workflows. Moreover, if you are starting a large number of flows – say 50 or more – it may take several seconds to start them all.
RF-14 Allow entering blanks in document source editor
The blank character could not be entered into a document using the source editor. This is fixed with an upgrade to TinyMCE.
RF-15 Remove ‘action’ selection on Filter workflow
Prior versions of ResultFlow allowed both ‘move’ and ‘copy’, but ‘move’ is now the only option so this selection control has been removed and ‘move’ always used.
RF-16 Change ‘Delete Workflows’ to ‘Cancel Workflows’
On the ‘Selected Items’ menu, the Delete option for removing files was easily confused with the ‘Delete Workflows’ option – with very much unwanted results! To keep this more clear, the ‘Delete Workflows’ item is now named ‘Cancel Workflows’,
RF-17 Refactor template processing and organize context names
This is mostly an internal change but with one significant user visible improvement and that is the deprecation of ‘sourcedoc’ and ‘originaldoc’ in HIT templates. Those other names are still supported, but they always point to the same document as ‘doc’ which is now the preferred variable name for use in all scripts and templates.
RF-19 Remove script type from Script creation dialog
At some point we may support an alternative to Freemarker, but since there is currently just the one choice, the dropdown selection control has been removed.
RF-20 Create custom meta-data fields on documents
In addition to the standard meta-data fields such as name, description, and feedItemUrl, you now have access to 10 general purpose fields attached to each document. They are named custom1 – custom10 and will accept any string value up to about 20,000 characters in length. Just like the other meta-data fields, these too are retained with the document as it is processed through workflows. An example use of these additional fields is to add data at the start of a workflow that is used following the workflow to route the result to one of several venues. This allows in some cases a single workflow to service multiple venues. They are also critical to the new features introduced in version 10 of the Reference Persona where we use custom1-custom6 in the process of building a Rich Summary. For the list of functions used in scripts to get and set these custom properties, see HERE.
RF-21 Support HTML HITs in T2 workflows
There are actually three kinds of MTurk HITs and ResultFlow has historically used the original XML-based version that is as old as MTurk itself. Those are still supported, and in very limited cases even required, but we also now fully support HTML-based HIT templates, which are far easier to create and modify, plus far more powerful as well. The newly updated Reference Persona (now version 10) is changed to use HTML HITs throughout.
RF-23 Script access to Persona properties
Currently there are just three properties attached to the Persona, but this will expand in later releases to provide replacement values in scripts that can be set in one place and used throughout the Persona. See HERE for the scripting syntax and list of properties.
RF-24 Custom variables not working in script workflow
Internal changes related to custom document variables.
RF-25 Remove script time-out thread
In prior releases, the Script workflow executed its script in a thread with a deadman-timer to protect against “runaway scripts.” This actually turns out to be a non-issue and (important to this release) it created complications regarding custom document properties.
Moreover, there are now three other places we run scripts without this protection, so we’ve removed it here too.
RF-26 Cleanup workflow menu
The workflow selection menu is now reduced to the ones that both work and make sense. In a couple cases they are removed because they are simply special cases of a more general workflow. These include both AbstractEngine and ContentMill – which, by the way, are the oldest of our workflows! – because they are both just Processor workflows with different instructions. Any instances of the workflows I’ve removed will continue to work, you just can’t make more, so if you are using these deprecated flows, please let us know at support so we can help you transition to a Processor with the right instructions.
RF-27 Fix footer support link
The support link pointed at a domain we no longer use – it now emails support as it should.
RF-28 Change help link
We have phased out our previous documentation platform and are using instead this blog so the help link now points here.
RF-30 Preserve (most) custom metadata through MTurk flows
The MTurk workflows were not preserving anything except title and description. This is now changed and they will preserve everything on the input document except the feed aspect values. In a later release, we will remove that restriction as well, but the version 9 Reference Persona makes use of this “bug” so we’ve retained it for now.
RF-31 Allow MTurk rejection filters access to the assignment
Answer templates get an object named assignments that is the array of approved assignments. Similarly, a script used as a filter in an MTurk workflow is provided an assignment object that is the (single) assignment being filtered. See HERE for details.
RF-35 Duplicate Filter
You can now duplicate a Filter definition in the same way you can duplicate an MTurk HIT definition.
RF-46 T2 rejection filter incorrectly implemented
The MTurk filters all include an optional rejection filter. In all cases they were working, but the T2 workflow was implemented in a way that included a long delay in processing the automated rejection. This is now fixed so that the automated rejection will respond as soon as the HIT is processed by ResultFlow. This will be noticeable – and important! – if you are doing sandbox testing of HITs. In all other respects, it is an internal change only.
P324 Select document for Script Test button not functioning
When “all” of the file/folder selection controls were fixed, this one was missed. It is now fixed as well.
Known Issues
Workflows will not always transition to the error state when there are template or script issues. There are variations of this problem, but here is a demonstration of the most common – a bad HIT template: https://cl.ly/2R452X1T1Q46
Fixes for all of these cases are in work and expected in the 4.5.1 release.
The MTurk definition form looks for question names in the XML-style HIT templates. That functionality is not supported for HTML HIT templates and the form does not currently check for the HIT format, so when selecting one of the new HTML HIT templates for an MTurk HIT definition you will see this error popup:
This is irritating but non-harmful. Just ignore it and move on.
Leave a Reply