Static Util Objects

Functions

configurePromiseUI(type, converterFn)

Registers a converter function that converts the generic result data based on types originating from a given generic java-type or GraphQL type.

Parameters

NameTypeDescription
typeStringFully qualified generic type or GraphQL type to register the option converter for
converterFnFunctionoptions converter converting instance of the type to react-toastify options



equalsScalar(scalarType, a, b)

Returns true when the given scalar values are equal. The equality rules are scalar type dependent. Many scalar types use instance equality ( === ), while e.g. the Date based types compare time stamps.

Parameters

NameTypeDescription
scalarTypeStringscalar type name
a*scalar value a
b*scalar value b

getCurrentProcess()

Returns the current top-level process.

Return Value

Type: Process

the current process on top


getGenericType(typeName)

Looks up the generic type the type with the given name is based on.

Parameters

NameTypeDescription
typeNameStringtype name

Return Value

Type: String | null

full qualified generic type name or null


getWireFormat()

Returns the wireFormat instance created by the system (or tests)

Return Value

Type: WireFormat

wire format


graphql(params, params.query, params.variables, params.autoConvert)

GraphQL query service. Executes the given GraphQL query with the given variables. By default it will automatically perform a wire format conversions. The variables are converted from Javascript format to the current wire format and the result received is being converted from wire format to Javascript. You can pass in a param `autoConvert: false` to disable that behavior.

Parameters

NameTypeDescription
paramsObjectParameters
params.queryStringquery string
params.variablesObjectquery variables
params.autoConvertObjectif false, don't convert input and result ( default is true)

mapIterator(map)

Calls the given callback once for every entry in a ES6 Map and return all return values as array

Parameters

NameTypeDescription
mapMapinput map

openDialog(renderFn)

Opens a dialog using the given render function. The render function receives a dialog API object with which the rendered content can control the dialog.

Parameters

NameTypeDescription
renderFnFunctionrender function ( dialog => react element )

pickSchemaTypes(inputSchema, typeNames)

Filters a raw input schema JSON structure to only include the types reachable by a given list of type names as starting points.

Parameters

NameTypeDescription
inputSchemaobjectinputSchema or other object containing a "schema" and a "meta" property.
typeNamesArray<String>types to start at. Queries and Mutations can be referenced by prefixing the method name with "q:" or "m:" (e.g. "q:iQueryFoo")

printSchema(schema, newLine)

Renders a human-readable GraphQL schema from a JSON schema introspection including the automaton-specific additions.

Parameters

NameTypeDescription
schemaObject(automaton) schema data
newLineStringnewLine to use

promiseUI(promise)

Wrapper for GraphQL-data promises that renders UI messages/"toasts" for a given promise. Allows for control of messages by registering option converter functions for generic types.

Parameters

NameTypeDescription
promisePromisepromise, usually a graphql query

registerCustomFilter(name, filterFn)

Register new filter alias

Parameters

NameTypeDescription
nameStringfilter alias
filterFnfunction | Stringfilter function or name to be executed if filter is applied

registerCustomFilterRenderer(name, filterFn)

Register new filter renderer alias

Parameters

NameTypeDescription
nameStringfilter renderer alias
filterFnfunction | Stringfilter renderer function or name to be executed if filterRenderer is applied

registerFKSelectorFilterAndRenderer(name, query, rootType, sourceName, modalTitle, valueFieldName)

Register a filter renderer for an FKSelector

Parameters

NameTypeDescription
nameStringfilter renderer alias
queryObjectthe query used for the FKSelector
rootTypeStringthe table that the FKSelector works on
sourceNameStringpath of the FKSelector inside the table
modalTitleStringtitle of the FKSelectorModal
valueFieldNameStringthe value of the FKSelector table used by the filter


shutdown()

Deregisters the necessary handlers and shuts down the running automaton app.


startup(ctx, processImporter, initial, initFn)

Entry point to the automaton client-side process engine

Parameters

NameTypeDescription
ctx------require.context with all domain .js files
processImporterfunctiondynamic import process loader (name => module )
initialObjectinitial data pushed from server
initFnFunctioninit callback

Return Value

Type: ReactElement

initial component output



uri(location)

Formats a local URI with path patterns and parameters.

Parameters

NameTypeDescription
locationStringlocal location e.g. "/app/process/{name}"