Call

Description

Make a call through a channel, or make a call to another action in this worker.

The call step type is designed around making a remote call through a channel. It can also be used to make a local call to the same worker.

The call is potentially confusing. The call itself is a block of JSON. But the invocation to the call method is also a block of JSON. So if you were to invoke call, the "data" request parameter might look something like this:

{
"action": "callSupplierToAnswerQuestion",
"role": "supplier",
"call": {
"action": "answerQuestion",
"question": "Please provide your Christmas closedown dates."
}
}

Some called methods (like set) do themselves have a data parameter, in which case there would be another "data" object (at the same level as "question").

There are more specialised call step types:

  • Send sends worker status and data, like a remote set.
  • Send process sends a request to create a process.

The call passes a data block. This is a merge of config.call and the "call" request parameter, the request parameter overriding the configuration properties.

The configuration parameters/request parameters available for Set when show is false are passed through the channel, together with an action property. The following properties are also available.

processIdentifier

The process identifier to which the call should be made. Defaults to the process identifier of the worker. Does not default for groups.

This is ignored for local calls.

call

Data object to pass through the call. Can contain any JSON.

Can be set in config or passed as a parameter. If both are passed, the passed parameter takes precedence.

For a local call, the properties in the call object are used as parameters for executing the action. Any properties that are objects or arrays are stringified.

remoteAction

The action which should be used at the remote end. This is used to create an action parameter in the call data, overwriting any existing action parameter.

Can be set in config or the the data parameter. You can use the permit config property to prevent the config remoteAction from being overwritten.

role

The role reference for the channel to which the data should be sent.

Can be set in config or the the data parameter.

If omitted or set to null, a call to the same worker is made.

responseAttribute Optional name of an attribute to which the call response data should be passed. Can be used in a subsequent step to query the response.
dataReference Optional reference of a data area to which the call response should be written. If not passed, response is not written to a data area.
fileData

Whether the response contains file data that should be localized (i.e. a copy made that is accessible to the caller). If dataReference is given, fileData is localized to the dataReference. If dataReference is not given, fileData is localized to temp.

If dataReference is given, fileData will overwrite like-named files, i.e. the response is assumed to have the definitive list of files and existing files can be overwritten if required.

If dataReference is not given, files will be written to temp. Because call runs under the owner's authority, the current user will not have authority on these. If call is to be run other than owner authority, you must specify a dataReference.

fileData would not normally be specified for a local call. But it can be.

remote

This has the same meaning as remote in set. It applies to the send itself, not the remotely-requested send. Setting this allow a channel partner to request a callback.

Can only be set in config.

permit

Same usage as set step, indicates which properties can be passed in the parameters. This supports processIdentifier, call, remoteAction, role, dataReferenceFrom and dataPropertyFrom.

Can only be set in config.

stateProperty

Name of a property in the response data that should be used to set the state. If not given, or the state property is not present, the state is not set (it defaults to "success").

ignoreError

If the call returns an error, don't set the application error fields.

Call supports runtime placeholders, which allow the call to be based on stored data.

Call can be used for workers or worker groups. When used with worker groups, the role is resolved from the group.

When called as a service, the <return> element of the response will contain the response.

Member Type List

Tab/SequenceWeightMember Type
Basic/
0
Basic/
0
Basic/description
0
Basic/tagList
0
Flow rules/flowRules
0

Set Tags

Tag List