Page tree
Skip to end of metadata
Go to start of metadata

(EvalPD_ProcessFlow)
Process Flow is the set of activities arranged in a sequence to perform a specific task(s). Process Flow is created by combining various activities such as Source, Target, Schema or Transformer activities in a logical sequence. Process Designer is used to create a Process Flow. Process Designer has list of activities created. You only need to arrange them in a logical sequence and connect them with BPMN Flows.
 

Steps to create EvalPD_ProcessFlow

  1. On the Adeptia Suite homepage menu, click the Develop tab.
  2. Go to Process > Process Flow. The Manage Process Flow screen is displayed with the list of existing Process Flows (refer to Figure 55).
  3. Click the Create New link. The Create Process Flow screen is displayed (refer to Figure 56).
  4. Enter the name and description of the Process Flow.
  5. Click the Process Designer button to open Process Designer. The Process Designer screen is displayed (refer to Figure 57).

    For more information on how to create process flows and on Process Designer screen, refer to the Creating Process Flow section.

  6. Click OK to synchronize.
  7. Click [+] Activities in Repository Panel, to expand the list of services and then click [+] Source. All items in the Source category are displayed.
  8. Click the [+] File Source. A list of existing File Source activities that is displayed.
  9. Select EvalPD_FileSource and drag it to the Graph Canvas Area (see Figure 93).

    Figure 93: Drag File Source Activity to Graph Canvas Area

  10. To create Process Flow Variable, click Process Flow Variables tab in the bottom pane. The Process Flow Variables panel is displayed in bottom pane (see Figure 94).

    Figure 94: Process Flow Variables Panel

  11. Click the New Process Flow Variable ( ) button. The Process flow variable entry dialog box is displayed (see Figure 95).

    Figure 95: Create Process Flow Variable

  12. Type Data in the Variable Name field and click Ok. A process flow variable with name Data is created.
  13. To create Context Target, click [+] Target under Activities list in Repository View, to expand the list of Target activities.
  14. Click [+] Context Target activity to expand the Context Target activity. The Context Target node is displayed.
  15. Drag the Context Target node to the Graph Canvas Area (see Figure 96).

    Figure 96: Drag Context Source Activity to Graph Canvas Area

  16. Right-click the Context Target and select View Properties. Properties of the Context Target are displayed in the Bottom Pane (see Figure 97).

    Figure 97: View Properties of Context Target Activity

  17. Change value of the property Label from Context Target to EvalPD_ContextTarget.
  18. Enter name of the Context Target activity i.e. Data (as given in the step 12) for the property Name.
  19. Select Data from the parameterName dropdown list (see Figure 98).

    Figure 98: Enter Context Target Name

  20. Click [+] Source and then [+] Context Source. Select Context Source and drag it to Graph Canvas Area.
  21. Right-click the Context Source and select View Properties. Properties of the Context Source are displayed in the Bottom Pane (see Figure 99).

    Figure 99: View Properties of Context Source activity

  22. Enter the name of the Context Source as DataSource in the Value field of the Name property.
  23. Change the value of Label from Context Source to EvalPD_ContextSource.
  24. Select Data from the parameterName dropdown list (see Figure 100).

    Figure 100: Enter Context Source Name

  25. Click [+] Repeater Node to expand it. Select Repeater Service and drag it to the Graph Canvas Area.
  26. Click [+] Target and then [+] File Target. Select EvalPD_FileTarget activity and drag it to the Graph Canvas Area.
  27. To select a BPMN Gateway, click the Gateway ( ) icon in the Palette and drag it to the Graph Canvas Area (see Figure 101). In this Process Flow, Gateway is used to check the purchase amount and to decide which mail target is to be used.

    Figure 101: Drag BPMN Gateway Element to Graph Canvas Area

  28. Click [+] Action to expand the list of actions.

    An Action name is always unique.

  29. Select Trace and drag it to the Graph Canvas Area. Trace is used to write any message, which is later, logged into the Process Flow Log during the execution of Process Flow (see Figure 102).

    Figure 102: Drag Trace Action

  30. To enter the message, right-click the Trace activity and select View Properties. The properties of the trace activity are shown in the Properties Panel of the Bottom Pane (see Figure 103).


    Figure 103: View Properties of Trace Action

  31. In the value field of the Message property enter the following message: 
    Mailing Purchase Order (PO# = $$PO#$$ and Amount = $ $$PO_Amount$$) for approval to Manager
  32. Change the Name and Label of the Trace activity to EvalPD_TraceForPOLessThan50K.
  33. Similarly, again drag Trace from the list of actions, change its Name and Label to EvalPD_TraceForPOGreaterThan50K and enter the following message in the Value field of the Message property (see Figure 104).

    Mailing Purchase Order (PO# = $$PO#$$ and Amount = $ $$PO_Amount$$) for approval to Director

    Figure 104: Drag another Trace Action

  34. Click [+] Target and then [+] Mail Target. Select EvalPD_MailTargetLessThan50K activity and drag it to the Graph Canvas Area.
  35. Select EvalPD_MailTargetGreaterThan50K activity and drag it to the Graph Canvas Area.
  36. Once all the activities are dragged to the Graph Canvas Area, they must be connected using appropriate BPMN Flows or Control Flows.
  37. Click the Sequence Flow (  ) icon in the Palette. The Sequence flow is selected.
  38. To connect Start Event with EvalPD_FileSource, drag mouse pointer from Start Event to EvalPD_FileSource (see Figure 105).

    Figure 105: Connect Start Event to File Source Activity

  39. Similarly, connect all other activities as shown in Figure 106.


    Figure 106: Connect all Activities

    Figure 106 shows only the control flow of the Process Flow. Control Flow only shows the order in which activities of a Process Flow are executed. It does not show the flow of data. For example as you can see in the Figure 106, control flow from Repeater Service goes to EvalPD_FileTarget and further to the Decision Node. But data is not passed from EvalPD_FileTarget to the Decision Node. Data is directly passed from Repeater Service EvalPD_FileTarget and both of the mail target activities (EvalPD_MailTargetLessThan50k and EvalPD_MailTargetGreaterThan50k). To create the data flow, you need to create Multiple Stream from repeater service to EvalPD_FileTarget and Mail Target activities. Here you need to create two streams from the Repeater Service. One Stream goes to EvalPD_FileTarget and the other stream goes to both of the Mail Target activities.

  40. To create data stream, right-click Repeater Service and select Multiple Stream. The Multiple Stream dialog box is displayed (refer to Figure 83).
  41. Enter number of streams (2) in the Enter stream count field, and then click the Add Stream button.
  42. Select 1 from the Streams dropdown list, and select EvalPD_FileTarget. from the Activities dropdown list.
  43. Click the Map button. A stream between Repeater Service and EvalPD_FileTarget is created (see Figure 107).

    Figure 107: Create Stream

  44. Ensure that the Explicit Stream checkbox is selected.
  45. Select 2 from the Streams dropdown list, and select EvalPD_MailTargetLessThan50K from the Activities dropdown list, and click the Map button.
  46. Select EvalPD_MailTargetGreaterThan50K from Activities dropdown list, and click the Map button. A dialog box is displayed (see Figure 108).

    Figure 108: Add another Stream

  47. Click the Yes button to add second mail target activity to the same stream.
  48. Click the Done button to close the Multiple Stream Dialog box. Data stream created is shown in the Graph Canvas area (see Figure 109).

    Figure 109: Multiple Streams Created

  49. To define the decision criteria, right-click the control flow which is connecting Decision Node with EvalPD_TraceForPOLessThan50K and select View Properties. Properties of the selected control flow are shown in the Properties Panel in the Bottom Pane.
  50. Click the Edit Condition in the Properties Panel. The Condition Wizard is displayed (refer to Figure 226).
  51. Select Java Condition and click the Next button. The Condition Type screen is displayed (refer to Figure 227).
  52. Enter the sample Java Code to specify the decision criteria and click the Done button (see Figure 110).

    // retrieving purchase order from context 
    String purchaseOrderData = (String)
    context.get("Data");
    // filling purchase order attributes
    String [] dataArray = purchaseOrderData.split(",");
    int amount = 0;
    for( int i = 0 ; i < dataArray.length ; i++ )
    {
    //extracting  purchase order PO_AMOUNT attribute
                    if(dataArray[i].indexOf("PO_AMOUNT")!= -1)
                    {
                    String [] attributeArray = dataArray[i].split("=");
                    context.put("PO_Amount", attributeArray[1] );
                    amount = Integer.parseInt(attributeArray[1]);
                    }else       if( dataArray[i].indexOf("PO#")!= -1)
                    {
    //extracting  purchase order PO# attribute
                    String [] attributeArray = dataArray[i].split("=");
                    context.put("PO#", attributeArray[1] );
                    }
    }
    // checking condition
    if(amount < 50000){
                    return true ;
    }else{
                    return false;
    }


    Figure 110: Sample JAVA Code

  53. Similarly, define the following decision criteria on the Control Flow connecting decision node and EvalPD_TraceForPOGreaterThan50K. (see Figure 111).

    // retrieving purchase order from context
    String purchaseOrderData = (String) context.get("Data");
    //splitting order to fill attributes 
    String [] dataArray = purchaseOrderData.split(",");
    int amount = 0;
    for( int i = 0 ; i < dataArray.length ; i++ )
    {
                    //filling amount from PO_AMOUNT attribute
                    if(dataArray[i].indexOf("PO_AMOUNT")!= -1){
                    String [] attributeArray = dataArray[i].split("=");
                    amount= Integer.parseInt(attributeArray[1]);
                    }
    }
    if(amount >= 50000)
    return true ;

    Figure 111: Define Decision Criteria

  54. To define the Sequence Flow Ordering, right-click the decision node and select the Sequence Flow Ordering option. The Sequence Flow Ordering dialog box appears (refer to Figure 229).
  55. Ensure that the control flow connecting decision node and the EvalPD_TraceForPOLessThan50K is listed first.

    A default outgoing sequence flow is added for the gateway. While executing a process flow, if none of the specified conditions are met, then the default gateway is executed. If there is no default gateway specified, then an error occurs at the Process Flow design level.

  56. Save the Process Flow by clicking the File menu and selecting Save Process Flow to Server. A dialog box is displayed confirming that the EvalPD_ProcessFlow has been saved successfully. If the comments property is enabled, then clicking Save Process Flow to Server will display a screen where you need to enter comments related to creating the process flow (refer to Figure 195).
  57. Enter the comments in the Specify Comments for process flow customer field.

    The comment should be at least 1 character in length.

  58. Click OK to save the comments. This displays a screen confirming that the process flow has been created successfully.
  59. Exit the Process Designer by clicking the File menu and selecting Exit.

5

  • No labels