Test Contexts
How to initialize documents, process and document properties
In a Test Method you create and provide all the necessary information that is needed in the script. The Test Method creates the ScriptContext
(see Concepts) and passes it to the script.
def context = new ProcessScriptContext(
inputDocuments: [
Document.fromText('''
{
"firstname" : "Walter",
"lastname" : "Schmidt"
}''')
],
dynProcPros: [
DPP_Prop01: "2024",
])
_testScript.run(context)
The Script Context Properties
The ScriptContext
has the following properties:
public List<ProcessExecutionProperties> processCallChain;
public Map dynProcPros;
public Map procPros;
public final Map executionProperties;
// additional, ProcessScriptContext, only, properties
public List<Document> inputDocuments;
public final List<Document> outputDocuments;
See in the following chapter how to set and pass a content to a Process Script.
Documents and Dynamic Document Properties
Dynamic Process Properties
Process Properties
Process Properties need a little bit more effort. You need to provide
the Process Property Component Id (
b91d87a4-7e8b-4a98-8ea8-a85e32bb5677
) andthe Process Property Value Key (
fcc4749d-5135-4eaa-a9cf-1b2ddc1ad12
)
Process Property Ids are system independent. This means, these IDs won't change even if you copy or export process properties to a different account. The Ids remain the same!
Last updated