Service Tasks

A service task is a step in a business process that the engine executes automatically, without human intervention. CityScreen Deals provides a catalog of built-in services that a service task can call — creating records, updating entities, sending emails, and more.

The guided side panel for a service task lets you pick a service and an action, and the editor auto-fills the required and optional input parameters.

Entity services

Entity services operate on CityScreen Deals business records. Each service corresponds to one entity type and exposes a set of actions.

Service Available actions Notes

Customer

update, get, search, list

Customer records are created in the Customers section.

Counterparty

create, update, get, search, list

Directory

create, update, get, search, list

Operates on records of any directory entity type the administrator has defined.

Document

create, update, get, search, list

Operates on records of any document entity type the administrator has defined.

Digital Display

create, update, get, search, list

Printed Display

create, update, get, search, list

What this page describes is the mechanism. The specific kinds — document types, fields, statuses — are defined for your organization; yours may differ. See the entity system.

Input parameters

When you select a service and an action, the editor fills in the required input parameters automatically. Each parameter has a name, a type, and a description.

For actions that write data (create, update), input parameters include the entity’s custom fields. These are referenced by their machine name using the prefix variableValues. — for example, variableValues.contractNumber to set a custom field called contractNumber.

The values come from process variables. Set them in an earlier step of the process (a script task, a previous service task’s output, or a user task form) so they are available when the service task runs.

Output parameters

Output parameters let you capture the result of a service task and store it as a process variable for use in later steps. For example, after creating a document, you can capture the new document’s identifier.

Email Documents

The Email Documents action is separate from the entity services. It renders one or more documents from their templates and sends the result by email.

Email Documents appears under the "Deals services" category in the service picker.

The input parameters specify which documents to render, the recipient addresses, and the email subject and body. If the email cannot be sent — for example, because the mail server is unreachable — the engine records an incident on the service task.

Deal state changes

To change a deal’s stage from a process, use an expression on a process element. The expression is set in the generic properties panel and requires familiarity with the expression syntax.