Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JS7 offers an API for jobs that are executed in the Agent's Java Virtual Machine:

...

ObjectPurpose
js7StepThe built-in object js7Step provides a number of methods
AreaMethodArgumentReturn Value
ArgumentgetAllArgumentsn/a[object[]] arguments

getAllArgumentsAsNameValueMapn/a[map] argumentMap

getAllDeclaredArgumentsn/a[object[]] arguments

getDeclaredArgument[string] argumentName[object] argument

getDeclaredArgumentValue[string] argumentName[string|int|bool] argumentValue

getJobResourcesArgumentsAsNameDetailValueMapn/a[map] arguments

getOrderArgumentsAsNameValueMapn/a[map] arguments
JobgetAgentIdtn/a[string] agentId

getJobEnvironmentn/a[object] jobEnvironment

getJobEnvironment().getJobKeyn/a[string] jobKey

getJobEnvironment().getEncodingn/a[string] encoding

getJobEnvironment()..getDeclaredArgumentsn/a[object[]] jobArguments

getJobInstructionLabeln/a[string] label

getJobNamen/a[string] jobName

getControllerIdn/a[string] controllerId

getOrderIdn/a[string] orderId

getWorkflowNamen/a[string] workflowName

getWorkflowPositionn/a[string] position

getWorkflowVersionIdn/a[string] versionId
OutcomegetLastFailedOutcomesn/a[object[]] outcomes

getLastSucceededOutcomesn/a[object[]] outcomes

getOutcomen/a

[object] outcome


getOutcome().putVariable[string] name,
[string|int|bool] value
n/a
UtilitygetLogger()[string] messagen/a

...

  • Users implement a class for arguments with an arbitrary name that creates objects for declared arguments.
  • Users instantiate the class for arguments in their JS7Job class implementation.

...

ConstructorArgumentExplanation
js7.JobArgument()

[string] argumentName

Specifies the name of the argument from a string. Argument names are case-sensitive.

[bool] isRequiredOptionally specifies if the argument is required. If required and the argument is not declared with the workflow and no default value is provided then an error will be raised.

[string|int|bool] defaultValueOptionally specifies a default value using one of the indicated data types.

[enum] displayModeOptionally specifies the js7.DisplayMode.MASKED enumeration value that prevents argument values from being logged.

...