Callilng WorkFlows

Discussion in 'ASP .Net' started by insreeraj@gmail.com, Jan 2, 2008.

  1. Guest

    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<string, object> dicParameters = new
    Dictionary<string, object>();
    dicParameters.Add("OidInvoice", aInvoice.Oid);
    WorkflowRuntime workflowRuntime= new
    WorkflowRuntime();
    {
    InvokeWorkflowActivity objInvk = new
    InvokeWorkflowActivity();
    ManualWorkflowSchedulerService scheduler =
    workflowRuntime.GetService<ManualWorkflowSchedulerService>();
    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
    , Jan 2, 2008
    #1
    1. Advertising

  2. Hello ,

    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<string, object> dicParameters = new
    > Dictionary<string, object>();
    > dicParameters.Add("OidInvoice", aInvoice.Oid);
    > WorkflowRuntime workflowRuntime= new
    > WorkflowRuntime();
    > {
    > InvokeWorkflowActivity objInvk = new
    > InvokeWorkflowActivity();
    > ManualWorkflowSchedulerService scheduler =
    > workflowRuntime.GetService<ManualWorkflowSchedulerService>();
    > 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
    >
    Michael Nemtsev [MVP], Jan 2, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page