Exemple #1
0
 /// <summary>
 /// Method called when the activity was completed
 /// </summary>
 /// <param name="result">Result of the execution</param>
 public void Completed(ActivityResult result)
 {
     Executing(delegate
     {
         var outputIndex = _indexResolver.Resolve(result.Numeric);
         PlaceToken(Outputs[outputIndex], StoredTokens.First());
     });
 }
 ///
 protected override void InputTokenAdded(object sender, IToken token)
 {
     ((IPlace)sender).Remove(token);
     StoredTokens.Add(token);
     Triggered(this, new EventArgs());
     if (ResultOutput >= 0) // Resume directly
     {
         PlaceToken(Outputs[ResultOutput], StoredTokens.First());
     }
 }
        private void SubworkflowCompleted(object sender, IPlace place)
        {
            var outputIndex = _indexResolver.Resolve(place.Id);

            Executing(() => PlaceToken(Outputs[outputIndex], StoredTokens.First()));
        }
 /// <summary>
 /// Resume execution of this transition, if we hold any tokens
 /// </summary>
 public override void Resume()
 {
     PlaceToken(Outputs[0], StoredTokens.First());
     base.Resume();
 }
 /// <summary>
 /// Pause this transitions or finish up quickly
 /// </summary>
 public override void Pause()
 {
     State = (MainToken)StoredTokens.First();
     base.Pause();
 }
 public void ResumeAsync(int result)
 {
     PlaceToken(Outputs[result], StoredTokens.First());
 }