LSPS documentation logo
LSPS Documentation
Tasks

Core

CreateModelInstance

Creates a new model instance.

model : Model

Model to be instantiated.

properties : Map<String, String>

Map of model instance initialization properties. If null, an empty map is created in the instantiated model.

modelInstance : Reference<ModelInstance>

Reference to the created model instance. If the created model instance throws a runtime exception during its initialization, the referred slot is set to null.

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • ModelInstaniationError if the model instance did not start due to an internal initiation error, not due to a model interpretation error
TerminateModelInstance

Terminates a running model instance.

modelInstance : ModelInstance

Model instance to be terminated.

Throws:

  • NullParameterError if a mandatory parameter is not specified
DeleteModelInstanceLogs

Permanently removes process logs of the specified finished model instances from the database.

modelInstances : Set<ModelInstance>

A set of model instances of which logs are deleted.

Throws:

  • NullParameterError if mandatory parameter is null
  • ModelInstanceNotFinishedError if at least one of the specified model instances is not finished
Activate

(Re)activates an inactive or finished goal. If the goal is active, the task type does nothing.

goal : Goal

Goal to be (re)activated.

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • FinishedProcessInstanceError if the process instance of the activated goal is finished
Deactivate

Deactivates a not finished goal. If the goal is finished or the goal’s process is finished, the task type does nothing.

goal : Goal

Goal to be deactivated.

Throws:

  • NullParameterError if a mandatory parameter is not specified
RepeatGoals

Repeats a set of goals. In principle, this task type deactivates the specified achieve goals, then sets the slots with the desired values, and finally reactivates the goals.

goals : List<RepeatedGoal>

Goals to be repeated. A runtime exception is thrown when the list includes a pair of achieve goals from which one goal is a subgoal of the other. Another runtime exception is thrown when process instance of any of the repeated goals is terminated.

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • FinishedProcessInstanceError if the process instance of the activated goal is finished
  • ParentGoalError if the goals list includes a pair of goals from which one goal is a subgoal of the other
DeleteSharedRecords

Deletes the specified shared records and related (by data relationships) shared records from database.

data : Set<Object>

Set of shared records to delete.

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • IncompatibleTypeError if the data parameter contains an object which is not a shared record
  • RecordNotFoundError if the data parameter contains a shared record with incorrect reference to a database record
RemoveBinaryDataDEPRECATED

Permanently removes the specified binary data from the database.

handle : BinaryHandle

Binary handle pointing to the binary data to be removed. The fields of the handle are cleaned up as well (set to the default values).

Throws:

  • NullParameterError if a mandatory parameter is not specified
Lock

Creates a model instance-independent lock.

lockName : String

Name (identifier) of the lock.

message : String

Description of the lock.

result : Reference<Boolean>

If true, a new lock was successfully created. If false, a lock with the same name already exists.

existingMessage : Reference<String>

If the result is true, the value of the referred string is not changed. If the result is false, the value of the referred string is replaced with the message of an already existing lock with the same name.

Throws:

  • NullParameterError if a mandatory parameter is not specified
Unlock

Unlocks (removes) a previously created lock.

lockName : String

Name of the lock to be removed.

Throws:

  • NullParameterError if a mandatory parameter is not specified
ParseXmlDEPRECATED

Parses XML document to internal data structures.

xml : String

The XML document to parse.

output : Reference<Object>

Reference to a slot where the result is stored. The type of reference provided determines which object should be parsed from XML. The referred object must be record type, otherwise an exception is thrown.

useDefaultMapping : Boolean

If true, the default LSPS XML mapping is used. Otherwise, the meta- data defined on record types are taken into account when parsing XML. Parsing of types generated from XSD requires setting of this parameter to false. The default value is false.

typesNamespace : String

If the default mapping is used, this parameter determines XML namespace used for elements. If the default mapping is not used, this parameter is ignored. The default value is null.

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • IncompatibleTypeError if the type of the output is not record
  • UnableToParseXmlError if the specified xml cannot be parsed to output
ConvertToXmlDEPRECATED

Converts internal data structures to XML document.

object : Object

The object to be converted. It must be an instance of a record type, otherwise an exception is thrown.

output : Reference<String>

Reference to the variable where the output XML document is stored.

useDefaultMapping : Boolean

If true, the default LSPS XML mapping is used. Otherwise, the meta- data defined on record types are taken into account when creating XML. Creating XML from an object of which type was generated from XSD requires setting of this parameter to false. The default val- ue is false.

typesNamespace : String

If the default mapping is used, this parameter determines XML namespace used for elements. If the default mapping is not used, this parameter is ignored. The default value is null.

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • IncompatibleTypeError if the type of the object is not record
  • UnableToConvertToXmlError if an error occured during conversion
HttpCall

Request payload. Can be either String or Binary. All other objects are converted to String. String is converted to data stream honoring charset specified in the requestContentType parameter. If there is no charset specified, UTF-8 is used.

httpMethod : String

Type of the method to be performed. Possible values are “GET”, “POST”, “PUT”, and “DELETE”.

url : String

Endpoint address of the target HTTP service.

request : Object

Request payload. Can be either String or core::BinaryHandle. All other objects are converted to String. String is converted to data stream honoring charset specified in the requestContentType parameter. If there is no charset specified, UTF-8 is used. If core::BinaryHandle object is used, request payload will contain data from this handle.

requestContentType : String

Content type (MIME) of the request payload.

response : Reference<String>

Reference where the response payload is to be stored.

responseCode : Reference<Integer>

Reference to the response code.

login : String

Login for the HTTP BASIC authentication.

password : String

Password for the HTTP BASIC authentication.

readTimeout : Integer

Socket timeout for the call.

requestHeaders : Map<String, String>

Map of the request HTTP headers to be sent together with the request.

responseHeaders : Reference<Map<String, String>>

Reference to the map of the HTTP response headers.

isSynchronous : Boolean

If true, the task is executed synchronously in the context of process instance. If false or null, the task is executed asynchronously, outside of the process context.

Throws:

  • NullParameterError if mandatory parameter is null
  • HttpCallError if an error occured during the HTTP call
Log

Logs a specified message to the application log at the specified log level.

message : String

Message to be logged.

level : Integer

Log level. Unspecified level value logs at the “Info” level.

Throws:

  • NullParameterError if a mandatory parameter is not specified
AssignDEPRECATED

Writes values to slots.

slots : Map<Reference<Object>, Object>

Sets objects as values of slots, whereas the slots are being pointed to by reference. References to the changed slots are given by the keys and corresponding objects by the values. References in the slots map cannot be null.

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • IncompatibleTypeError if the type of an assigning value is not compatible with the type of the slot it is being assigned to
Execute

Executes the specified activity.

activity : Activity

Activity to execute.

Throws:

  • NullParameterError if a mandatory parameter is not specified
NoOperation
Task with no execution logic. It can be used for prototyping and logical structuring of BPMN process.