Workflow Soluiton

 View Only
  • 1.  ExecuteTask / TaskManagementService via Workflow?

    Posted Oct 24, 2014 06:26 PM

    Hello all,

    I am building a software portal in which end users will click on (selected/unselected) buttons to install apps from NS. On the side, I have been successful in deploying software via ExecuteTask on TaskManagementService page (http://server/altiris/asdk.task/taskmanagementservice.asmx?op=ExecuteTask). My question is, how can I utilize this service within Workflow? I would just need to plug in the (selected software) variable and wham, everyone's happy. I've googled this for days and coming up short and some tips. Please advise?



  • 2.  RE: ExecuteTask / TaskManagementService via Workflow?
    Best Answer

    Posted Oct 24, 2014 06:45 PM

    You could create a web service integration component that points to your URL.  That should get you in the right direction.  I believe you could also recompile the Symantec.Components.Generated7.Altiris.ASDKTask library and it might create a component for your specific task(s), though it's been a great long while since I've done this, and can't vouch for the success of an attempt to do so.  

    Here's how you'd go about creating a web service component:

    • create a new integration library 
    • add a new generator 
    • scroll down and select Web Service Caller Generator 
    • name the generator and hit next 
    • supply the URL and any required authentication 
    • next through the rest of it, making adjustments as needed
    • compile the integration library
    • import the library into your workflow/webforms project
    • find the components that were created dynamically during the compilation of the library
    • get the proper Execute Task component and supply the appropriate variables
    • debug and enjoy

    Let me know if you need any further details.

    Your specific question about executing a task notwithstanding, I should add to this that in the past I've simply used filters and targets to handle task execution, and used Workflow to add a computer to the appropriate filter. Afterwards, we just let updateconfigs and checkins run their course.



  • 3.  RE: ExecuteTask / TaskManagementService via Workflow?

    Posted Oct 27, 2014 11:17 AM

    Awesome, thanks for the quick reply Andrew. I'll give this a go, sounds exactly like the missing ingredient.



  • 4.  RE: ExecuteTask / TaskManagementService via Workflow?

    Posted Oct 28, 2014 09:46 PM

    also, if you remote into your NS there are help files that outline the syntax for the web service.  Took me a while to find but we were able to get this done.  the paramater you will need to pass has to be formatted properly into a single XML string.  @Assignedresources paramater will be the guid of the computer you want to deploy to, and the taskname? (not on my work box atm) will be the guid of the preconfigured task. and name is the friendly name of the task.



  • 5.  RE: ExecuteTask / TaskManagementService via Workflow?

    Posted Oct 28, 2014 09:48 PM

    found the XML example, collectiontoruntaskagainst can be the guid of the computer object.

    <inputParameters>
     <parameter>
    <name>@AssignedResources</name>
    <value>CollectionToRunTaskAgainst</value>
    </parameter>
    <parameter> 
    <name>@CompRequirements</name>
     <value> 
    <minWaitTime>1 minutes</minWaitTime> 
    <maxWaitTime>1 minutes</maxWaitTime>
    <minCompletion>1 %</minCompletion> 
    </value>
     </parameter>
     </inputParameters>

     

     



  • 6.  RE: ExecuteTask / TaskManagementService via Workflow?

    Posted Oct 29, 2014 12:45 AM

    making some progress here, FS popped in to check the rough draft and it checked out. just need a way to tap into the task status (via agent or other api?) and display friendly messages on web form or email on success.



  • 7.  RE: ExecuteTask / TaskManagementService via Workflow?

    Posted Oct 29, 2014 10:58 AM

    You will need to hook into the agent API, thats the same step we are on.  If you get passed it please share :)



  • 8.  RE: ExecuteTask / TaskManagementService via Workflow?

    Posted Oct 29, 2014 11:38 AM

    Try using the "Get Task Status Component (SMP 7)" or the "Get Task Status Details Component (SMP 7)" components.  If that doesn't work, if you followed the steps in my first post above, you should have found a "Get Task Status" component there as well.  That generated component should work for what you want.

    2014-10-29_9-36-57.png

    And in the web service generator wizard, step 3:

    2014-10-29_9-33-14.png

    Send me a message if you need help getting this working.