Get code for a decision revision

get/flows/{decisionId}/revisions/{revisionId}/code
Internal-Use Only

Retrieves the DS2 package code, which can then be used to execute the decision revision.

Request Samples

1

Response Samples

1ds2_options scond=none;
2/* Custom Object add_cf retrieved on Fri May 07 16:25:43 UTC 2021 */
3/*{"signatureExtension":[]}*/
4package "add_dec_add_cf" /inline;
5 method execute(double a, double b, in_out double c);
6 c=a+b;
7 end;
8endpackage;
9ds2_options scond=none;
10
11/* Decision add_dec version 1.5 generated on Fri May 07 16:25:43 UTC 2021 */
12package Decision_ba7b8073_83f7_41ae_827 / inline;
13 dcl package logger logr_perf('App.tk.SID.Perf');
14 dcl double timer_start;
15 dcl double elapsed_time;
16 dcl double total_timer_start;
17 dcl double total_elapsed_time;
18
19 dcl package "add_dec_add_cf" "add_dec_add_cf_hdl"();
20
21 method initRuleFiredRecording();
22 dcl integer ruleFiredStartPosition;
23
24 /* query and set offsets - always traverse in same order as execute() method */
25 ruleFiredStartPosition = 1;
26 end;
27
28 method init();
29 initRuleFiredRecording();
30 end;
31
32 method execute (
33 double "a"
34 ,double "b"
35 ,in_out double "c"
36 ,in_out varchar "PathID"
37 ,in_out char "ruleFiredFlags"
38 ,in_out integer "rulesFiredForRecordCount"
39 ,in_out integer "_filter_"
40
41 );
42 dcl integer dg_filter_;
43
44 total_timer_start = datetime();
45
46 timer_start = datetime();
47 "add_dec_add_cf_hdl".execute("a", "b", "c");
48 elapsed_time = datetime() - timer_start;
49 logr_perf.log( 'd', 'Package Name: Decision_ba7b8073_83f7_41ae_827, Node Name: add_cf, Node ID: 5da31100-8063-4dae-8b6d-dbc5965328d9, NODE DURATION: ' .. elapsed_time);
50 if ("_filter_" = 0) then return;
51
52 "PathID" = "PathID" || '/' || '5da31100-8063-4dae-8b6d-dbc5965328d9';
53
54 "end": /*label for decision node link to flow end*/
55
56 total_elapsed_time = datetime() - total_timer_start;
57 logr_perf.log( 'd', 'Package Name: Decision_ba7b8073_83f7_41ae_827, TOTAL DURATION: ' .. total_elapsed_time);
58
59 end;
60endpackage;
61

Path Parameters

NameTypeRequiredDescription
decisionId
string
true

The identifier for the decision.

Examples:
"094078e7-278a-4719-a704-6e5e65af29ee"
revisionId
string
true

The identifier for the decision revision.

Examples:
"cd942f3c-60a0-4b16-9184-4cb8921fb0eb"

Query Parameters

NameTypeRequiredDescription
inlineAdvanceListValues
boolean
false

Specifies whether the currently deployed rows in an advanced list are included as inline values within the generated code. Advanced lists and rows within an advanced list can be deployed by using the SAS Intelligent Decisioning web application, the SAS Fraud Decisioning application, or the List Data API. If this parameter is 'true', the deployed rows in an advanced list are re-created as a data grid in the generated code. If this parameter is 'false', the advanced list must exist as a tabular data set on the Redis server. To get generated code for Cloud Analytic Server, Teradata, or Hadoop destinations, specify 'true' as the parameter value.

codeTarget
string
false

The type of platform or scenario in which the generated code is used. Code targets:

  • microAnalyticService - Use this type when the generated DS2 is going to be run on SAS Micro Analytic Service.
  • docker - Use this target type when the code must be published to Docker.
  • gitMas - Use this target type when the code must be published to Git MAS.
  • gitCas - Use this target type when the code must be published to Git CAS.
  • procds2 - Use this target type when code must be run inside a SPRE session. The data query is executed using sqlstmt package.
  • casFull - Use this target type to produce a full DS2 program for running inside CAS, including the thread and data program in addition to the needed packages.
  • inDatabase - Use this target type to produce a DS2 program for running in-database.
  • spre - Use this target type when code must be run inside a SPRE session. The data query is executed in SAS Micro Analytic Service (MAS).
  • subDecision - Use this target type when the code is included as part of another decision and should not be wrapped in a driver.
  • others - Use this target type in all other cases.
Allowed values:
microAnalyticServicedockergitMasgitCasprocds2casFullinDatabasespresubDecisionothers
Examples:
"microAnalyticService"

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
404Not FoundNo code for the decision revision exists at the requested path.HeadersSchema