Component

Components are the building blocks of process modules. Components define the processes and status rules that run in the process client plus the services that can be called from the process client.

Components are grouped together into group profiles, which describe the functionality of different types of group (folder) in the process client. Component can be included in worker templates as a source of worker process definitions and status rules. The overall process module definition is then created from a list of group profiles.

Component methods

A process module component is a very loose concept. In its simplest form, a component is a node that when included using application.require() returns an object with some standard methods.

getContext()
Return the process component node.
getName()
Return the name of the process component.
getReference()
Return a reference for the process component. References are unique within a process module.
getWorkerProcessDefinition()
Return worker process definition.
getWorkerStatusRules()
Return worker status rules.
getGroupProcessDefinition()
Return group process definition.
getGroupStatusRules()
Return group status rules.
getControlProcessDefinition()
Return the control process definition supported by this module.
runRequest()

Optional method, required if the component is to be called as a service.

Respond to an incoming request encoded as data in the "requestData" attribute. Return a response as an object (not a JSON string), or set the application error.

Calls to the control process' "service" action are forwarded to the runRequest() method. See Process module service for details of this call.

Components can have other methods called from the above methods, particularly to 

Script component

The Script Component type can be used to create a component using a script. The Component Script can be used as the base for the script.

Process component

The Process Component type can be used to create a component from one or more of the following:

  • Process definitions for the control process
  • Process definitions for workers
  • Status rules for workers
  • Process definitions for groups
  • Status rules for groups

It supports placeholder replacement, allowing the process definitions and status rules to be parametised as required.

Process model component

A Process model can be converted into a component to be included into other components or group profiles, using the Process Model Component type.

The granularity of components is different from that of process models, and the process model component must specify which parts of the process model to include in the component. This involves mapping a role to each of the component process types (worker, process and control).

The component can also provide options which override the process-level properties of the process model, and bindings which apply to the process model.