Callilng WorkFlows

Callilng WorkFlows

am 02.01.2008 10:21:25 von insreeraj

Hi All,

i have console application which will be running , Here i will be
adding 3 services for 3 workflows, now my asp application will be
calling 1 work flow, in particular event i have to call the 2nd work
flow., i have the code in the event as below,

Invoice aInvoice = (Invoice)xpcInv[0];
Dictionary dicParameters = new
Dictionary();
dicParameters.Add("OidInvoice", aInvoice.Oid);
WorkflowRuntime workflowRuntime= new
WorkflowRuntime();
{
InvokeWorkflowActivity objInvk = new
InvokeWorkflowActivity();
ManualWorkflowSchedulerService scheduler =
workflowRuntime.GetService();
WorkflowInstance instance =
workflowRuntime.CreateWorkflow(typeof(WorkflowInvoice),
dicParameters);
if (scheduler != null)
{

scheduler.RunWorkflow(instance.InstanceId);
}
instance.Start();

But this is just going to the second work flow, but its not firing the
events inside.
Can anybody guide me to solve this prblem

Thnx&Rgds,

Sreeraj

Re: Callilng WorkFlows

am 02.01.2008 12:21:40 von nemtsev

Hello insreeraj@gmail.com,

Which event do u have and as I understand that event (if its only HandleEvent
activity) must be arised outside to be run

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


> Hi All,
>
> i have console application which will be running , Here i will be
> adding 3 services for 3 workflows, now my asp application will be
> calling 1 work flow, in particular event i have to call the 2nd work
> flow., i have the code in the event as below,
>
> Invoice aInvoice = (Invoice)xpcInv[0];
> Dictionary dicParameters = new
> Dictionary();
> dicParameters.Add("OidInvoice", aInvoice.Oid);
> WorkflowRuntime workflowRuntime= new
> WorkflowRuntime();
> {
> InvokeWorkflowActivity objInvk = new
> InvokeWorkflowActivity();
> ManualWorkflowSchedulerService scheduler =
> workflowRuntime.GetService();
> WorkflowInstance instance =
> workflowRuntime.CreateWorkflow(typeof(WorkflowInvoice),
> dicParameters);
> if (scheduler != null)
> {
> scheduler.RunWorkflow(instance.InstanceId);
> }
> instance.Start();
> But this is just going to the second work flow, but its not firing the
> events inside.
> Can anybody guide me to solve this prblem
> Thnx&Rgds,
>
> Sreeraj
>