Not logged in - Login
View History

DCR Active Repository

The purpose of the DCR Active Repository is to make it easy to leverage DCR Graphs as the rules foundation for an Adaptive Case Management system.

Now you can access your DCR graphs from a RESTful API currently supporting these functions.

  • Create a DCR Graph
  • Update a DCR Graph
  • Get a DCR Graph
  • Instantiate a DCR Graph for simulations and instances
  • Get information about instance status, i.e. whether the process is completed or not. We refer to this as "isAccepting"
  • Get Enabled or Pending Events of a DCR Graph instance
  • ExecuteEvent of a DCR Graph instance
  • Advance time of a DCR Graph instance

Using the RESTful API we'll implement all elements of the RESTful API supporting collections of graphs, graph instances and events. Using the RESTful API graphs can be modified, instantiated, executed etc.

An example of how to use DCR Active Repository using the Postman tool can be found here.

Access to DCR Active Repository requires your DCR username and password and use http basic authentication. Access to the repository requires a commercial license.

An overview of the API is shown below. Refer to DCR Active Repository API reference for details. The engine API interface outlines the programmatic interface.

DCR graphs
*List URIs of graphs, id and titles in collection. Filter options exists to search/filter specific graphs. Optional parameters are:
title=title - will search for graphs containing "title" in title
sort=title (default) - sort graphs by title or other fields
sort: can be title, id, created, modified
orderby: asc or desc
NA*Create a new DCR graph, returning the id. A DCR Graph is described using DCR XMLNA
DCR graph
*Retrieve the DCR graph represented as DCR XML*Update the DCR graph using DCR XMLNADelete the graph
DCR graph instances
*Retrieve the DCR graph instances, i.e. instance id (simid) and title. Various filters exists to retrieve representative and swimlane graphs:
isScenario=true or false - if true returns only scenarios (representative graphs)
Format=DCRXMLLog - optional, only used if DCR XML Log format is needed
Filename=log.xml - optional filename
NA*Instantiate a DCR graph returning a new instance ID (simid). An optional Title of the simulation can be provided.
API enhanced and now support creating multiple instances by important DCR XML Log which creates multiple instances at the same time. Use parameter Log to enable import.
DCR graph instance
*Retrieve the DCR graph instance
A filter exists, ?filter=isAccepting, which will return true or false depending on whether the DCR Graph instance is accepting or not
NAParameter ?complete=true will mark the simulation as completed, complete=false will un-complete the simulation
Parameter ?Title=... will update the title of the simulation
Parameter ?Log=... - will update the simulation
Delete the instance
DCR graph instance events
*Retrieve the events of the DCR graph instance
Filter must be provided to search/filter specific instances
NACreate a new event in the graphNA
DCR graph instance event
Retrieve the DCR graph instance eventNA*Execute the eventDelete the event
DCR graph instance relations
Retrieve the DCR graph instance relationsNACreate a new relationNA
DCR graph instance relation
Retrieve the DCR graph instance relationNANADelete the relation
DCR graph time
NANA*Set absolute time in graph as outlined in body (see details below).NA
DCR graph roles
Retrieve the roles of the DCR graph as outlined belowNANANA
Notice: The list of URLs is not complete and not everything is implemented at the moment. We've marked working areas with an asterisk (*).

DCR Graphs are represented using DCR XML which is the output of the designer tool. DCR XML is used both for classes and instances of processes.

The list of graphs returned contain the following data:

<graph id="1234" title="My first graph" />

The list of roles returned contain the following data:

<role title="user" description="This is the user" />
<role title="responsible" description="The responsible person" />

The list of events returned contain the following data:

<events isAccepting="true|false" nextDeadline="..." nextDelay="..." phase="...">
<event id="Activity 3" included="true" enabled="true" pending="false" executed="false" fullPath="Activity 3" roles="" groups="" description="" label="Activity 3" eventType="" />
<event id="Activity 5" included="true" enabled="true" pending="false" executed="true" fullPath="Activity 5" roles="" groups="" description="" label="Activity 5" eventType="" />
<event id="Activity 6" included="true" enabled="false" pending="true" executed="false" fullPath="Activity 6" roles="" groups="" description="" label="Activity 6" eventType="" />

The Execute event takes an optional data parameter in the form: <globalStore><variable id="'eventid'" value="..." isNull="true|false"/> </globalStore>.

The set absolute time of a graph post the following data in the body: <absoluteTime>ISO 8601 time here</absoluteTime>. Notice - time must be GMT+0, i.e. not local time zone. Format is ISO 8601, i.e. yyyy-mm-ddTHH:MM:ssZ etc.

The data should be in JSON format so in fact we send e.g.

{ time: '<absoluteTime>2018-09-05T10:40:27.9197330Z</absoluteTime>.' }

The RESTful API will be expanded to include all events and relations of graphs as well as simulations/instances, thereby enabling adding, updating and removing events and relations directly.

We've created a Windows application for DCR Active Repository that you can use to experiment with the DCR Active Repository. The source code in C# is available for download.

Accessing this API requires a commercial license.