Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Sequential work flow with Database samples? I'm working with Sequential work flow activity.....

Sequential work flow with Database samples? I'm working with Sequential work flow activity.....

Scheduled Pinned Locked Moved WCF and WF
helpdatabasewinformstutorialquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ravi vellanky
    wrote on last edited by
    #1

    hi, I'm working on Windows work flow(Workflow1.cs) which is sequential workflow. I'm using the work flow(Workflow1.cs) in Windows forms. In first form i started workflow(Workflow1.cs)by creating an instance and started and sending mails in the codeacitivity of sequential work flow(Workflow1.cs). In the 2nd form i've to check the roles using the work flow activity (i used ifelse actity in the same Workflow(Workflow1.cs) by using the parameters.add("Role","Management") and started again. It's giving error. Because i already started the instance in the 1st form. How to execute the work flow which is already started. I mean to say is the 2nd state which is ifelse activity to be executed after the codeActivity. Can any one help me in this context? or Give me some samples on workflow with database (sqlserver 2005) contains 3 to 4 forms.....in the sample.. -Ravi

    C 1 Reply Last reply
    0
    • R ravi vellanky

      hi, I'm working on Windows work flow(Workflow1.cs) which is sequential workflow. I'm using the work flow(Workflow1.cs) in Windows forms. In first form i started workflow(Workflow1.cs)by creating an instance and started and sending mails in the codeacitivity of sequential work flow(Workflow1.cs). In the 2nd form i've to check the roles using the work flow activity (i used ifelse actity in the same Workflow(Workflow1.cs) by using the parameters.add("Role","Management") and started again. It's giving error. Because i already started the instance in the 1st form. How to execute the work flow which is already started. I mean to say is the 2nd state which is ifelse activity to be executed after the codeActivity. Can any one help me in this context? or Give me some samples on workflow with database (sqlserver 2005) contains 3 to 4 forms.....in the sample.. -Ravi

      C Offline
      C Offline
      Calin Tatar
      wrote on last edited by
      #2

      Maybe your first wf(invoked from form1) is not completed when you want to start it again. You need to work with WorkflowRuntime, and check what's the status of the WF (WorkflowInstance). Calin

      R 2 Replies Last reply
      0
      • C Calin Tatar

        Maybe your first wf(invoked from form1) is not completed when you want to start it again. You need to work with WorkflowRuntime, and check what's the status of the WF (WorkflowInstance). Calin

        R Offline
        R Offline
        ravi vellanky
        wrote on last edited by
        #3

        thanks Calin after form1, work flow's one(Code Activity) of the activities completed. for form2 i 've to check the role which is management or employee using ifelse activity. i donno whether i've to use same work flow or to take one more work flow to define ifelse activity in the sequential.............. if i use the same work flow then how to check the state of the workflow in the form2. becoz i'm sending the parameter.add("Role","Management") in form2 for the same work flow. Can you give me some samples using Workflow with 2 or more forms with database. -Ravi

        1 Reply Last reply
        0
        • C Calin Tatar

          Maybe your first wf(invoked from form1) is not completed when you want to start it again. You need to work with WorkflowRuntime, and check what's the status of the WF (WorkflowInstance). Calin

          R Offline
          R Offline
          ravi vellanky
          wrote on last edited by
          #4

          may i know how to check the status of the workflow instance? -Ravi

          C 1 Reply Last reply
          0
          • R ravi vellanky

            may i know how to check the status of the workflow instance? -Ravi

            C Offline
            C Offline
            Calin Tatar
            wrote on last edited by
            #5

            try to get the WorkflowRuntime, and use GetLoadedWorkflows() method, or use GetWorkflow() based on wf guid. Also, on WorkflowInstance object, you may use TryUnload/UnLoad() Calin

            R 1 Reply Last reply
            0
            • C Calin Tatar

              try to get the WorkflowRuntime, and use GetLoadedWorkflows() method, or use GetWorkflow() based on wf guid. Also, on WorkflowInstance object, you may use TryUnload/UnLoad() Calin

              R Offline
              R Offline
              ravi vellanky
              wrote on last edited by
              #6

              I'm not able get the instance state based on the grid. Unload/TryUnload are not working properly. can you give a small sample on this?

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups