Friday 20 December 2013

Creating Workflow

Hands on 03_Creating_Workflow:-

 

                                            The exercises in this lab familiarize the student with the process 
                      of creating a simple workflow with a start task and session task. This workflow
                      will essentially define a run-time version of the mapping created in the previous lab.
                      The exercises will also familiarize the student with the process of starting and 
                      monitoring a workflow.

Objectives:

                      After completing the lab,students will be able to:
  • Use the Workflow Manager
  • Create a new workflow.
  • Create and edit session tasks.
  • Link tasks within a workflow.
  • Validate a Workflow
  • .Start a workflow.
  • Use the Workflow Monitor to monitor a workflow.
  • View session information and the session log after
    a workflow has run.

Exercises:

                                       8.1 Exercise 1: Create a Workflow

                         In this exercise,Students will create a new Workflow

            Step 1. Start the Workflow Manager:

  1. Select Start ->Programs -> Informatica 9.0.1 -> Client -> Power Center                   Client-> Power Center Workflow Manager
  2. Click on OK







              Step 2. Connect to the Repository:

                              6. Select the RRITEC_REP repository.
                              7. Right Click on Repository RRITEC_REP | Connect
                              8. The Connect to Repository dialog box appears 
                  





                                   9. Enter the username and password--
                                         username: Administrator
                                         password: Administrator
                                  10. Click the Connect button.
                                  11. Right-click on the RRITEC folder and select Open.
                                  12. Open the Workflow Designer by selecting Tools | Workflow Designer or click
                                         the Workflow Designer button above the workspace

            Step 3. Set the default target load type:

                          1. Select Tools | Options, Miscellaneous tab, and set the default target
                              load type for all sessions to Normal.




                                       2. Click OK.

            Step 4. Create a new Workflow:

 

 

                                  1. Select Workflows | Create.
                                  2. The Create Workflow dialog box appears 
                                  3. On the General tab, enter wf_ODS_EMPLOYEE in the Name field




                                    4. Click OK.
                                    5. The Start task appears in the Workflow Designer workspace:




                               6. Save the repository


            8.2 Exercise 2: Create Source and Target Database Connections

Creating Source Connection :

                              1. Go to Connection menu -> Click on Relational -> Click on
                                  new ->Select Oracle ->click on OK ->
                                             o Name : Native_source
                                             o Username : sdbu
                                             o Password :Rritec123
                                             o Connect String : ORCL






      
                              2. Click on OK -> Click on Close


Creating Target Connection :

                            1. Go to Connection menu -> Click on Relational -> Click on new 
                                ->Select Oracle ->Click on OK ->
                                                     o Name : Native_target
                                                     o Username : tdbu
                                                     o Password :Rritec123
                                                     o Connect String : ORCL




                                      2. Click on ok -> Click on Close



                8.3 Exercise 3: Create a Task and Run the Workflow

 

 

                                       In this exercise,Students will create a Session task

                    Step 1. Create a Session task:

  1. Note that each session task is associated with a single mapping.                               Click on the Session button on the Task toolbar.





                             This appears by default at the top right of the Designer window and
                             may be part hidden. Click on the vertical bar at the left of the toolbar
                             to drag it to another position.

                         2. Move the pointer into the workspace and Click -> 
                             The Mappings dialog box appears -> Select the mapping
                              m_ODS_EMPLOYEE -> Click OK.
                         3. The session task s_m_ODS_EMPLOYEE appears in the workspace.
                         4. Save the repository.

  • Note : We can also create using navigation Tasks ->Create ->provide name 
                     m_ODS_ EMPLOYEE ->Create -> Select the mapping m_ODS_EMPLOYEE 
                     -> Click OK

        Step 2. Edit the Session task’s properties:

                     1. Double-click on the s_m_ODS_EMPLOYEE Session task. Then 
                         Edit Tasks dialog appears -> Select the Properties tab
                     2. Note that the default Session Log File Name, s_m_ODS_EMPLOYEE.log, 
                        and the default Session Log File directory, $PMSessionLogDir, may be
                        overridden, but we will use the defaults for this lab.
                    3. Select the Mapping tab.
                    4. In the Navigator window, select the source sq_EMPLOYEE.
                         In the Connections section, click on the down arrow , select native_source
                         and click OK.

.


                         5. In the Navigator window, select the target ODS_EMPLOYEE.
                         6. In the Connections section, click on the down arrow , select 
                             native_target and click OK.
                        7. In the Properties section, the Target load type should be defaulted to Normal.
                        8. Scroll down (if necessary) and check the Truncate target table option
                            check box.
                        




                     9. Click  OK to close the Edit Tasks dialog box.
                  10. Save the Repository

          Step 3. Link the Workflow tasks:

                    1. Click the Link button on the Task toolbar.
                    2. Left-click and drag the cursor between the Start task and the
                       s_m_ODS_EMPLOYEE task:






                  3. Toggle off the ‘link mode’ by clicking again on the Link button, or 
                      single click on one of the objects.

         Step 4. Validate the workflow:


                 1. In order for a workflow to be valid, all tasks must be linked. 
                    Save the repository.
                 2. Locate the Save tab in the Output Window at the bottom of the 
                   Workflow Manager and view the results of the validation check:





      Step 5. Start the Workflow:

                      1. Select Workflows | Start workflow, or right-click in the workspace and
                         select Start Workflow.
                     2. The Workflow Manager dialog box appears:

 

 

                                       8.4 Exercise 4: Monitor the Workflow 

 

Step 1. Navigate in Workflow Monitor:




                         1. A workflow will show a Succeeded status if it starts up and complete
                             successfully, in and of itself. There may be several tasks within the 
                            workflow and each will succeed or fail but the workflow itself will can 
                            complete successfully. One of the only reason to workflow will fail,that  is 
                            when the Server cannot write the workflow log. The Workflow Monitor 
                            window opens automatically when a workflow is started and automatically 
                            logs into the repository, displaying the workflow status.

                       2. The Workflow Monitor has two tabs – Gant Chart and Task View. 
                           Look at the Task View.
                    



   


                        3. Notice the two objects:
                                      wf_ODS_EMPLOYEE (workflow)
                                      s_m_ODS_EMPLOYEE (session task)
                        4. The Status column shows the session status:
  •  Succeeded indicates that the Informatica Server was able to                   successfully complete a workflow or task.
  • Failed indicates that the Informatica Server could not complete the            workflow or task due to a fatal processing error.
 
 

        Step 2. View the Session properties:

                    1. Session properties provide detailed information about processing, 
                       such as the number of rows loaded into the target by a session task. 
                       Locate the s_m_ODS_EMPLOYEE session task under the Workflow 
                       Run column
                  2. Right click on s_m_ODS_EMPLOYEE session -> Click on get run
                      properties
-> Observe source success rows and target success rows.


 



      Step 4. View the Session log:



             1. Right-click on the session in the Task Name column (Time window) 
                 and select Get Session Log, or by clicking on the Session Log button.
             2. The session log is displayed:






















 

No comments:

Post a Comment