Bosch IoT Manager

Create a task involving the device

You can perform instant actions over a particular device. But you can also include the device in a mass management task involving other devices as well.

To create a mass management task, go to the Dashboard and select its Task Management perspective.
Then click Launch Task as shown on the screenshot below. A wizard will navigate you through the necessary steps in three dialogues.

images/confluence/download/attachments/1161543429/Create-a-Task-2.png


  1. On the first dialogue, as you see on the screenshot below, enter a user-friendly name for the new task, which will help you identify it later on when you monitor and potentially control its execution. Then, enter a Groovy action script which will be executed on the devices participating in the task. You may try with the following example script which will stop the Fileupload bundle on your device, or refer to the conceptual guide section dedicated to Groovy Actions.

    bundle = target.feature('Bundle:org.apache.commons.fileupload')
    bundle.stop()

    images/confluence/download/attachments/1161543429/mme_launchTask1.png

  2. On the second dialogue, click Device Scope.
    This is the default and most widely used option, and the action script in the example above is intended for it.

    1. In the Scope Selection Mode field on top, open the dropdown list and choose Ids Selection,

    2. Then click Add.

    3. Select your device from the list that appears or type its ID in the Filter by a Device ID field
      When managing bundles you need to select your 'bundles' thing e.g. example.dm:gatewayDevice:edge:services:bundles.

    4. Confirm by clicking OK,

    5. Then click Next to proceed with the wizard.


    images/confluence/download/attachments/1161543429/dm_mme_createTask_idsSelection1.png
  3. On the third and last dialogue, optionally apply Execution Options
    which will limit the number of devices on which the task can be executed simultaneously,
    define the timeout for non-confirmed executions,
    or the time period in which the task execution is allowed.
    Then click Next or skip this step and directly click Finish.

    images/confluence/download/attachments/1161543429/Launch-new-task-wizard---Execution-Options.PNG



Upon clicking Finish, the newly created task will automatically start executing the defined action on all devices included in its scope, which in our example includes only one virtual device.

It will be listed in the All Tasks view along with some essential task data, as shown in the screenshot below.

images/confluence/download/attachments/1161543429/mme_launchTask2.png

You can observe detailed information on the task results and track the execution progress in real time through the Overview and Execution Status Details tabs at the bottom.

Congratulations, you have competed our Getting Started tutorial. You can now continue your journey by: