• Guides
  • API Reference
  • Changelog
Show / Hide Table of Contents
  • DCR
    • EventKind
    • Expression
    • Flat
    • Graph
    • IEvent
    • Marking
    • NotEnabled
    • Path
    • TimeManager
    • Tools
    • UserNotAllowed
    • Value
  • DCR.Time
    • Duration
    • Timezones

Class Marking

Each event in a DCR graph has state, known in academic literature as a marking. This class encapsulates that state.

Inheritance
System.Object
Marking
Namespace: DCR
Assembly: Engine.dll
Syntax
public class Marking : Object
Remarks

Setting properties in this class does not directly mutate the state of the underlying DCR graph. To actually mutate event state, you must fetch the Marking, update it, and write it back, like this:

Path p = new Path("A"); Marking m = graph.GetMarking(p); m.Included = True graph.SetMarking(p, m);

Constructors

Marking()

Declaration
public Marking()

Marking(String)

Construct the default marking with the given label.

Declaration
public Marking(string label)
Parameters
Type Name Description
System.String label

Marking(String, XElement)

Construct the default marking with the given label and custom XML.

Declaration
public Marking(string label, XElement custom)
Parameters
Type Name Description
System.String label
System.Xml.Linq.XElement custom

Properties

Custom

XML serialisation of the Custom part of the underlying event. Will throw if the event was not constructed from XML serialization.

Declaration
public XElement Custom { get; set; }
Property Value
Type Description
System.Xml.Linq.XElement

Stored XML

Remarks

The set implementation clones the given XElement.

Data

Data value

Declaration
public Value Data { get; set; }
Property Value
Type Description
Value

Current data value of the event.

Remarks

Do not set this to null.

Deadline

Current deadline

Declaration
public Nullable<DateTimeOffset> Deadline { get; set; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

Current deadline k or null. Setting this to null makes the event pending with no deadline.

Remarks

This property cannot be used to clear the pending state; use the Pending property for that.

This property will be null if the event has an expression other than a date as its deadline. This situation occurs only for un-initialised graphs.

Executed

Executed state

Declaration
public Nullable<DateTimeOffset> Executed { get; set; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

null if the event was never executed, or the DateTimeOffset of the last execution

Remarks

This property will be null if the event has an expression other than a date as its initialisation time. This situation occurs only for un-initialised graphs.

Form

Indicate if this event likely contains a form

Declaration
public bool Form { get; }
Property Value
Type Description
System.Boolean

Returns True if (a) the event is of kind Subprocess and (b) the event's Custom property contains an XML attribute referId.

Remarks

For internal use by the DCR forms engine. Note that Form maybe false even though Kind is Form.

Included

Included state

Declaration
public bool Included { get; set; }
Property Value
Type Description
System.Boolean

True if the event is currently included, otherwise false

Remarks

An event is considered "excluded" if it is not included.

Kind

The Kind of the event

Declaration
public EventKind Kind { get; set; }
Property Value
Type Description
EventKind

Enumeration value indicating the kind of event (Activity, Nesting, Subprocess)

Remarks

The result of setting this to Nesting. when there is no children is undefined. The result of setting this to Activity. when the event contains children is undefined.

Label

The label of the event

Declaration
public string Label { get; set; }
Property Value
Type Description
System.String

The label value

Remarks

The label is the user-visible name of the event. It is not required to be unique. The label is never changed unilaterally by the engine.

Pending

Pending state

Declaration
public bool Pending { get; set; }
Property Value
Type Description
System.Boolean

If true, the event is pending with or without a deadline. If set to true, the event becomes pending with no deadline.

Roles

Roles

Declaration
public IEnumerable<string> Roles { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

Roles assigned to the event.

Remarks

Set not implemented yet

Methods

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
In This Article
Back to top © 2019 DCR Solutions