JBoss.orgCommunity Documentation

DTGov Guide

1. Introduction to DTGov
1.1. Design Time Governance
1.2. Use Cases
2. Getting Started
2.1. Prerequisites
2.2. Download, Installation and Configuration
2.3. Check your Installation
2.4. Get to Work
3. Configuring DTGov
3.1. Overview
3.2. Back-End Configuration
3.3. Back-End Configuration Properties
3.4. User Interface (UI) Configuration
3.5. UI Configuration Properties
3.6. Configuring UI Deployment Stages
3.7. Configuring UI Deployment Types
4. DTGov and S-RAMP
4.1. Overview
4.2. Configuration Properties
4.3. Authentication
5. Governance Workflows
5.1. Overview
5.2. Creating Workflows
5.3. Deploying Workflows
5.4. DTGov Supporting Services
5.5. Query Configuration
6. Governance Human Tasks
6.1. Overview
6.2. Customizing the Task API
7. Deployment Management
7.1. Overview
7.2. Invoking the Deployment Service
7.3. Configuring Deployment Targets
7.4. Undeployment

First, we recommend you download the following:

Next, you must follow these steps to install and configure the application:

  1. Unpack S-RAMP distribution
  2. Copy the EAP download into the unpacked S-RAMP distro
  3. Copy the ModeShape distribution into the unpacked S-RAMP distro
  4. Run the S-RAMP installer
  5. Unpack the DTGov distribution
  6. Move the "target" folder from the S-RAMP distro to the unpacked DTGov distro
  7. Copy the EAP download into the unpacked DTGov distro
  8. Run the DTGov installer
  9. Start JBoss
  10. Populate the S-RAMP repository with DTGov seed data (ontology + workflow jar)

Some psuedo-shell code that might help

mkdir ~/overlord
cd ~/overlord
# Download JBoss EAP 6.1 (jboss-eap-6.1.0.zip)
#    From - http://www.jboss.org/jbossas/downloads
# Download the ModeShape EAP distro (modeshape-3.2.0.Final-jbosseap-61-dist.zip)
#    From - http://www.jboss.org/modeshape/downloads/downloads3-2-0-final.html
# Download S-RAMP distribution (s-ramp-0.3.0.Final.zip)
#    From - http://www.jboss.org/overlord/downloads/sramp
unzip s-ramp-0.3.0.Final.zip
cp jboss-eap-6.1.0.zip s-ramp-0.3.0.Final
cp modeshape-3.2.0.Final-jbosseap-61-dist.zip s-ramp-0.3.0.Final
cd s-ramp-0.3.0.Final
ant install
cd ..
mv s-ramp-0.3.0.Final/target dtgov-1.0.0.Final
cp jboss-eap-6.1.0.zip dtgov-1.0.0.Final
cd dtgov-1.0.0.Final
ant install
# Start JBoss (target/jboss-eap-6.1/bin/standalone.sh) - wait for startup to complete
ant seed
cd data
mvn package

It’s all installed, running, and checked? Now it’s time to use the software! This guide will explain advanced configuration and usage, but you can get started by logging in to the DTGov User Interface:

http://localhost:8080/dtgov-ui (admin/overlord)

It’s likely that users will need to customize the system based on their organization’s specific work processes. The Configuring and Governance Workflows chapters should be helpful in describing how to customize the system.

# S-RAMP API connection endpoint
# What kind of authentication to use (class name)
# Only used when the provider is basic auth
# Only used when the provider is SAML bearer token auth
# Whether to validate the S-RAMP connection

# Task API connection endpoint
# Implementation of a task client
# Authentication to use when invoking the task API
# Only used when using basic auth
# Only used when using saml bearer token auth

# Deployment lifecycle base classifier
# Classifier to use when querying for all deployments
# This next one is a prefix for any property that will indicate a possible classifier stage that
# should be displayed in the UI.  In the dtgov ui configuration file, multiple properties would
# be specified that begin with this prefix and have a value of the format  {label}:{classifier}
# And another one that is a prefix for any property that will indicate a possible deployment type
# that should be displayed in the UI.  In the dtgov ui configuration file, multiple properties would
# be specified that begin with this prefix and have a value of the format  {label}:{type}

# S-RAMP UI integration properties

In particular, the dtgov-ui.deployment-lifecycle.classifiers.stage and dtgov-ui.deployment-lifecycle.types properties require further explanation. See the following sections for details.

A number of configuration properties drive the integration between DTGov and S-RAMP. In particular note that the DTGov back-end and the DTGov User Interface each have their own separate configuration. This is because the back-end and UI are separate applications that can be independently deployed.

DTGov Back-End Configuration

# S-RAMP Connection details

DTGov User Interface Configuration

# S-RAMP API connection endpoint

Here is an example of how the back-end configuration might look:


The above configuration uses BASIC authentication when connecting to the S-RAMP repository. It will connect to S-RAMP on localhost (port 8080).

The user interface configuration might look something like this:


The above configuration connects to S-RAMP on localhost (port 8080) and uses SAML bearer token authentication.

All of the workflows and supporting files (images, task forms, etc) should be bundled together into a KIE archive. A KIE archive is simply a JAR with a particular structure assumed by jBPM. For example, your archive file structure might look something like this:


What are all these files?

The kmodule.xml file is a jBPM artifact (it makes this a Kie Archive rather than just a plain old JAR file). This file should have the following content:

<?xml version="1.0" encoding="UTF-8"?>
<kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://jboss.org/kie/6.0.0/kmodule" >
    <kbase name="SRAMPPackage">
        <ksession name="ksessionSRAMP"/>

Next, there is a folder in the archive that maps to the kbase element found in the kmodule.xml file. This folder contains all of the business process resources, primarily the BPMN2 files. There is a file called HttpClientWorkDefinitions.wid which contains the custom work items used by Governance Workflows. It might look something like this:

import org.drools.process.core.datatype.impl.type.StringDataType;
  // the HttpClient work item
    "name" : "HttpClientDeploy",
    "parameters" : [
      "Url" : new StringDataType(),
      "Method" : new StringDataType(),
      "Uuid" : new StringDataType(),
      "Target" : new StringDataType()
    "displayName" : "Deploy",
    "icon" : "run-build-install.png",

  // the HttpClient work item
    "name" : "HttpClientNotify",
    "parameters" : [
      "Url" : new StringDataType(),
      "DTGovUrl" : new StringDataType(),
      "Method" : new StringDataType(),
      "Uuid" : new StringDataType(),
      "Target" : new StringDataType(),
      "Group" : new StringDataType(),
    "displayName" : "Notify",
    "icon" : "audio-input-microphone-3.png",

  // the HttpClient work item
    "name" : "HttpClientUpdateMetaData",
    "parameters" : [
      "Url" : new StringDataType(),
      "Method" : new StringDataType(),
      "Name" : new StringDataType(),
      "Value" : new StringDataType(),
      "Uuid" : new StringDataType(),
    "displayName" : "UpdateMetaData",
    "icon" : "user-properties.png",

This file also refers to some images files (useful for BPMN editors) which are also included in the package.

Once the workflows are built, they must be deployed into the S-RAMP repository so that the embedded version of jBPM can find them properly. It is recommended that the S-RAMP maven integration is used to do this. The best way is to put all of the business process resouces into a simple JAR style maven project. Then use the S-RAMP maven integration to mvn deploy the project directly into S-RAMP. Please see the Overlord: S-RAMP documentation for details on how this works. The result should be that your Governance workflow JAR (Kie Archive) is uploaded to the S-RAMP repository, complete with relevant maven properties set.

The embedded jBPM engine will pick up the Governance Workflows by pulling the Kie Archive out of the S-RAMP repository and using the content it finds within. It’s worth noting that the maven information of the Kie Archive can be configured in the DTGov back end configuration file (dtgov.properties). The following properties control exactly what Kie Archive artifact the embedded jBPM engine will grab from S-RAMP:


Currently the only way to trigger the execution of a Governance Workflow is by configuring an S-RAMP query that will be used to monitor the S-RAMP repository for interesting changes. When changes are discovered, a new instance of the configured workflow is created and invoked. This section of the guide describes how to configure these query triggers.

All query triggers are defined in the Governance configuration file (dtgov.properties). The following is an example of this configuration:


In the above example, two queries have been configured. The first is a query that will trigger the EARLifeCycle process whenever an EAR artifact is added to the repository. Note that only EAR artifacts added from Maven are targetted. The process will be passed two parameters:

  1. DeploymentUrl
  2. NotificationUrl

The second query will trigger the NewSchemaReview process whenever a new XML Schema document is added to the repository. This process will be passed two parameters:

  1. NotificationUrl
  2. UpdateMetaDataUrl

Invoking the Deployment Service from a Governance Workflow should be a simple matter of using the HttpClientDeploy task defined in the HttpClientWorkDefinitions.wid file as described in the Governance Workflows chapter of this guide. Within a BPMN2 process, the XML markup might look something like this:

<bpmn2:task id="Task_1" drools:taskName="HttpClientDeploy" drools:displayName="Deploy" drools:icon="run-build-install.png" name="Deploy to DEV">
  <bpmn2:ioSpecification id="_InputOutputSpecification_10">
    <bpmn2:dataInput id="_DataInput_47" itemSubjectRef="__NameInputItem" name="Url"/>
    <bpmn2:dataInput id="_DataInput_48" itemSubjectRef="__NameInputItem" name="Method"/>
    <bpmn2:dataInput id="_DataInput_49" itemSubjectRef="__NameInputItem" name="Uuid"/>
    <bpmn2:dataInput id="_DataInput_50" itemSubjectRef="__NameInputItem" name="Target"/>
    <bpmn2:inputSet id="_InputSet_10" name="Input Set 10">
  <bpmn2:dataInputAssociation id="_DataInputAssociation_47">
  <bpmn2:dataInputAssociation id="_DataInputAssociation_48">
    <bpmn2:assignment id="Assignment_1">
      <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_16">POST</bpmn2:from>
      <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_17">_DataInput_48</bpmn2:to>
  <bpmn2:dataInputAssociation id="_DataInputAssociation_49">
  <bpmn2:dataInputAssociation id="_DataInputAssociation_50">
    <bpmn2:assignment id="Assignment_14">
      <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_17">dev</bpmn2:from>
      <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_18">_DataInput_50</bpmn2:to>

The above task uses the DeploymentUrl and ArtifactUuid parameters that were passed in to the business process when it was invoked. It populates the inputs required by HttpClientDeploy including an input parameter named Target. The Target parameter maps to a configured Deployment Target. The target is a logical name and corresponds to a physical runtime environment configured in the DTGov configuration file (dtgov.properties). See the next section for details.

In order to make logical Deployment Targets available they must be configured in the DTGov configuration file. Typically an organization would configure three or four Deployment Targets, including:

  • dev - the development environment
  • qa - the test environment
  • stage - the staging environment
  • prod - the final production environment

Of course, any number of targets can be configured. Here is an example of how to configure the above four targets in the DTGov configuration file:

governance.targets=  dev|http://www.jboss.org/overlord/deployment-status.owl#InDev|copy|/tmp/dev/jbossas7/standalone/deployments
governance.targets=   qa|http://www.jboss.org/overlord/deployment-status.owl#InQa|copy|/tmp/qa/jbossas7/standalone/deployments
governance.targets= prod|http://www.jboss.org/overlord/deployment-status.owl#InProd|copy|/tmp/prod/jbossas7/standalone/deployments

The format of each target is as follows:


  • LogicalName : used in the BPMN process as described in the previous section as the value of Target
  • Classifier : a classifier that should get added to the binary deployment artifact when deployed to the target environment (and removed when undeployed)
  • DeploymentType : how to deploy to the environment. Valid values as of this writing include copy, rhq, as_cli, maven

Depending on the type of the deployment, additional parameters may be required. In the example above, the copy deployment type requires a folder on the server, which is where it will copy the deployment artifact.

Here are some examples of how to use the other deployment types:

governance.targets= rhq_example  |#Example|rhq|{rhq.user}::{rhq.password}::{rhq.baseUrl}
governance.targets= cli_example  |#Example|as_cli|asuser::aspassword::ashost::asport
governance.targets= maven_example|#Example|maven|scp://m2.example.com/m2/snapshot-repository::false::true