Broadcast Process Using an Entity Schema

Using an Entity Schema allows you to run a process using multiple data elements from a data set. This is useful if you have a data set in which each element in the set needs to be processed in the same way.

For this example, we will use a Broadcast task to encrypt all the files in the C:\Temp directory.

Since this usage of the Broadcast Process does not utilize an Agent List, the Agent values specified in the Tasks and Processes will need to be set to the desired Agent.
  1. Create the Directory Listing task. This task is the same one that was used in the Agent List example.
  2. Create the Encryption task. This is the task that will perform the file encryption. It will be set up to use a variable in the Source File field so that it can be filled in by the Broadcast Process when it is run.
  3. Create a Process to contain the Encryption task. This is the Process that will be executed by the Broadcast Process to perform the file encryption. The Process will need to have a variable as well that will contain the full path and name of the file to be encrypted. This will be filled in when the Broadcast Process is executed.
  4. Add the Encryption Task to the Encryption Process diagram. The Input File variable in the Encryption Task will be set to the File Name variable in the Encryption Process. This will allow the Broadcast Process to pass the file name through to the Encryption Task.
  5. Create the Entity Schema. The Entity Schema will define the data that will be used in the Broadcast Process. Before defining the Entity Schema, look at the output from the Directory Listing Task defined in Step 1 above.

    Take note that the output is a comma delimited list with the first row being the header information. This will be important to know later on when the Broadcast Process is defined. In this example, we're going to need the name of the file and the full path of the file. Note the header values for those fields and add them to the Entity definition. Their order in the Entity definition is not relevant but they must have the same name as the value in the header in the directory listing's output.
  6. Create the main Process. This is the Process that will contain and run the Directory Listing and the Broadcast Processes.

  7. Add the Directory Listing Task to the main Process diagram.

  8. Add the Broadcast Process to the main Process diagram. Set the Process field to the Process defined in Step 3 above.

  9. Set the Broadcast Process details.


    Take special note to the settings for the following fields:

    1. Resolution - Set this to Enumerate items when activated. Since the directory listing is performed as part of the same Process, this value will ensure that the output for that directory listing will get parsed when the Broadcast Process is activated.
    2. Broadcast Type - Set this to Entity.
    3. Entity - Set this to the Entity defined in Step 5 above.
    4. Name - Use the Insert Variable option to set this to the FILE_NAME field in the Entity.
    5. Input Type - Set this to Comma delimited input with header.
    6. Input String - Use the Insert Variable option to set this to the OUTPUT value for the Directory Listing Task that was inserted into the Process in Step 7 above.
  10. Set the Broadcast Process variables. Set the File Name variable to the FULL_PATH field in the Business Entity.

  11. Connect the Directory Listing Task and the Broadcast Process. To ensure that the Directory Listing Task gets executed before the Broadcast Process, connect the two using the Linker object. Your diagram should look like the following:

At this point, everything is set up and ready to run. After running the main Process, defined in Step 6 above, you should see output similar to the following: