Presentation is loading. Please wait.

Presentation is loading. Please wait.

based on the content of the file.

Similar presentations


Presentation on theme: "based on the content of the file."— Presentation transcript:

1 based on the content of the file.
Create a ‘Control’ process flow that determines which sub process to call based on the content of the file. Get File is a FTP Source activity (double click on this activity and set eventContextEnabled as ‘True’). FindOutPOType is a Mapping activity which will contain the rule of finding the Purchase Order type and the lookup to a Routing Table to determine the related sub-flow ID that needs to be called by the ‘Call’ action. Decision Node is ‘Which flow to call’. This has a rule where if no matching sub-flow ID is found in the lookup then we will Admin that now sub-flow was found for the file. Else we will execute the Call function. Notify if no Sub-flow (or sub-process) found for the Purchase Order type If the sub-flow ID is found then we will use a PutContextVar here to assign the sub-process ID into the Call action. F. This is the Call action.

2 Control Flow: Setting up the Mapping to find the Purchase Order type and lookup (1)
Use the same schema both Source and Target here since we want to just do a lookup based on the PO type. Click on the Record node of the target schema and click on Local Variables tab (bottom) and create the following variables. varGetType uses a substring-before option that takes 2 parameters. First is the source field and second is the ‘-’.

3 Control Flow: Setting up the Mapping to find the Purchase Order type and lookup (2)
varGetFlowID: is a Select Query chosen from the ‘Conditonal’ tab. Here the column value that we are selecting is ‘ProcessID’ the DB.TAB takes to values, one is the DB Info name of the connection object that you have created to connect to the database that contains the routing table. The second value is the actual table name. The Where clause is POType = <variable name>. The variable that we created in the previous step is put here. In order to place the variable, go to the right hand Variable panel Double click and the variable will appear in that area. Put single quotes around it since this is a varchar field.

4 Control Flow: Setting up the Mapping to find the Purchase Order type and lookup (3)
varGetFlowID: is a Select Query chosen from the ‘Conditonal’ tab. Here the column value that we are selecting is ‘ProcessID’ the DB.TAB takes to values, one is the DB Info name of the connection object that you have created to connect to the database that contains the routing table. The second value is the actual table name. The Where clause is POType = <variable name>. The variable that we created in the previous step is put here. In order to place the variable, go to the right hand Variable panel Double click and the variable will appear in that area. Put single quotes around it since this is a varchar field.

5 Control Flow: Setting up the Mapping to find the Purchase Order type and lookup (4)
varSetFlowID: this variable uses the set-context function to set the result of the lookup (previous step) in the process flow. In the process flow we will use this variable to dynamically set the flow ID in the Call function.

6 Control Flow: Setting up the rule to check whether or not to call the sub-flow
Condition Wizard Double click on the arrow and Set the rule as shown in the image above. Use the Expression Condition In this window and set the rule. If Flowid is present for the Purchase Order type then it will call that subflow.

7 Control Flow: Setting the sub-flow ID dynamically into the Call function
PutContextVar This is a PutContextVar, which assigns the sub-flow ID to the Call function. Here the Variable value Is $$myFlowID$$ which contains the value that Mapping assigns in the set-context function. Refer to Help Of this forum to learn how to use PutContextVar function in Process Designer.

8 Control Flow: Setting the sub-flow ID dynamically into the Call function
In the Call action property panel, select any process flow in the flowId field. This selection is overridden by the actual Flow ID which is set by the previous PutContextVar action.

9 Example of how to set the Routing Table:
Go to Process Flow Manage page and click on the Process Flow which you want to process a particular Purchase Order type file. From the View page copy the Entity ID from this window and paste it in the Routing Table above.


Download ppt "based on the content of the file."

Similar presentations


Ads by Google