Beispiel #1
0
 public override void Submitted()
 {
     if (PocoObject.Submitted())
     {
         // move to approved state if submitted is ok for the poco
         // definition
         Workflow.State = new ApprovedState <PocoType>(this);
     }
 }
Beispiel #2
0
 public override void Approved()
 {
     if (PocoObject.Approved())
     {
         // next state ...
         //Workflow.State = ...
         //Send emails
         //Do approval items
     }
 }
Beispiel #3
0
        public async Task verify_unwind_plain_object()
        {
            var poco = new PocoObject("TEST", 42);
            await _persistence.AppendAsync("poco/42", poco).ConfigureAwait(false);

            await sut.UnwindAsync().ConfigureAwait(false);

            var allEvents = sut.UnwindedCollection.FindAll();

            Assert.That(allEvents.Count(), Is.EqualTo(1));
            var evt = allEvents.Single();

            Assert.That(evt.EventType, Is.EqualTo("PocoObject"));
            Assert.That((evt.GetEvent() as PocoObject).IntValue, Is.EqualTo(42));
            Assert.That((evt.GetEvent() as PocoObject).Value, Is.EqualTo("TEST"));
            Assert.That(evt.PartitionId, Is.EqualTo("poco/42"));
        }
Beispiel #4
0
 protected void On(PocoObject obj)
 {
     EvtCount++;
     Value += obj.Value;
 }