SCXML Workflow Definition
Overview
SCXML workflow definitions in Bloomreach Content are stored in the repository under the SCXMLRegistry module configuration at the following path:
/hippo:configuration/hippo:modules/scxmlregistry/hippo:moduleconfig/hipposcxml:definitions
This location uses the following namespace and node type definitions:
<'hipposcxml'='http://www.onehippo.org/jcr/hipposcxml/nt/1.0'>
<'nt'='http://www.jcp.org/jcr/nt/1.0'>
[hipposcxml:action] > nt:base
- hipposcxml:classname (string) mandatory
- hipposcxml:namespace (string) mandatory
[hipposcxml:scxml] > nt:base
- hipposcxml:source (string) mandatory
+ * (hipposcxml:action) = hipposcxml:action
[hipposcxml:definitions] > nt:base
+ * (hipposcxml:scxml) = hipposcxml:scxml
Structure of SCXML Workflow Definitions
You can define multiple SCXML workflows using the hipposcxml:scxml node type. Each workflow is identified by its node name.
Each SCXML definition contains:
- A
hipposcxml:sourceproperty with the XML document source as a string. - Optional
hipposcxml:actionchild nodes for custom actions referenced within the SCXML document.
Custom actions are referenced by both their node name and the namespace specified in the hipposcxml:namespace property. You must declare this namespace with the appropriate prefix in the SCXML document.
The implementation class for each action is specified in the hipposcxml:classname property. This value must be the fully qualified class name of a class that extends org.apache.commons.scxml2.model.Action from Apache Commons SCXML.
Bloomreach provides base classes for workflow-related actions, such as:
org.onehippo.repository.scxml.AbstractActionorg.onehippo.repository.scxml.AbstractWorkflowTaskAction
For details on implementing or extending SCXML workflow actions, see SCXML Workflow Actions and Tasks.
SCXMLRegistry Behavior
The org.onehippo.repository.scxml.SCXMLRegistry is a repository module registered as a service in the HippoServiceRegistry. It monitors its repository configuration path for changes.
When a change is detected, the registry reloads and validates all configured SCXML workflow definitions using the Apache Commons SCXML engine.
- If validation succeeds, the new definitions replace the previous versions.
- If validation fails for any definition, the registry retains the last valid version (if available).
This automatic reloading is intended for development environments. Do not rely on it for production use.
Note: Validation during loading checks only the SCXML document structure. It does not guarantee that the state machine is functionally or technically correct.