Routing by Parameter

The simplest Integration Service you can have is the routing by parameter. The general steps are valid for all other template types for the different integration patterns.

  1. Create a simple project named routing.
  2. From the project’s pop-up menu, select New -> Integration Service.


Routing by Parameter 1


  1. From the template list in the wizard, chose Routing by Parameter.


Routing by Parameter 2


  1. Click Next.
  2. Enter a name of the routes artifact (e.g. simple_routing.flow).


Routing by Parameter 3


  1. On the next page, enter the required parameters for this particular template:

Identifier: simple_routing

Endpoint Address: simple_routing_endpoint

Content Based Routing 4


  1. Click Finish and inspect the generated artifact, which should look like this:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
	{  
	   "name":"simple_routing",
	   "properties":{
	      "myKey2":"myValue2",
	      "myKey1":"myValue1"
	   },
	   "steps":[  
	      {  
	         "type":"condition",
	         "name":"1",
	         "cases":[  
	            {  
	               "key":"name",
	               "value":"Joe",
	               "flow":{
	                  "name":"WelcomeJoe",
	                  "steps":[  
	                     {  
	                     	"name":"4",
	                        "type":"output",
	                        "message":"Welcome Joe"
	                     }
	                  ]
	               }
	            },
	            {  
	               "key":"name",
	               "value":"null",
	               "flow":{  
				      "name":"NoName",
	                  "steps":[  
	                     {  
	                     	"name":"5",
	                        "type":"output",
	                        "message":"Add to the request URL '?name=Joe'"
	                     }
	                  ]
	               }
	            }
	         ]
	      }
	   ]
	}

  1. Now Activate ot Publish the project and it’s done. (See Activate or Publish)
  2. Go to following location and try it:

http //[host]:[port]/dirigible/services/flow/project/simple_routing.flow

The pattern which is used for generating the location URL can be found here.

Edit