Creating User Workflows
IntroductionTo create User Workflows in Data Manager Portal, you need to use 3 software packages:
- Data Manager Portal (DMP)
Importing data with ETL+When creating a User Workflow in DMP, you need to import the existing data that you want to use in the User Workflow in ETL. So we start by opening ETL. Go to Start >> S4M Data Manager >> DM-ETL+. Open ETL as Administrator. Once opened, create a new solution. Be sure you give it an appropriate name, because you're going to need this in a later stadium. For this instruction we're using: User_workflow_demo. For this tutorial we are going to import data from a CSV file (Comma Separated Values). Click under the import header in the list to the left on Text File. Give the Text File Diagram an appropriate name, in this tutorial we will call it Imported_Persons. See Figure 1
Figure 1: Open ETL+ and select a Text File import item.Double Click on the title bar of the diagram to get into the diagram itself. Once in the diagram, click on the Open icon. After that click on the little folder icon to start browsing your computer. Search for the file you want to import and click on Open. Set the right Literal char character (" (double quote) by default) and the right Text Delimiter (, (comma) by default), after that click on Next. Here you can check if everything imported correctly, you will see the text file in a table format. If everything looks OK click on Finish. See Figure 2
Figure 2: Open a Text File.To import the text file that you just selected into ETL, click on the Import button. To then view the imported data, click on the View Last button. See Figure 3
Figure 3: View the imported data.Go back to the main solution by clicking on the button with the green circle and white arrow, saying: Solution. Create a new Diagram (from the Import block). Give it an appropriate name, in this tutorial, we will call it: ETLPrepareUserView. On the Diagram-block you see a dropdown box, select ICM_Data as the data source. Double click on the title bar to get into the diagram. On the left side of the screen, you see 5 lists categorized, for now we are going to need the Inputs list. You see 1 item in there: Imported_Persons, click on it. A block will appear that will contain the headers of the imported CSV file. Select all headers by checking all the checkboxes, this can be done one-by-one or you can click on the icon with an empty square with a dotted-line. If everything is selected, click on Import (If you get a popup saying: "This Task is depended on other Tasks, do you wish to import the depended Tasks as well?", choose yes) and View Last to import and view the results. Go back to the main solution by clicking on the button with the green circle and white arrow, saying: Solution. See Figure 4
Figure 4: Import the data to the Diagram-block.We also need a diagram for the Target Records in DMP, because we only want to consolidate these target records. The table where the Target Records are saved, does not exist yet. The table will be created automatically after you selected Target Records in DMP. To continue within ETL+, you need to have that target table and since it doesn't exist yet, you need to start reading the ESB and DMP part of this instruction. Go to ESB instructions (If you already have the target table in your database, read on) --- In the main solution, create a new Diagram-block, we need this diagram to load in the target data that we specified in the DMP User Workflow. Give it an appropriate name, but for this tutorial we will call it: TargetData. Set the data source to ICMDATA_DMVIEW. Go inside of the diagram by double clicking on the title bar. As said earlier, we need to select the Target Records from DMP. These records are saved in a table in the database. The table name will probably look like: IMPORTED_DM_[VIEW-NAME]_Target. In this case: IMPORTED_DM_DM_User_View_Target. Click on it so the table window appears. Select all headers, click on Import and View Last. You will now see the records that where targeted in DMP. See Figure 4b.
Figure 4b: Create a diagram that loads in the targeted records.Go back to the main solution by clicking on the button with the green circle and white arrow, saying: Solution. Now we need to manually create a table in the database where the consolidated data will be saved. Go into your SQL Management software and create a table with all the columns you need. In this case, we can make a copy of the Target table, delete the records of the copied table and rename it. In this case we will name it: User_Workflow_End_Table. Now, create a new Diagram-block, give it an appropriate name and the source must be the one where you created the table. Go inside the diagram and select the table you just created. Select all headers by checking all the checkboxes, this can be done one-by-one or you can click on the icon with an empty square with a dotted-line. Click on Import (If you get a popup saying: "This Task is depended on other Tasks, do you wish to import the depended Tasks as well?", choose yes). Hit the save button and go back to the main solution. The last step in ETL+ is to create an MSSQLConsolidation diagram. Select that from the list on the left. Give it an appropriate name and double click the title bar to get inside the diagram. See Figure 5
Figure 5: Create a MSSQLConsolidation Diagram.Once inside the MSSQLConsolidation diagram, click on the Mappings button. A new window will popup. You see 2 dropdown boxes that are empty: a Souce field and a Target field. Select TargetData as the Source and select ConsolidatedData as the Target (These names can differ from the names you use. As source, use the diagram with the target records, as target, use the diagram with the table you created manually). Check the checkbox "Advanced - High performance compare logic". Next, click the Auto mapping button. The table will now appear on screen. The only thing left to do is setting a key value. Remember that this value needs to be unique in all situations. Email seems a good unique key for now, so check that. Click the Close button and click on the Import button. To check if everything is imported correctly, click on various tabs on the screen. Dependent on what situation you're in, records will be displayed in various tabs on the screen. See Figure 6
Figure 6: Create mappings in the MSSQLConsolidationGo back to the main solution by clicking on the button with the green circle and white arrow, saying: Solution and Save the solution. You can now add a ICM-Action workflow-item in ESB with a PerformConsolidation service. You can learn how to do that by clicking here. If you already followed all the instructions below, you are now able to consolidate the targeted records in DMP.
Porting data from ETL+ through ESB to DMPESB is a powerfull tool that can chain different actions together. It can also use its workflow-items as a configuration for Data Manager Portal. This is exactly what we want for creating the User Workflows. Start the software by going to Start >> S4M Data Manager >> DM-ESB. Your browser will popup and a login screen will appear. Login with the credentials you configured during the installation. If you don't remember your username, check the InstallOverview.rtf file located in the root directory of Data Manager (C:\S4M_DM by default). The passwords are hidden, though. Once logged in, create a new workflow by clicking on the New icon in the ribbon menu. The canvas will appear with a new workflow tab. Before we drag workflow-items into the canvas, let's start with changing the name of the workflow. You can change this in the properties pane on the left side of the screen. You see the property Name, change that to an appropriate name, in this case we will change the name to "WorkflowDemo". Now we are ready to create our workflow within ESB. ESB also works with workflows-items to attach jobs/items to each other. We're going to start with the first workflow item: Source. The source item basically says that the workflow starts, so drag & drop it to the canvas. Once on the canvas, click it. A dotted outline will appear, showing that it is selected. You can now edit the properties and parameters of that workflow-item. Change the Name property to "Start". This is not necessary, but it makes the canvas a lot more clear. This is the only thing you have to do for the source item. See Figure 7
Figure 7: Drag & drop the source item on the canvas and give it a nameNext drag a Trigger item to the canvas. Give it an appropriate name: Trigger in this case. Change the Service parameter to CommandLine. You see that an Agent parameter shows up. Select the one that shows. In this case it is: S4MDEV-DOC01. See Figure 8
Figure 8: Create and configure the Trigger workflow-item.Now we are going to add the ICM-Action workflow-item. Once added to the canvas set the name to something appropriate, in this case: ImportPersons. Then change the Service property to: Service_ImportTask. You will see that a column of parameters is automatically added to the Properties pane. We need to configure those. Agent has two options: ICM_Default and ICM_Localhost. ICM_Default is the one we will choose. At the parameter Solution, select the solution that you created in ETL+, in this case: User_workflow_demo. At the TaskID parameter you have to select which diagram from ETL+ you want to import. In this example we want to import: ETLPrepareUserView. See Figure 9
Figure 9: Create and configure the ICM-Action workflow-item.What we're going to do now is add a "User item" workflow-item. Drag on onto the canvas and give it an appropriate name. Next change the UWFType-parameter to: DMView. Change the UWFInstances to the view that you've created earlier: User_Workflow_Demo in this case. Then change UWFPart to: Selector. (If you haven't created a view or don't know how to create them, go to this page to learn.) Important is to make use of the UserParams. These will make the User Workflow in DMP look a little better. Click here to find out more about the UserParams. See Figure 10
Figure 10: Create and configure the User item workflow-item.Add another User item. Call this workflow-item: Review selection. Change UWFType to DMView, change UWFInstance to the view you just created. Change UWFPart to Confirm. For the next part, you need to have the target table in your database, if you come here for the first time, save you workflow and go to the DMP part by clicking here. --- The last workflow-item we're going to add is the ICM-Action workflow-item. This one will perform a consolidation, so the changed data is written to a database. Add the ICM-Action workflow-item. Change the Service to: Service_PerformConsolidation. A bunch of parameters will appear. Change the Agent to ICM_Default, Solution to the ETL+ Solution you have created and TaskID to the MSSQLConsolidation diagram you have created in ETL+. Now we have to check some parameters, we want to import everything and insert it into the table we created. So check: "Import inventory data", "Consolidate automatic attributes" and "Insert items". See Figure 11
Figure 11: Create and configure the second ICM-Action workflow-item.We're almost done in ESB! The only thing left is to link the different workflow-items to each other. You can do that by selecting the Edit tab in the ribbon menu. You will see a button called Links. Click that and draw lines between workflow-items like seen in Figure 12: hover over the first workflow-item, then click and drag to the next one and let go. The link is now established. The part in ESB is now done. Don't forget to save the project by going to File >> Save!
Figure 12: Establish links between all workflow-items.
Gathering all data and create a User Workflow in Data Manager PortalStart DMP by going to Start >> S4M Data Manager >> DM-Portal. Your browser will popup and a login screen will appear. Login with the credentials you configured during the installation. If you don't remember your username, check the InstallOverview.rtf file located in the root directory of Data Manager (C:\S4M_DM by default). The passwords are hidden, though. Once logged in, go to "View admin" and select the view you've created (In the Add and configure Views in DMP tutorial). A field selector and a field editor will show on the screen. Remove everything in the Field editor, by clicking on the very first folder and then click on the arrows to the left. The folder construction in the Field editor is now disappeared. Search for the columns in the table you want to use inside the Field selector. If you have selected the columns you want to use in your User Workflow, click on the button with the arrows to the right to add them to the Field editor. Be also sure Record selector is set to true on the right side of the screen. Click on the Save button to save the current settings. See Figure 13
Figure 13: Configure the viewOnce the view is configured to your needs, you can go start the User Workflow. Do this by going to the Workflow tab in the Browser pane and click on the Workflow that you've created in ESB. In this case: WorkflowDemo. You will see something like Figure 14, the 2 items that you see are the two User items in ESB. To start this User Workflow, hit the Start Workflow button.
Figure 14: Open and start the User Workflow.You will see 2 windows appear; Source records and Target records. In the Source records window, click on the Refresh data button, it will load for a second and the text on the button will change to Show records, click it again. Records will appear in the Source records window. You can select them and move them to the Target records window, by clicking on the button with the arrows to the right. The selected records will disappear in the Source records window and will show up in the Target records window. Go to the next step by clicking on the Next Step button. Now that we have targets, we can configure ETL+ further, click here to back to the ETL+ part. Read on if you already configured this. See Figure 15
Figure 15: Select source records, target them and go to the next step.Since we selected Confirm at the second User item in ESB, you will see all the target records that you selected. You can verify the targets, if everything is as you wish, click on the Next step button. The targeted data will now be consolidated. This was the tutorial on how to create User Workflows in Data Manager Portal.