Précédent   Forum du club des développeurs et IT Pro > Dotnet > Général Dotnet > Windows Workflow Foundation
Windows Workflow Foundation Forum d'entraide sur le moteur de workflows de Microsoft
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 11/03/2010, 10h32   #1
CUCARACHA
Invité(e)
 
Messages : n/a
Détails du profil
Informations forums :
Messages : n/a
Points : 0
Par défaut Ajout d'évènements sortants à un workflow ?

Salut,

Je travaille sur une activité qui doit lancer plusieurs workflows en parallèle.
Il faut que ces workflows s'exécutent parallèlement et non séquentiellement comme c'est le cas lorsuqu'on utilise ParallelActivity "out of the box".

Pour se faire, j'aimerais d'abord, émettre un évènement "progress" dont le EventArg serait un pourcentage et un message.

Dans un premier temps, j'ai créé une mini appli winform qui crée une instance d'un mini workflow super simple :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Objects.CommunicationLayer.wfMainObjects;
 
namespace Objects.CommunicationLayer
{
    public sealed partial class wfMain : SequentialWorkflowActivity
    {
        public wfMain()
        {
            WorkflowProgress += new wfMainProgressEventHandler<wfMainProgressEventsArgs>(wfMain_WorkflowProgress);
            InitializeComponent();
        }
 
        void wfMain_WorkflowProgress(object sender, wfMainProgressEventsArgs e)
        {
            //Comment propager l'évennement au code appelant ?
        }
 
        public event wfMainProgressEventHandler<wfMainProgressEventsArgs> WorkflowProgress;
        private void PathControl_ExecuteCode(object sender, EventArgs e)
        {
            wfMain_WorkflowProgress(this, new wfMainProgressEventsArgs(50, "Moitié"));
            wfMain_WorkflowProgress(this, new wfMainProgressEventsArgs(100, "Fini"));
        }
    }
}
Pourriez-vous m'aider ?

D'avance merci

Laurent
  Envoyer un message privé Réponse avec citation 01
Réponse Mettre Résolu
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 13h56.


 
 
 
 
Partenaires

Hébergement Web