Workflow Soluiton

 View Only
  • 1.  Creating identical tasks from a collection

    Posted Jul 15, 2009 10:43 AM
    Hello,

    I have a collection of users that I need to create the same task for all in parallel. They are within a collection and I can create the task but my issue is being able to create all the tasks at once. I do not want to wait until a single user finishes their task before the next task is generated. I hope that I'm just overlooking some capability and it will be an easy fix.

    I have looked at linked modules and web service capabilities and both will work to create the task so solutions for either will be useful.

    Thanks

    Cary


  • 2.  RE: Creating identical tasks from a collection

    Posted Jul 15, 2009 10:50 AM
    Just use a demo component to force your loop through to create the tasks, while not waiting for them to finish. Then use the MergeWorkflowPathsByComponent component to merge your path back together when the tasks are completed.

    Credit goes to Shawn Turnbow for showing me how to do this.



  • 3.  RE: Creating identical tasks from a collection

    Posted Jul 16, 2009 09:04 AM
    Hello,

    I'm not sure I understand what a demo component is? Can you provide some additional detail.

    Thanks

    Cary


  • 4.  RE: Creating identical tasks from a collection

    Posted Jul 16, 2009 09:35 AM
    A "demo component" is one of the 2 components imported by the Demo DLL. Those 2 components don't do anything; they are merely "placeholder" components. One has a single-path, the other has multiple paths.


  • 5.  RE: Creating identical tasks from a collection

    Posted Jul 16, 2009 12:49 PM
    Hello,

    I'm still not clear on how I can use the Demo components to do what I want.

    As I loop through the collection I want to kick off a seperate process that will assign a task to the user in the collection record. sometimes it's one person other times it could be 50.

    I have the seperate process in both a webservice and a seperate module depending on which is easier to use.

    When the user is assigned their task, it doesn't have to come back to the original process it can just exist on its own.

    Looking at the Demo component I don't understand how I can get the process to go through the entire collection without stopping at the step of generating the new task and waiting for a return.

    Is there a way to bypass the "wait for a return" using the Demo component.

    I'm hoping that I have explained things clearly enough that I don't send everyone who is helping down the wrong path.

    Thanks

    Cary


  • 6.  RE: Creating identical tasks from a collection

    Posted Jul 16, 2009 03:25 PM
    I think I understand what you're saying, and I don't think it's possible. When you introduce branches into a workflow, there has to be some advance knowledge about how many branches you want to create. In this case, you want to create "x number of items in collection" branches. Therefore, I don't think it's possible to create the tasks in parallel. You could create them sequentially, in a loop structure, very easily, though.

    Hopefully I'm understanding you, if not please correct me...


  • 7.  RE: Creating identical tasks from a collection

    Posted Jul 16, 2009 04:27 PM
    Here's what you do.  I would show you  a demo, but my Workflow server is unavailble to me right now.

    You need to import demo and advancedworkflow dlls.  The advanced workflow dll allows you to have to outputs from one component.

    you will start with your collection.
    Connect that to a for each component.
    The next output should go through your demo component, then loop back into the for each component.
         (since you have to run the output through something)
    Draw another line from next that runs through a dialog workflow that creates your tasks and loop it back.
        (The advanced workflow dll allows you to have one output path go to multiple places)

    For the done, run it into a merge component that doesn't complete until all of the previous tasks are done.
    I belieave its call the merge component or something.

    If you do this, what you will see is it will create a task, then run back into the for each via the demo component.

    Without the dual branch demo, it would create the task and stop at the dialog workflow component.

    I think this is right, like I said I can't look at my workflow server right now, so this is from memory.
    Props to Shawn


  • 8.  RE: Creating identical tasks from a collection

    Posted Jul 16, 2009 04:49 PM

    Dalceon explained better then what I did... That is what I was talking about.  Here is a screen shot of an example.. Ignore the exclamation mark.. I removed an old DLL....imagebrowser image

    Reecardo is right because this is not true asynchrounous behavior... It is semi-syncronous... Not waiting for the event to complete, but you are not able to launch the approvals at exactly the same time.  The demo component will force it to loop through however many you have in your collection without waiting for the approvals to complete.....



  • 9.  RE: Creating identical tasks from a collection

    Posted Jul 17, 2009 12:58 PM
    Hello,

    I appreciate everyone's assistance with my problem. I've decided to use an external web service so I can have each task run independantly and allow the main process to close.

    Again, thank you all for your help.

    Yours truly

    Cary