CaseFabric Reference Guide

CaseFabric Reference Guide

  • Overview
  • Getting Started
  • CMMN
  • CaseFabric IDE
  • CaseFabric Engine
  • Extensions
  • API Reference
  • Releases

›CaseFabric IDE

Overview

  • CaseFabric
  • A short introduction
  • Product Overview

Getting Started

  • Introducing CaseFabric Demo
  • Generic UI
  • How to use task UI rendering
  • Two business applications
  • Obtaining CaseFabric Demo

Some CMMN

  • What is CMMN
  • Modelling the Case Plan
  • Modelling the Case File
  • Modelling the Case Team
  • Other things to model

CaseFabric IDE

  • An IDE?
  • Designing
  • Tasks and Parameters
  • Expressions
  • Deploying
  • Debugging

CaseFabric Engine

  • The CaseFabric Engine
  • Authentication
  • Authorization
  • Pictorial overview
  • Configuration
  • Logging
  • Repository

Extensions

  • Do we need extensions?
  • Fault Handling
  • Workflow
  • Business Identifiers

API Reference

  • Introducing the API
  • Joining the platform
  • Start a Case
  • Case Team membership
  • Executing the case
  • Retrieving cases and tasks
  • Casefile requests

Releases

  • Overview
  • 1.1.34
  • 1.1.33
  • 1.1.32
  • 1.1.31
  • 1.1.30
  • 1.1.29
  • 1.1.28
  • 1.1.27
  • 1.1.26
  • 1.1.25
  • 1.1.24
  • 1.1.23
  • 1.1.22
  • 1.1.21
  • 1.1.20
  • 1.1.19
  • 1.1.18
  • 1.1.17
  • 1.1.16
  • 1.1.15
  • 1.1.14
  • 1.1.13
  • 1.1.12
  • 1.1.11
  • 1.1.10
  • 1.1.9
  • 1.1.8
  • 1.1.7
  • 1.1.6
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0

Expressions

This section explains how to use expressions inside CaseFabric.

CMMN Expressions

CMMN supports expressions in many different places of the case model. It however is not very explicit about the actual implementation, other than specifying the expression language and the expression body. The body must be a String. Some expressions must result in a Boolean value.

Image

Default language

Each expression inside a case model needs a different language. But, as we can read in the above snippet of the CMMN 1.1 version, the language can take a default from the overall definition. Inside the CaseFabric IDE this can be set at the case level properties.

Image

CaseFabric Expressions - Pick the language of choice

The CaseFabric engine has been designed for openness. This goes into the veins of the product, including the level of the expression language. The engine ships with a number of languages - but the default language of choice is spel the Spring Expression Language

For handling REST services responses in Process Tasks, the Jayway JsonPath is a better match, as it has shorter filtering notations. json is the attribute value to set on these expressions.

Spring Expression Language (SPEL)

Spring.io comes with a powerful expression language. CaseFabric exposes the benefits of this language as the default in case models.

Case model expressions

Expressions can be used in the following places of a case model

  • Tasks (see also parameter-mapping)
  • Entry and exit criteria - if only
  • Item control - repeat & require
  • Planning - Applicability rules
  • Timer expressions
  • Workflow assignment and due dates

Image

Expression Context

In quite a few occasions, the context of the expression is required as an input parameter to the expression. CaseFabric provides a rich API to use detailed case information inside expressions. This section describes the properties and methods available.

Root Object

In each expression a number of fixed properties and methods is available at the root level.

NameDescription
caseThe current case at hand
userThe current tenant user context
map(...)A method to create a map of <key, value> pairs. This is typically used in task output mappings.
list(...)A method to create a list of objects, also for use in the output mappings, to create a structure that matches the target Case File Item for update or replace.

For item control rules (repeat, required), criterion if parts and applicability rules the following additional root properties are available.

NameDescription
taskIf the rule is defined on a task
stageIf the rule is defined on a stage
milestoneIf the rule is on a milestone
timerIf the rule is on a timer event listener
caseFileItemA reference to the case file item passed in the context (see also CaseFileItemAPI)
[name]A named reference to the value of the case file item passed in the context. E.g., in the Helloworld example above, Greeting directly refers to the Case File Item value, enabling access to the To property.

Case API

This section describes the properties and methods available on the root case object.

NameDescription
planThe case plan, see Case Plan API
fileA reference to the Case File, which enables access by name, e.g. case.file.Greeting returns the value of the Greeting case file item
teamThe case team, see Case Team API
idThe case instance identifier
nameThe name of the case definition
tenantThe name of the tenant in which the case instance is running
parentIf the case is a sub case, this refers to the identifier of the parent case
rootIf the case is a sub case, this refers to the identifier of the root case

Case Plan API

Tasks, Stages, Milestones and Events all have the following properties

NameDescription
idThe identifier of the item
nameThe name of the item
indexThe index of the item, for usage when the item has a repetition rule defined
stateThe current state of the item
stageThe stage in which the item is created

Additional Stage Properties

NameDescription
itemsA list of all items currently created in the stage. This list is accessible by name. It can also be used to e.g. count the number of items currently created in the stage
[item_name]all items inside the stage are directly accessible by name. Note that for a repeating item, the name based accessor returns a list of all created items with that name

Additional Task Properties

NameDescription
inputA name based map with all task implementation input parameters, i.e. the parameters as passed into the task's implementation

Case Team API

Every case instance has it's own team with members. The Case Team API enables access to the team.

Note: this is an experimental API, which may be subject to change

NameDescription
membersA list of all members in the team. Note that this can be both tenant users and tenant roles.
usersA list of all members of type user
ownersA list of all members that are case owner
rolesA list of all case role names
role.[role_name]A container to access a specific case role and the members that are assigned to that role

User API

The root level user property exposes the current user's id, and, if registered in the system, name, email address and tenant roles.

NameDescription
idThe user id
nameOptional user name
emailOptional email address of the user
rolesA set with the roles of the user within the tenant in which this case is running. Note these is not the roles that the user has within the case
← Tasks and ParametersDeploying →
  • CMMN Expressions
    • Default language
  • CaseFabric Expressions - Pick the language of choice
    • Spring Expression Language (SPEL)
    • Case model expressions
  • Expression Context
    • Root Object
    • Case API
    • Case Plan API
    • Case Team API
    • User API