Workflow Maintenance

See the workflow console for additional workflow administration tools and descriptions of possible workflow instance statuses.

Operations

listRunningWorkflowsPerModel

Lists the number of workflow instances that are running for each workflow model.

Arguments: none

Returned value: Tabular data containing the Count and ModelId columns.

listCompletedWorkflowsPerModel

Lists the number of completed workflow instances for each workflow model.

Arguments: none

Returned value: Tabular data containing the Count and ModelId columns.

returnWorkflowQueueInfo

Lists information about workflow items that have been processed and that are queued for processing.

Arguments: none

Returned value: Tablular data containing the following columns:

Jobs

Queue Name

Active Jobs

Average Processing Time

Average Waiting Time

Cancelled Jobs

Failed Jobs

Finished Jobs

Processed Jobs

Queued Jobs

returnWorkflowJobTopicInfo

Lists processing information for workflow jobs, organized by topic.

Arguments: none

Returned value: Tabular data containing the following columns:

Topic Name

Average Processing Time

Average Waiting Time

Cancelled Jobs

Failed Jobs

Finished Jobs

Processed Jobs

returnFailedWorkflowCount

Shows the number of workflow instances that have failed. You can specify a workflow model to query or retrieve information for all workflow models.

Arguments:

model: The ID of the model to query. To see a count of failed workflow instances for all workflow models, specify no value. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Returned value: The number of failed workflow instances.

returnFailedWorkflowCountPerModel

Shows the number of workflow instances that have failed for each workflow model.

Terminate workflow instances that have failed. You can terminate all failed instances or only the failed instances for a specific model. Optionally you can restart the instances after they are terminated. You can also test the operation to see the results without actually performing the operation.

Arguments:

Restart the instance: (Optional) Specify a value of true to restart the instances after they are terminated. The default value of false causes no restarting of terminated workflow instances.

Dry run: (Optional) Specify a value of true to see the results of the operation without actually performing the operation. The default value of false causes the operation to be performed.

Model: (Optional) The ID of the model to which the operation is applied. Specify no model to apply the operation to the failed instances of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Returned value: Tablular data about the instances that are terminated, containing the following columns:

Initiator

InstanceId

ModelId

Payload

StartComment

WorkflowTitle

retryFailedWorkItems

Attempts to execute work item steps that have failed. You can retry all failed work items or only the failed work items for a specific workflow model. You optionally test the operation to see the results without actually performing the operation.

Arguments:

Dry run: (Optional) Specify a value of true to see the results of the operation without actually performing the operation. The default value of false causes the operation to be performed.

Model: (Optional) The ID of the model to which the operation is applied. Specify no model to apply the operation to the failed work items of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Returned value: Tablular data about the failed work items that are retried, including the following columns:

Initiator

InstanceId

ModelId

Payload

StartComment

WorkflowTitle

PurgeActive

Removes active workflow instances of a specific age. You can purge active instances for all models or only the instances for a specific model. You can optionally test the operation to see the results without actually performing the operation.

Arguments:

Model: (Optional) The ID of the model to which the operation is applied. Specify no model to apply the operation to the workflow instances of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Number of days since workflow started: The age of the workflow instances to purge, in days.

Dry run: (Optional) Specify a value of true to see the results of the operation without actually performing the operation. The default value of false causes the operation to be performed.

Returned value: Tabular data about the active workflow instances that are purged, including the following columns:

Initiator

InstanceId

ModelId

Payload

StartComment

WorkflowTitle

countStaleWorkflows

Returns the number of workflow instances that are stale. You can retrieve the number of stale instances for all workflow models or for a specific model.

Arguments:

Model: (Optional) The ID of the model to which the operation is applied. Specify no model to apply the operation to the workflow instances of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Returned value: The number of stale workflow instances.

restartStaleWorkflows

Restarts stale workflow instances. You can restart all stale instances or only the stale instances for a specific model. You can also test the operation to see the results without actually performing the operation.

Arguments:

Model: (Optional) The ID of the model to which the operation is applied. Specify no model to apply the operation to the stale instances of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Dry run: (Optional) Specify a value of true to see the results of the operation without actually performing the operation. The default value of false causes the operation to be performed.

Returned value: A list of workflow instances that are restarted.

fetchModelList

Lists all workflow models.

Arguments: none

Returned value: Tablular data that identifies the workflow models including the ModelId and ModelName columns.

countRunningWorkflows

Returns the number of workflow instances that are running. You can retrieve the number of running instances for all workflow models or for a specific model.

Arguments:

Model: (Optional) The ID of the model for which the number of running instances is returned. Specify no model to return the number of running instances of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Returned value: The number of running workflow instances.

countCompletedWorkflows

Returns the number of workflow instances that are completed. You can retrieve the number of completed instances for all workflow models or for a specific model.

Arguments:

Model: (Optional) The ID of the model for which the number of completed instances is returned. Specify no model to return the number of completed instances of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Returned value: The number of completed workflow instances.

purgeCompleted

Removes records of completed workflows of a specific age from the repository. Use this operation periodically to minimize the size of the repository when you make heavy use of workflows. You can purge completed instances for all models or only the instances for a specific model. You can optionally test the operation to see the results without actually performing the operation.

Arguments:

Model: (Optional) The ID of the model to which the operation is applied. Specify no model to apply the operation to the workflow instances of all workflow models. The ID is the path to the model node, for example /etc/workflow/models/dam/update_asset/jcr:content/model.

Number of days since workflow has been completed: The number of days that the workflow instances have been in the completed state.

Dry run: (Optional) Specify a value of true to see the results of the operation without actually performing the operation. The default value of false causes the operation to be performed.

Returned value: Tabular data about the completed workflow instances that are purged, including the following columns:

Initiator

InstanceId

ModelId

Payload

StartComment

WorkflowTitle

Repository

Information about the CRX repository

Domain: com.adobe.granite

Type: Repository

Attributes

Name

The name of the JCR repository implementation. Read-only.

Version

The repository implementation version. Read-only.

HomeDir

The directory where the repository is located. The default location is <QuickStart_Jar_Location>/crx-quickstart/repository. Read-only.

CustomerName

The name of the customer that the software license is issued to. Read-only.

LicenseKey

The unique license key for this installation of the repository. Read-only.

AvailableDiskSpace

The disk space that is available to this instance of the repository, in Mbytes. Read-only.

MaximumNumberOfOpenFiles

The number of files that can be opened at one time. Read-only.

SessionTracker

The value of the crx.debug.sessions system variable. true indicates a debug session. false indicates a normal session. Read/write.

Descriptors

A set of key-value pairs that represent repository properties. All properties are read-only.

Key

Value

options.node.and.property.with.same.name.supported

Indicates whether a node and a property of the node can have the same name. true indicates same names are supported, false indicates it is not supported.

identifier.stability

Indicates the stability of non-referenceable node identifiers. The following values are possible:

Indicates whether you can override the inherited property or child node definition of a node type. true indicates overrides are supported, and false indicates no overrides.

option.observation.supported

true indicates that asynchronous observation of repository changes is supported. Support of asynchronous observation enables applications to recieve and respond to notifications about each change as they occur.

query.jcrscore

true indicates indicates that the jcr:score pseudo-property is available in XPath and SQL queries that include a jcrfn:contains (in XPath) or CONTAINS (in SQL) function to perform a full-text search.

option.simple.versioning.supported

true indicates that the repository supports simple versioning. With simple versioning, the repository maintains a sequential series of versions of a node.

option.workspace.management.supported

true indicates that the repository supports the creation and deletion of workspaces using APIs.

option.update.mixin.node.types.supported

true indicates that the repository supports the addition and removal of mixin node types of an existing node.

node.type.management.primary.item.name.supported

true indicates that the repository enables node definitions to contain a primary item as a child. A primary item is accessible using the API without knowing the item name.

level.2.supported

true indicates that both LEVEL_1_SUPPORTED and OPTION_XML_IMPORT_SUPPORTED are true.

true indicates that the repository supports both configurations and baselines.

option.shareable.nodes.supported

true indicates the repository supports the creation of shareable nodes.

crx.cluster.id

The identifier of the repository cluster.

query.stored.queries.supported

true indicates that the repository supports stored queries.

query.full.text.search.supported

true indicates that the repository supports full-text search.

node.type.management.inheritance

Indicates the level of repository support for node type inheritance. The following values are possible:

node.type.management.inheritance.minimal: Registration of primary node types is limited to those that have only nt:base as a supertype. Registration of mixin node types is limited to those with no supertype.

node.type.management.inheritance.single: Registration of primary node types is limited to those with one supertype. Registration of mixin node types is limited to those with at most one supertype.

node.type.management.inheritance.multiple: Primary node types can be registered with one or more supertypes. Mixin node types can be registered with zero or more supertypes.

crx.cluster.preferredMaster

true indicates that this cluster node is the preferred master of the cluster.

true indicates the repository supports sibling nodes (nodes with the same parent) with the same names.

node.type.management.residual.definitions.supported

true indicates the repository supports name properties with residual definitions. When supported, the name attribute of an item definition can be an asterisk ("*").

node.type.management.autocreated.definitions.supported

true indicates the repository supports the automatic creation of child items (nodes or properties) of a node when the node is created.

crx.cluster.master

true indicates this repository node is the master node of the cluster.

level.1.supported

true indicates that option.xml.export.support is true and query.languages is of non-zero length.

option.unfiled.content.supported

true indicates the repository supports unfiled content. Unfiled nodes are not part of the repository hierarchy.

jcr.specification.name

The name of the JCR specification that the repository implements.

option.versioning.supported

true indicates the repository supports full versioning.

jcr.repository.name

The name of the repository.

option.locking.supported

true indicates the repository supports the locking of nodes. Locking enables a user to temporarily prevent other users from making changes.

jcr.repository.version.display

option.activities.supported

true indicates the repository supports activities. Activities are a a set of changes that are performed in a workspace that are merged into another workspace.

node.type.management.multivalued.properties.supported

true indicates the repository supports node properties that can have zero or more values.

option.retention.supported

true indicates the repository supports the use of external retention management applications to apply retention policies to content and supports hold and release.

option.lifecycle.supported

true indicates the repository supports lifecycle management.

WorkspaceNames

The names of the workspaces in the repository. Read-only.

DataStoreGarbageCollectionDelay

The amount of time in milliseconds that garbage collection sleeps after scanning every tenth node. Read/write.

BackupDelay

The amount of time in milliseconds that the backup process sleeps between each step of the backup. Read/write.

BackupInProgress

A value of true indicates that a backup process is executing. Read-only.

BackupProgress

For the current backup, the percentage of all files that have been backed up. Read-only.

CurrentBackupTarget

For the current backup, the ZIP file where backup files are being stored.When a backup is not in progress, no value appears. Read-only.

BackupWasSuccessful

A value of true indicates that no errors have occurred during the current backup, or no backup is in progress. false indicates an error occurred during the current backup. Read-only.

BackupResult

The status of the current backup. The following values are possible:

Backup in progress: A backup is currently executing.

Backup canceled: The backup has been cancelled.

Backup finished with error: An error occurred during the backup. The error message provides information about the cause.

Backup completed: The backup was successful.

No backup executed so far: There is no backup in progress.

Read-only.

TarOptimizationRunningSince

The time at which the current TAR file optimization process began. Read-only.

TarOptimizationDelay

The amount of time in milliseconds that the TAR optimization process sleeps between each step of the process. Read/write.

ClusterProperties

A set of key-value pairs that represent cluster properties and values. Each row in the table represents a cluster property. Read-only.

ClusterNodes

The members of the repository cluster.

ClusterId

The identifier of this repository cluster. Read-only.

ClusterMasterId

The identifier of the master node of this repository cluster. Read-only.

ClusterNodeId

The identifier of this node of the repository cluster. Read-only.

Operations

createWorkspace

Creates a workspace in this repository.

Arguments:

name: A String value that represents the name of the new workspace.

Returned value: none

runDataStoreGarbageCollection

Executes garbage collection on the repository nodes.

Arguments:

delete: A Boolean value that indicates whether to delete unused repository items. A value of true causes the deletion of unused nodes and properties. A value of false causes all nodes to be scanned but none are deleted.

target: (Optional) A String value that represents the name of the ZIP file or directory in which to archive the repository data. To use a ZIP file, Include the ZIP file name extension. To use a directory, include no file name extension.

To perform an incremental backup, specify the directory that was previously used for the backup.

You can specify an absolute or a relative path. Relative paths are relative to the parent of the crx-quickstart directory.

When you specify no value, the default value of backup-currentdate.zip is used, where currentdate is in the format yyyyMMdd-HHmm.

Returned value: none

cancelBackup

Stops the current backup process and deletes the temporary archive that the process created for archiving data.

Arguments: none

Returned value: none

blockRepositoryWrites

Blocks changes to the repository data. All repository backup listeners are notified of the block.

Arguments: none

Returned value: none

unblockRepositoryWrites

Removes the block from the repository. All repository backup listeners are notified of the block removal.

Arguments: none

Returned value: none

startTarOptimization

Starts the TAR file optimization process using the default value for tarOptimizationDelay.

Arguments: none

Returned value: none

stopTarOptimization

Stops TAR file optimization.

Arguments: none

Returned value: none

tarIndexMerge

Merges the top index files of all TAR sets. Top index files are files with different major versions. For example, the following files are merged into the file index_3_1.tar: index_1_1.tar, index_2_0.tar, index_3_0.tar. The files that have been merged are deleted (in the previous example, index_1_1.tar, index_2_0.tar, and index_3_0.tar are deleted).

Arguments:

background: A Boolean value that indicates whether to run the operation in the background so that the Web Console is usable during execution. A value of true runs the operation in the background.

Returned value: none

becomeClusterMaster

Sets this repository node as the master node of the cluster. If not already master, this command stops the current master instance's listener and starts a master listener on the current node. This node is then set as the master node and restarts, causing all slave nodes to connect to this instance.

Arguments: none

Returned value: none

joinCluster

Adds this repository to a cluster as a slave node. You must provide a user name and password for authentication purposes. The connection uses basic authentication. The security credentials are base-64 encoded before being sent to the server.

Arguments:

master: A string value that represents the IP address or computer name of the computer that runs the master repository node.

Repository Statistics (TimeSeries)

The value of the TimeSeries field for each statistic type that org.apache.jackrabbit.api.stats.RepositoryStatistics defines.

Domain: com.adobe.granite

Type: TimeSeries

Name: One of the following values from the org.apache.jackrabbit.api.stats.RepositoryStatistics.Type Enum class:

BUNDLE_CACHE_ACCESS_COUNTER

BUNDLE_CACHE_MISS_AVERAGE

BUNDLE_CACHE_MISS_COUNTER

BUNDLE_CACHE_MISS_DURATION

BUNDLE_CACHE_SIZE_COUNTER

BUNDLE_COUNTER

BUNDLE_READ_COUNTER

BUNDLE_WRITE_AVERAGE

BUNDLE_WRITE_COUNTER

BUNDLE_WRITE_DURATION

BUNDLE_WS_SIZE_COUNTER

QUERY_AVERAGE

QUERY_COUNT

QUERY_DURATION

SESSION_COUNT

SESSION_LOGIN_COUNTER

SESSION_READ_AVERAGE

SESSION_READ_COUNTER

SESSION_READ_DURATION

SESSION_WRITE_AVERAGE

SESSION_WRITE_COUNTER

SESSION_WRITE_DURATION

Attributes

The following attributes are provided for each statistic type that is reported:

ValuePerSecond: The measured value per second over the last minute. Read-only.

ValuePerMinute: The measured value per minute over the last hour. Read-only.

ValuePerHour: The measured value per hour over the last week. Read-only.

ValuePerWeek: The measured value per week over the last three years. Read-only.

Repository Query Stats

Statistical information about repository queries.

Domain: com.adobe.granite

Type: QueryStat

Attributes

SlowQueries

Information about the repository queries that have taken the longest time to complete. Read-only.

SlowQueriesQueueSize

The maximum number of queries to include in the SlowQueries list. Read-write.

PopularQueries

Information about the repository queries that have occurred the most. Read-only.

PopularQueriesQueueSize

The maximum number of queries in the PopularQueries list. Read-write.

Operations

clearSlowQueriesQueue

Removes all queries from the SlowQueries list.

Arguments: none

Returned value: none

clearPopularQueriesQueue

Removes all queries from the PopularQueries list.

Arguments: none

Returned value: none

Replication Agents

Monitor the services for each replication agent. When you create a replication agent, the service automatically appears in the JMX console.

Domain: com.adobe.granite.replication

Type: agent

Name: no value

Properties: {id="Name"}, where Name is the value of the agent Name property.

Attributes

Id

A String value that represents the identifier of the replication agent configuration. Multiple agents can use the same configuration. Read-only.

Valid

A boolean value that indicates whether the agent is configured correctly:

true: Valid configuration.

false : The configuration contains errors.

Read-only.

Enabled

A boolean value that indicates whether the agent is enabled:

true: Enabled.

false: Disabled.

QueueBlocked

A boolean value that indicates whether the queue exists and is blocked:

true: Blocked. An automatic retry is pending.

false: Not blocked or does not exist.

Read-only.

QueuePaused

A boolean value that indicates whether the job queue is paused:

true: Paused (suspended)

false: Not paused or does not exist.

Read-write.

QueueNumEntries

An int value that represents the number of jobs in the agent queue. Read-only.

QueueStatusTime

A Date value that indicates the time on the server when the displayed status values were obtained. The value corresponds with the time that the page was loaded. Read-only.

QueueNextRetryTime

For blocked queues, a Date value that indicates when the next automatic retry occurs. When no time appears, the queue is not blocked. Read-only.

QueueProcessingSince

A Date value that indicates when processing began for the current job. When no time appears, the queue is either blocked or idle. Read-only.

QueueLastProcessTime

A Date value that indicates when the previous job was completed. Read-only.

Operations

queueForceRetry

For blocked queues, issues the retry command to the queue.

Arguments: none

Returned value: none

queueClear

Removes all jobs from the queue.

Arguments: none

Returned value: none

Sling Engine

Provides statistics about HTTP requests so that you can monitor the performance of the SlingRequestProcessor service.

Domain: org.apache.sling

Type: engine

Properties: {service=RequestProcessor}

Attributes

RequestsCount

The number of requests that have occurred since the statistics were last reset.

MinRequestDurationMsec

The shortest amount of time (in milliseconds) that was required to process a request since the statistics were last reset.

MaxRequestDuratioMsec

The longest amount of time (in milliseconds) that was required to process a request since the statistics were last reset.

StandardDeviationDurationMsec

The standard deviation of the amount of time that was required to process requests. The standard deviation is calculated using all requests since the statistics were last reset.

MeanRequestDurationMsec

The mean amount of time that was required to process a request. The mean is calculated using all requests since the statistics were last reset

Operations

resetStatistics

Sets all statistics to zero. Reset the statistics when you need to analyze request processing performance during a specific time frame.

Arguments: none

Returned value: none

Package Manager

Information about all packages that Package Manager contains.

Domain: com.adobe.granite.packaging

Type: manager

Attributes

Each row in the table represents a package in Package Manager. The column headings are package properties. Read-only.

id

The String representation of the package ID.

installed

A boolean value that indicates whether the package is installed:

true: Installed.

false: Not installed.

installedBy

The ID of the user who last installed the package.

installedDate

The date when the package was last installed.

size

A long value that holds the size of the package in bytes.

Quickstart Launcher

Information about the startup process and the Quickstart launcher.

Domain: com.adobe.granite.quickstart

Type: Launcher

Operations

log

Displays a message in the QuickStart window.

Arguments:

p1: A String value that represents the message to display. The following illustration shows the result of invoking log with a p1 value of this is a log message.

Returned value: none

startupFinished

Calls the startupFinished method of the server launcher. The method attempts to open the Welcome page in a web browser.

Arguments: none

Returned value: none

startupProgress

Sets the completion value of the server startup process. The progress bar on the QuickStart window represents the completion value.

Arguments:

p1: A Float value that represents how much of the startup process is complete, as a fraction. The value should be between zero and one. For example, 0.3 indicates 30% complete.

Returned value: none.

Third-Party Services

Several third-party server resources install MBeans that expose attributes and operations to the JMX console. The following table lists the third-party resources and provides links to more information.

Using the JMX Console

The JMX Console displays information about several services that are running on the server:

Attributes: Service properties such as configurations or runtime data. Attributes can be read-only or read-write.

Operations: Commands that you can invoke on the service.

MBeans that are deployed with an OSGi service expose service attributes and operations to the console. The MBean determines the attributes and operations that are exposed, and whether the attributes are read-only or read-write.

The main page of the JMX console includes a table of services. Each row in the table represents a service that is exposed by an MBean.

Click a cell value for a service to see the attributes and operations for the service.

To change an attribute value, click the value, specify the value in the dialog box that appears, and click Save.

To invoke a service operation, click the operation name, specify argument values in the dialog box that appears, and click Invoke.

Using External JMX Applications for Monitoring

CRX allows external applications to interact with Managed Beans (MBeans) via Java Management Extensions (JMX). Using generic consoles such as JConsole or domain-specific monitoring applications, allows getting and setting CRX configurations and properties, as well as the monitoring of performance and resource usage.

Using JConsole to connect to CRX

In order to connect to CRX using JConsole, follow these steps:

Open a terminal window.

Enter the following command:

jconsole

JConsole will start and the JConsole window will appear.

Connecting to a local CRX process

JConsole will display a list of local Java Virtual Machine processes. The list will contain two quickstart processes. Select the quickstart "CHILD" process from the list of local processes (usually the one with the higher PID).

Connecting to a remote CRX process

In order to connect to a remote CRX process, the JVM that hosts the remote CRX process will need to be enabled to accept remote JMX connections.

To enable remote JMX connections, the following system property must be set when starting the JVM:

com.sun.management.jmxremote.port=portNum

In the property above, portNum is the port number through which you want to enable JMX RMI connections. Be sure to specify an unused port number. In addition to publishing an RMI connector for local access, setting this property publishes an additional RMI connector in a private read-only registry at the specified port using a well known name, "jmxrmi".

By default, when you enable the JMX agent for remote monitoring, it uses password authentication based on a password file that needs to be specified using the following system property when starting the Java VM:

Using the MBeans provided by CRX

After connecting to the quickstart process, JConsole provides a range of general monitoring tools for the JVM that CRX is running in.

In order to access CRX's internal monitoring and configuration options, go to the MBeans tab, and from the hierarchical content tree on the left, select the Attributes or Operations section that you are interested in. For example the com.adobe.granite/Repository/Operations section.

Within that section, select the desired attribute or operation in the left pane.