Asynchronous sub processes

Comments

5 comments

  • Avatar
    Karl Makatenas

    Is this subprocess being launched from a loop, or do you explicitly call each subprocess with a new stencil?  Depending on your answer, a simple AND stencil may do the trick.

    0
    Comment actions Permalink
  • Avatar
    Scott Bennett

    This is done in a loop with the sub process set to no wait...

    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    I would personally change up your architecture a bit and make the parent process wait for the child processes to finish similarly to this.  Tell me if this helps!

    1
    Comment actions Permalink
  • Avatar
    Scott Bennett

    Good idea, thanks. Since I have 2 subforms it will take a little bit of rework

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Lucas Drege

    Hi Scott,

    As mentioned above, in the parent process set the logic to check whether all child processes completed or not.

    1.Use Query Database shape and get the count of process instances where status is Running . So if any sub process is  running it will give number of instances count.

    Ex: SELECT Count(*)

      FROM [APDB].[dbo].[WF_PROC_INSTS] where SUPER_PROC_INST_ID='80E2000C29825407118823044660A84F' And [STATUS]='Running'

    Note : Where SUPER_PROC_INST_ID is your main process id.

    2.Use condition shape to check to check the count >0 if yes

    3.Then have a timer shape and put delay for 5 minutes or whatever time is feasible for your case.

    4.After delay again connect she shape back to Query Database which is mentioned in step 1. It’s kind of loop where it will wait for count to be 0

     

    Lucas

    0
    Comment actions Permalink

Please sign in to leave a comment.