Transaction System API

Socket

Provides functionality for making direct workflow calls to web workflow or a plugin.

Method Summary
Socket setAction(String action)

Action or the event.

Socket setController(CommonController controller)

Sets the current controller on this socket.

Socket setCookie(String name, String value)

For a web socket, sends a cookie with the call, as if the browser had it: the web workflow reads it with request.getCookie(name). Name cannot start with cp- or jsession. A null value removes the cookie from this socket.

Socket setCookies(Data cookies)

For a web socket, sends every name and value of the data as a cookie, see setCookie.

Socket setData(Data data)

Sets the data.

Socket setHeaders(Data headers)

For a web socket, this sets the given http headers.

Socket setJson(String json)

Sets json.

Socket setMethod(String method)

For a web socket, for example, this should be 'get' or 'post'.

Socket setPath(String path)

For a web socket, this sets the given path, e.g. /thepath.

Socket setPayload(Payload payload)

Sets the payload on this socket.

Socket setSessionValue(String name, String value)

For a web socket, gives the web workflow a session value to start with: it reads it with request.getSessionValue(name). Name cannot start with cp-. Name and value are limited to 200 characters. A null value removes the value from this socket. Each call to submit has its own session, nothing is carried over from a previous call.

Socket setSessionValues(Data values)

For a web socket, gives the web workflow every name and value of the data as a session value, see setSessionValue.

Socket setWorkflow(String workflow)

Workflow to run (web pal only).

SocketResponse submit()

Submits to the socket endpoint.

String toString()

Returns a description of this object.

Method Detail


Socket setAction(String action)

Action or the event.

Parameters:

  • String   action Required parameter.

Returns:  Socket

Since: 11-04-2023

top

Socket setController(CommonController controller)

Sets the current controller on this socket.

Parameters:

Returns:  Socket

Since: 04-16-2026

top

Socket setCookie(String name, String value)

For a web socket, sends a cookie with the call, as if the browser had it: the web workflow reads it with request.getCookie(name). Name cannot start with cp- or jsession. A null value removes the cookie from this socket.

Parameters:

  • String   name Required parameter.
  • String   value

Returns:  Socket

Since: 11-10-2026

top

Socket setCookies(Data cookies)

For a web socket, sends every name and value of the data as a cookie, see setCookie.

Parameters:

  • Data   cookies Required parameter.

Returns:  Socket

Since: 11-10-2026

top

Socket setData(Data data)

Sets the data.

Parameters:

  • Data   data Required parameter.

Returns:  Socket

Since: 11-04-2023

top

Socket setHeaders(Data headers)

For a web socket, this sets the given http headers.

Parameters:

  • Data   headers Required parameter.

Returns:  Socket

Since: 11-04-2023

top

Socket setJson(String json)

Sets json.

Parameters:

  • String   json Required parameter.

Returns:  Socket

Since: 11-04-2023

top

Socket setMethod(String method)

For a web socket, for example, this should be 'get' or 'post'.

Parameters:

  • String   method Required parameter.

Returns:  Socket

Since: 11-04-2023

top

Socket setPath(String path)

For a web socket, this sets the given path, e.g. /thepath.

Parameters:

  • String   path Required parameter.

Returns:  Socket

Since: 11-04-2023

top

Socket setPayload(Payload payload)

Sets the payload on this socket.

Parameters:

  • Payload   payload Required parameter.

Returns:  Socket

Since: 04-16-2026

top

Socket setSessionValue(String name, String value)

For a web socket, gives the web workflow a session value to start with: it reads it with request.getSessionValue(name). Name cannot start with cp-. Name and value are limited to 200 characters. A null value removes the value from this socket. Each call to submit has its own session, nothing is carried over from a previous call.

Parameters:

  • String   name Required parameter.
  • String   value

Returns:  Socket

Since: 11-10-2026

top

Socket setSessionValues(Data values)

For a web socket, gives the web workflow every name and value of the data as a session value, see setSessionValue.

Parameters:

  • Data   values Required parameter.

Returns:  Socket

Since: 11-10-2026

top

Socket setWorkflow(String workflow)

Workflow to run (web pal only).

Parameters:

  • String   workflow Required parameter.

Returns:  Socket

Since: 11-04-2023

top

SocketResponse submit()

Submits to the socket endpoint.

Returns:  SocketResponse

Since: 11-04-2023

top

String toString()

Returns a description of this object.

Returns:  String

Since: 11-04-2023

top
Copyright © 2006 - 2026, ContractPal, Inc. All rights reserved. API Date: Nov 10, 2026 09:54 AM