Activiti & Activiti Cloud Developers Guide
  • Introduction
  • Overview
    • 12 Factor Apps
    • Personas
    • Previous Versions (5.x & 6.x)
    • References
    • Cloud Native BPMN support
    • BPMN Comformance
      • BPMN Comformance Set 0
      • BPMN Comformance Set 1
      • BPMN Comformance Set 2
      • BPMN Comformance Set 3
      • BPMN Comformance Set 4
      • BPMN Comformance Set 5
      • BPMN Comformance Set 6
  • Getting Started
    • Getting Started - Activiti Cloud
      • Amazon EKS
      • Google Cloud GKE
      • Docker Compose
      • Jenkins X
        • Amazon EKS
        • Google GKE
    • Getting Started - Activiti Core
  • Components
    • Spring Cloud
    • Activiti Cloud Infrastructure
      • Gateway
      • Identity Management / Single Sign On
    • Activiti Cloud Application
      • Activiti Cloud Runtime Bundle
      • Activiti Cloud Connectors
      • Activiti Cloud Query Service
      • Activiti Cloud Audit Service
      • Activiti Cloud Notification Service
  • FAQs
    • Activiti Core FAQs
    • Activiti Cloud FAQs
  • BluePrints
    • Trending Topic Campaigns
  • Community
    • Roadmap
    • Repositories
    • Contributing
  • Releases
    • 8.2.0
    • 8.1.0
    • 8.0.0
    • 7.11.0
    • 7.10.0
    • 7.9.0
    • 7.8.0
    • 7.7.0
    • 7.6.0
    • 7.5.0
    • 7.4.0
    • 7.3.0
    • 7.2.0
    • 7.1.0-M17
    • 7.1.0-M16
    • 7.1.0-M15
    • 7.1.0-M14
    • 7.1.0-M13
    • 7.1.0-M12
    • 7.1.0-M11
    • 7.1.0-M10
    • 7.1.0-M9
    • 7.1.0-M8
    • 7.1.0-M7
    • 7.1.0.M6
    • 7.1.0 M5
    • 7.1.0 M4
    • 7.1.0 M3
    • 7.1.0 M2
    • 7.1.0 M1
    • 7.0.0 SR1
    • 7.0.0 GA
    • 7.0.0 RC1
    • 7.0.0 Beta5
    • 7.0.0 Beta4
    • 7.0.0 Beta3
    • 7.0.0 Beta2
    • 7.0.0 Beta1
    • 7.0.0 Early Access 201802
    • 7.0.0 Early Access 201801
    • 7.0.0 Early Access 201712
    • 7.0.0 Early Access 201711
    • 7.0.0 Early Access 201710
    • 7.0.0 Early Access 201709
Powered by GitBook
On this page
  • REST APIs (HAL)
  • (Async) Command Based Interactions
  • Message Enabled
  • Not covered Yet
  • Runtime Bundle Data Types
  • Requirements
  • Security
  • Source Code & Docker Image
  1. Components
  2. Activiti Cloud Application

Activiti Cloud Runtime Bundle

PreviousActiviti Cloud ApplicationNextActiviti Cloud Connectors

Last updated 1 year ago

Runtime Bundle is the Cloud version of the Process Engine. If you ever exposed Activiti (the process engine) as a service, you were defining a Runtime Bundle.

But there are some extra things that you need to know about Runtime Bundles:

  • Runtime Bundles in the context of Activiti Cloud represent a stateless instance of the process engine which is in charge of executing an immutable set of process definitions.

  • You cannot deploy new process definitions to a Runtime Bundle, instead you will create a new immutable version of your Runtime Bundle if you want to update your process definitions.

  • Runtime Bundles expose a (Sync) REST and (Async) Message Based API to interact with them.

  • Runtime Bundles emit events (in a fire & forget fashion) using a set of implementations of the internal interface. (Listen to the internal Process Engine events and transform them into messages containing )

  • Runtime Bundles, by default when executing Service Tasks (BPMN), will emit Integration Events to perform System to System integration. These Integration Events will be picked up by Activiti Cloud Connectors to perform system to system integrations.

REST APIs (HAL)

Runtime Bundles expose a REST API with the following user (ACTIVITI_USER role) endpoints:

Also the following admin (ACTIVITI_ADMIN role) endpoints:

(Async) Command Based Interactions

Process Related Payloads:

    • id

    • processDefinitionId

    • processDefinitionKey

    • processInstanceName

    • businessKey

    • variables [Map]

    • id

    • processDefinitionId

    • id

    • processDefinitionId

    • id

    • name

    • variables

    • id

    • processInstanceId

    • variables [Map]

    • localOnly

    • id

    • processInstanceId

    • id

    • processInstanceId

    Task Related Payloads:

    • id

    • taskId

    • assignee

    • id

    • taskId

    • id

    • taskId

    • variables [Map]

    • id

    • taskId

    • variables [Map]

    • id

    • taskId

    • id

    • taskId

    • taskName

    • description

    • dueDate

    • priority

    • assignee

Message Enabled

By design a Runtime Bundle is enabled to consume and produce (async) messages. This is achieved by using Spring Cloud Streams to consume Commands operations or emit Events representing the internal process engine operations.

Notice that a Runtime Bundle, by design, doesn't have WebSockets/Push Notifications built in.

Not covered Yet

  • ActivityCompensateEvent

  • ProcessCompletedErrorEvent

Runtime Bundle Data Types

Runtime Bundles work and expose the following data types which are based on the new Java Core API model packages:

And the Cloud Extension types:

Requirements

Runtime Bundles then require the following list of infrastructural services:

  • SSO / IDM service for handling Security and User/Groups resolutions

  • Message Broker to emit and consume messages

  • Database to store the state of the process instances and tasks

Security

In addition to authorization at endpoint-level provided through an external authorization system (and in the case of Keycloak configured in a properties file), individual process definitions (and implicitly process instances) within a runtime bundle can have ACLs applied. These are applied via a properties file using a format such as:

activiti.cloud.security.user.testuser.runtime-bundle.policy.read=process_pool1,ProcessWithVariables
activiti.cloud.security.group.hr.runtime-bundle.policy.write=process_pool1,ProcessWithVariables,SimpleProcess,ProcessWithVariables2,ProcessWithBoundarySignal

Or environment variables can be used such as:

ACTIVITI_CLOUD_SECURITY_USER_HRUSER_RBMYAPP_POLICY_WRITE=SimpleProcess ACTIVITI_CLOUD_SECURITY_GROUP_HR_RBMYAPP_POLICY_WRITE=SimpleProcess ACTIVITI_CLOUD_SECURITY_GROUP_TESTGROUP_RBMYAPP_POLICY_WRITE=*

Source Code & Docker Image

Commands are defined as Payloads in the new . These Payloads contains information to execute different actions implemented inside the process engine and they will return a Result if the execution generated data. When these Commands are executed by the Message Endpoints the results will be sent to a different queue.

These commands are processed by the which delegate the operation to more specific

Commands Payloads (implements )

Events are emitted by the process engine using a message queue so external components can react to them. All these events implements the interface.

The events related with BPMN Activities can be found in the Java Core API module.

We have shared events for Variables related operations and can be found here (also as part of the Java Core API )

The events related with Process Runtime can be found here (also as part of the Java Core API )

The events related with Tasks can be found here (also as part of the Java Core API )

Here you can find a Runtime Bundle example that you can use as the starting point to build your domain specific Runtime Bundles. This project was built using the .

v1/process-definitions
v1/process-definition/{id}/meta
v1/process-instances/
v1/process-instances/{id}/tasks
v1/process-instances/{id}/variables
v1/tasks
v1/tasks/{id}/variables
admin/v1/process-definitions/
admin/v1/process-instances
admin/v1/tasks
Java Core API layer
CommandEndpoint
Executors for each Command
Payload
StartProcessPayLoad
SuspendProcessPayload
ResumeProcessPayload
SignalPayload
SetProcessVariables
DeleteProcessPayload
RemoveProcessVariablesPayload
ClaimTaskPayload
ReleaseTaskPayload
CompleteTaskPayload
SetTaskVariablePayload
DeleteTaskPayload
UpdateTaskPayload
org.activiti.services.core.model.events.ProcessEngineEvent
activiti-api-process-model
BPMNActivityStartedEvent
BPMNActivityCompletedEvent
BPMNActivityCancelledEvent
SequenceFlowEvent
activiti-api-model-shared
VariableCreatedEvent
VariableUpdatedEvent
VariableDeletedEvent
activiti-api-process-runtime
ProcessStartedEvent
ProcessCompletedEvent
ProcessCancelledEvent
ProcessResumedEvent
ProcessSuspendedEvent
ProcessCreatedEvent
activiti-api-task-runtime
TaskCreatedEvent
TaskAssignedEvent
TaskCompletedEvent
TaskSuspendedEvent
TaskSuspendedEvent
TaskActivatedEvent
TaskCandidateGroupAddedEvent
TaskCandidateGroupRemovedEvent
TaskCandidateUserAddedEvent
TaskCandidateUserRemovedEvent
activiti-api-model-shared
activiti-api-process-model
activiti-api-task-model
activiti-cloud-api-model-shared
activiti-cloud-api-process-model
activiti-cloud-api-task-model
Runtime Bundle -> Source Code
Runtime Bundle Starter that you can find here
Runtime Bundle -> Docker Image
ActivitiEventListener
all the events generated inside a transaction