Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@gsherman
Created December 5, 2016 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsherman/ef53cf08dcda172742bf65059677dc01 to your computer and use it in GitHub Desktop.
Save gsherman/ef53cf08dcda172742bf65059677dc01 to your computer and use it in GitHub Desktop.
Directive file for exporting a business rule
NO_EXPORT OBJECT ALL;
EXPORT OBJECT com_tmplte
UNIQUE_FIELD=title, rule_set,type
WHERE "title = 'test rule' and type = 1"
ACTIONS = EXPORT, DELETE
TO rule_cond THROUGH condition2rule_cond
UNIQUE_FIELD=type, operator, operand1, op1_type, operand2
UNIQUE_RELATION=parentrule2com_tmplte
ACTIONS = EXPORT, DELETE
END_TO
TO com_tmplte THROUGH inv_escal2com_tmplte
UNIQUE_FIELD=title
UNIQUE_RELATION=escal_act2com_tmplte
ACTIONS = EXPORT, DELETE
END_TO
;
@gsherman
Copy link
Author

gsherman commented Dec 5, 2016

Business Rule name

Note the WHERE clause in the bizrule.dir file.
WHERE "title = 'test rule' and type = 1"
This limits the export to one business rule based on its title.

Export using DIET:

c:\diet.exe -expdef -export bizrule.dat -archive -dir bizrule.dir -user_name sa -password myPassword -db_server localhost -db_name dovetail

Note the use of the -expdef option, which will export all fields, including empty strings and NULLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment