The CreatorCon Call for Content is officially open! Get started here.

How to Decision tables in Workflow run script?

Community Alums
Not applicable

We have a requirement for calling decision table using Decision Table API in workflow via runscript.

Please let me know if you have any pointers or references.

 

Regards,

Bharath Doppalapudi

M:+91 9637470111.

6 REPLIES 6

Hi Harsh,

 

Can you give me some examples of how we can use the decision table in workflow?

Hi Preethi,

Did you ever get this to work? I have managed to get a response back but the values are always empty, not sure what I am doing wrong.

I have doubled checked all my field types match the field types on the decision table.

Code:

var sf = current.u_service_function.getDisplayValue();
var fs = current.u_function_subcategory.getDisplayValue();

var dt = new sn_dt.DecisionTableAPI();
var inputs = new Object();
inputs['u_correlation_id'] = workflow.scratchpad.correlation_id;
inputs['u_service_function'] = sf;
inputs['u_function_subcategory'] = fs;

var response = dt.getDecision('6ff4c8ca1b4364d0be0354a51a4bcbe0', inputs);
gs.log("response = " + JSON.stringify(response));

Kind Regards

Ashley