Workflow Soluiton

 View Only
  • 1.  How do I create a workflow that will split up to run a number of workflows?

    Posted May 02, 2012 11:05 AM

    Dear All,

    I need to set up a workflow that reads a list of computers and send an email each of the the Primary Users with a link. When each one clicks upon the link, they then are asked a number of pieces about themselves and these are then applied to their details in Altiris.

    I know how to create a Workflow that follows ONE process, but what about a workflow that initiates X number of processes and then follows those?

    Do I need to make two workflows? One that works out the list of email addresses and then sends the emails (one per user) and another that receives an email and does the UI? Could this work with just one Workflow and using the LogicBase.Components.Default.Workflow.DialogWorkflowComponent for the Email interaction?

    Kindest regards,

    QuietLeni



  • 2.  RE: How do I create a workflow that will split up to run a number of workflows?
    Best Answer

    Posted May 02, 2012 11:17 AM

    How about this:

    1. Write one workflow that sends an email, etc. and deploy it as a webservice. Make an integration component against that web service

    2. Have a second workflow loop through your users and call that integration component.



  • 3.  RE: How do I create a workflow that will split up to run a number of workflows?

    Posted May 02, 2012 11:50 AM

    reecardo,

    I am almost ready to mark that as an answer, but I am having trouble getting my head around how to do that or if it yields in the same as I need...

    Kindest regards,

    QuietLeni



  • 4.  RE: How do I create a workflow that will split up to run a number of workflows?

    Posted May 02, 2012 01:17 PM

    You can do this in one Workflow Project. The following image shows a simplified overview of how it would work:

    You first want to import two integration libraries into your Workflow project: Workflow Advanced and Demo. The WorkflowAdvanced library allows us to add a Merge component and split multiple outputs from one component while the Demo library will make a SinglePathDemo component to use to split up the loop we introduce with the 'For Each Element in Collection' component.

    Use the 'For Each Element in Collection' component based on your collection that has the Primary User data in it. The SinglePathDemo component ("split the loop" in the example) is used to quickly work through the collection and create Workflow tasks for each user all at the same time. Use the Item Output Variable Name of the For Each Item in Collection component to setup your "To" recipient in the email inside the Start Process of your Dialog Workflow component.

    Add a Merge component after the Dialog Workflow and connect it like shown. The Merge component will wait for all the open tasks in the Dialog Workflow to complete before passing on in your Workflow. Without that, the first person that goes through the Workflow will work but any other users will get an invalid task link.

    Hopefully that explains it well enough in a nutshell. I have a couple of Workflows setup like this and haven't had any issues with those.

     

    EDIT: Forgot to mention, this will only work in your scenario if this is an Auto-Start workflow! Replace the Start component with a Configurable AutoStart and set the Workflow Type to AutoStart under the Publishing tab of the workflow.

    If you have a Form Start workflow, this would still work but you would need another Dialog Workflow component ahead of this example to host your initial form.



  • 5.  RE: How do I create a workflow that will split up to run a number of workflows?

    Posted May 02, 2012 01:55 PM

    I like the above solution as well... even though I tend to avoid splitting and merging like the plague.



  • 6.  RE: How do I create a workflow that will split up to run a number of workflows?

    Posted May 02, 2012 03:49 PM

    matzebru,

    I see your solution and it is pretty neat, but does this allow for sending to 10 different people and for any or all of those users, in arbitrary order, to all do the same Workflow for their own computers?

    Sorry, just want to check.

    Yes, this is going to work as an AutoStart Workflow, running once a day.

    Kindest regards,

    QuietLeni



  • 7.  RE: How do I create a workflow that will split up to run a number of workflows?

    Posted May 02, 2012 04:56 PM

    Yes that will work. I use a similar model that sends out approval request tasks via email for up to 19 different approval authorities at one time. You will just need to make sure that the components on your form are dynamic enough to know to present only the user-specific asset details, etc, for that currently logged-in user.



  • 8.  RE: How do I create a workflow that will split up to run a number of workflows?

    Posted May 02, 2012 07:19 PM

    There should be a warning to doing parallel processes because if you don't do them correctly it can cause a lot of issue.



  • 9.  RE: How do I create a workflow that will split up to run a number of workflows?

    Posted May 14, 2012 05:15 PM

    reecardo,

    I used both of the solutions in this thread, but I came to the conclusion that this was the best solution because it completely separates the Workflows and there is no chances of their being crossovers!

    Thanks again,

     

    QuietLeni