Runtime tools : Channels components : REST channel : Tasks : Handling Flow
  
Handling Flow
{Project Name}: TestRestChannel
{Flow Name}: restChannelFlow
{Data Name}: stringDataFL
{KColl Name}: restKcollFL
{IColl Name}: listFL
 
Resource
Method
Parameters
Consume
Produce
rest/flows/{flow}
POST
 
application/json
application/json
rest/flows/{flow}/{procid}
GET
callback sid
 
application/json
application/javascript
 
POST
 
application/json
application/json
 
PUT
 
application/json
application/json
 
DELETE
 
 
application/json
rest/flows/{flow}/{procid}/{params:.*}
GET
callback sid
application/json
application/json
application/javascript
 
POST
 
application/json
application/json
 
PUT
 
application/json
application/json
 
DELETE
 
 
application/json
1 Get process id {procid} of flow. Access the URL.
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow
It would return json string which contains:
"dse_processorId":"FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA"
FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA is the process id.
Note All the other requests need process id first.
2 Get data value of flow. Access the URL.
Field:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/stringDataFL
It returns string.
KColl:
80/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/restKcollFL/stringDataFL
IColl: there are two ways.
IColl: get all the data of IColl
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/listFL
IColl:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/listFL/0
It returns json string.
Context:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA
3 Edit the value of data in flow. Access the URL.
Field:
URL:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA
Content type: application/json
Input example: {"stringDataFL":"hello"}
KColl: there are two ways.
Edit all the values:
URL:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/restKcollFL
Content type: application/json
Input example: {"dataString":"hello"}
Result: restKcollFL has only {"dataString":"hello"} and other data are lost.
URL:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA
Content type: application/json
Input example: {"restKcollFL":{"stringDataFL":"hello"}}
Result: The KColl with index 0 in listFL would change to {"dataString":"hello"} and other data are lost.
4 Move to the next state of flow. Access the URL.
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA
Input: {"dse_nextEventName":"toNextEvent"}
Note dse_nextEventName is the parameter of system and toNextEvent is the next event name of the state.
5 Delete elements in flow. Access the URL.
Field:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/stringDataFL
KColl:
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/restKcollFL/stringDataFL
IColl: delete the data with index 0 in listFL
http://localhost:8080/TestRestChannel/rest/flows/restChannelFlow/FUBNHCDMCUBTACEPDFCTFREOCDETAFEUABIAFMIA/listFL/0
Go up to
Tasks