Versions Compared

Key

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

...

Use the functions below to control the workflow state from APL or to retrieve values from the workflow table.

abort

Stops the workflow, and logs a user defined message to the System Log.

...

Note
titleNote!

The only APL code to be executed after an abort call is the deinitialize function block.

cancelBatch

Emits a Cancel Batch that aborts the processing of the current batch and possibly continues with the next file (depending on the Workflow Configuration).

...

ParameterDescription

message

A message (of type error), which is logged to the System Log when the batch is cancelled

errorUDR

It is possible to send an error UDR containing any useful information to the ECS where the batch is sent (if configured to do so). Note that an error UDR may be defined from the Workflow Properties dialog as well. In this case, the APL code overrules the window configuration.

This parameter is optional.

Returns

Nothing

dynamicFieldGet

Retrieves the stated dynamic field from the workflow table. The returned value can either be a boolean, an integer, or a string. The fields are configured in the Dynamic Fields tab in the Workflow Properties.

...

ParameterDescription
category The dynamic field's category
nameThe name of the dynamic field
ReturnsThe value of the selected dynamic field

hintEndBatch
Anchor
hintEndBatch
hintEndBatch

Large input files can be split into smaller output files using hintEndBatch. The function will send an End Batch message to the other agents in the workflow, possibly causing a split of the current batch being processed. How each agent acts upon such a request can be found out in the respective user's guide; in the Transaction Behavior section. If the workflow does not contain any agent capable of acting upon the request, the workflow will abort.

...

Note
titleNote!

A split batch cannot be sent to ECS. Calling cancelBatch after hintEndBatch, will result in workflow abort. However, the original batch can be sent to ECS to make sure to evaluate if the batch will be canceled before it is split.

sleep

Puts the current thread to sleep a given number of milliseconds before resuming execution. This is mostly used for simulation, for instance traffic shaping or limiting number of calls towards an external system.

...

ParameterDescription

milliseconds

Number of milliseconds the current thread will sleep before resuming execution.

Returns

Nothing

wfStop

Stops a running workflow.  wfStop produces a single stop signal and does not wait for the workflow to stop. If it succeeds in stopping the workflow, the stop is registered in the System Log.

...