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.
|*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 XML||NA|
|*Retrieve the DCR graph represented as DCR XML||*Update the DCR graph using DCR XML||NA||Delete the graph|
|DCR graph instances|
|Retrieve the DCR graph instances, i.e. instance id (simid) and title.||NA||*Instantiate a DCR graph returning a new instance ID (simid). An optional Title of the simulation can be provided.||NA|
|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
Another filer, ?filter=getTime, will return next deadline and delay as well as the current time of the graph
|NA||Advance time in the graph. Parameter ?time=time must be provided|
Parameter ?complete=true will mark the simulation as completed, complete=false will un-complete the simulation
Parameter ?Title=... will update the title of 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
|NA||Create a new event in the graph||NA|
|DCR graph instance event|
|Retrieve the DCR graph instance event||NA||*Execute the event||Delete the event|
|DCR graph instance relations|
|Retrieve the DCR graph instance relations||NA||Create a new relation||NA|
|DCR graph instance relation|
|Retrieve the DCR graph instance relation||NA||NA||Delete the relation|
DCR Graphs are represented using DCR XML which is the output of the DCRGraphs.net 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 events returned contain the following data:
<events isAccepting="true|false" nextDeadline="..." nextDelay="...">
<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 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.