Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

keep the results of interim population between two executions - How to monitor and turn off with a work flow

Avatar

Avatar
Validate 1
Level 1
Ken_Qrious
Level 1

Like

1 like

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
Ken_Qrious
Level 1

Like

1 like

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Ken_Qrious
Level 1

28-02-2021

We have discovered that our campaign users routinely set the "keep the results of interim population between between two executions" for campaigns, hypothesis and technical work flows.  This can causes issues with DB disk usage so we would like to create a technical work flow to monitor for this setting and turn it off.

 

I can see the the event table contains "KeepResult" which allows us to identify campaigns etc which have been run with this setting on but the information is historical and not necessarily the current setting for the campaign.

 

Is there a way to check the current setting for "keep the results of interim population between between two executions" for a campaign/hypothesis/work flow and update this setting through an automated process?

 

View Entire Topic

Avatar

Avatar
Give Back
Level 4
ParthaSarathy
Level 4

Likes

34 likes

Total Posts

59 posts

Correct Reply

26 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Give Back
Level 4
ParthaSarathy
Level 4

Likes

34 likes

Total Posts

59 posts

Correct Reply

26 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile
ParthaSarathy
Level 4

01-03-2021

Hi @Ken_Qrious ,

Yes you can achieve this by creating a workflow.

keepInterim.PNG

Schedule to run the Workflow weekly once.

 

In Query, Target all the workflows for the initial run and later you can have condition like created date on or after DaysAgo(7) OR last modified on or after DaysAgo(7). Lets say the internal name of the Query is 'allWorkflowQuery'

 

In JavaScript Code,

var query = xtk.queryDef.create(
<queryDef schema="temp:allWorkflowQuery" operation="select">
     <select>
          <node expr="@id"/>
     </select>
</queryDef>
);
var record = query.ExecuteQuery();
for each (var variable in record) {
var primaryKey = variable.@id;
var keepInterimResult = 0;
xtk.session.Write(<workflow xtkschema="xtk:workflow" _operation="update" id={primaryKey} keepResult={keepInterimResult} />);
}
 
Now When you run the workflow, All the "keep the results of interim population between between two executions" will be unchecked automatically.
 
Regards,
ParthaSarathy S.