Clarity Service Management

add_request 

12-09-2015 05:07 PM

SPEL API methods

add_request

 

This method allows to create new request by using template or from the scratch. It also allows to populate properties if they are defined for the category

 

Definition:

add_request( uuid, string, string, int, ... ) ;

uuid - user id

string - id of the request template (optional)

string - created_via persistent_id defines creation interface.

int - number of properties values that will be passed to method (0 - no properties values)

... - if number of properties values >0, values of the properties shall be passed first and then name-value pairs for the attributes to update "atribute1", "value1","atribute2", "value2"

 

working examples"

1. Without properties

uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "add_request", who, "3155", "intfc:3553", 0, "customer", who, "category", "pcat:5109");
if (msg_error()) {
  logf(ERROR, "get_failed %s",msg[0]);
}
   

2. With properties, but this time without template

uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "add_request", who, "", "intfc:3553", 1, "test", "customer", who, "category", "pcat:5109");
if (msg_error()) {
  logf(ERROR, "get_failed %s",msg[0]);
}
   

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.