Last active
August 29, 2015 13:56
-
-
Save gsherman/9139035 to your computer and use it in GitHub Desktop.
Make "Run Task Set" a Business Rule Event and Activity Log entry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add Run Task Set to the list of events | |
You can do this one of two ways. | |
Using Clarify UI Editor, Modify Form 472 | |
Modify the control named "SEL_EVENT" | |
Add an Item of "Run Task Set" | |
Add a Path of CASE | |
Add a Value List Name of USER1005 | |
Save it & Add this form to the proper Resource Configs | |
(This allows your custom event to be visible in the Clarify Client and in DovetailAdmin). | |
- OR - | |
Modify $DovetailAdmin\pages\biz_rule\inc_lists.asp | |
Locate the function DdlEvents() | |
Add your custom event option, for example: | |
out += '<option '; | |
out += 'value="USER1005" '; | |
out += 'object="CASE"'; | |
out += '>Run Task Set</option>' ; | |
(This allows your custom event to be visible only in DovetailAdmin). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OBJECT TYPE="gbst_elm", NAME=new_activity UNIQUE_FIELD=title,rank | |
UNIQUE_RELATION=gbst_elm2gbst_lst | |
FIELDS | |
title ="Run Task Set"; | |
rank=94001; | |
state=0; | |
END_FIELDS | |
RELATIONS | |
TO_NAME=activity_name REL="gbst_elm2gbst_lst"; | |
END_RELATIONS | |
END_OBJECT NAME=new_activity | |
REFERENCE TYPE="gbst_lst", NAME=activity_name UNIQUE_FIELD=title | |
FIELDS | |
title ="Activity Name"; | |
END_FIELDS | |
RELATIONS | |
END_RELATIONS | |
END_REFERENCE NAME=activity_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OBJECT TYPE="prop_name", NAME="TaskSetNameRuleProperty" | |
UNIQUE_FIELD=obj_type, prop_name | |
FIELDS | |
obj_type=0; | |
prop_name="Task Set Name"; | |
path_name="focus_obj2act_entry:addnl_info"; | |
subtype=0; | |
val_type=0; | |
max_len=255; | |
END_FIELDS | |
END_OBJECT NAME="TaskSetNameRuleProperty" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OBJECT TYPE="com_tmplte", NAME="com_tmplte_268435600" | |
FIELDS | |
title = "Run Task Set"; | |
rule_set = "Dovetail"; | |
description = "Have rulemanager run a task set using the tskmgr.exe"; | |
type = 1; | |
END_FIELDS | |
END_OBJECT NAME="com_tmplte_268435600" | |
OBJECT TYPE="com_tmplte", NAME="com_tmplte_268435601" | |
FIELDS | |
title = "Run Task Set"; | |
flags = 1552; | |
action = "\"C:\\dovetail\\task manager\\ExecuteClarifyExe.bat\" tskmgr.exe Case id_number \"[Object ID]\" \"[Task Set Name]\""; | |
type = 3; | |
urgency = 36; | |
END_FIELDS | |
RELATIONS | |
TO_NAME="com_tmplte_268435600" REL="escal_act2com_tmplte"; | |
END_RELATIONS | |
END_OBJECT NAME="com_tmplte_268435601" | |
OBJECT TYPE="rule_cond", NAME="rule_cond_268436130" | |
FIELDS | |
type = 2; | |
operand1 = "USER1005"; | |
END_FIELDS | |
RELATIONS | |
TO_NAME="com_tmplte_268435600" REL="parentrule2com_tmplte"; | |
END_RELATIONS | |
END_OBJECT NAME="rule_cond_268436130" | |
OBJECT TYPE="rule_cond", NAME="rule_cond_268436131" | |
FIELDS | |
type = 1; | |
operand1 = "Case"; | |
END_FIELDS | |
RELATIONS | |
TO_NAME="com_tmplte_268435600" REL="parentrule2com_tmplte"; | |
END_RELATIONS | |
END_OBJECT NAME="rule_cond_268436131" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Yes, this is Javascript. | |
//Convert to your language of choice | |
function AddActEntryAndTimeBomb(caseObjid, TaskSetName){ | |
var actEntry = FCSession.CreateGeneric("act_entry") | |
actEntry.AddNew(); | |
actEntry("act_code") = 94001; | |
actEntry("entry_time") = -999; | |
actEntry("addnl_info") = TaskSetName; | |
actEntry.RelateByID(FCSession.Item("user.id"), "act_entry2user"); | |
actEntry.RelateRecords(caseObjid, "act_entry2case"); | |
actEntry.RelateByID(FCApp.GetGbstElmRankObjid("Activity Name", 94001), "entry_name2gbst_elm"); | |
actEntry.Update(); | |
var timeBomb = FCSession.CreateGeneric('time_bomb'); | |
timeBomb.AddNew(); | |
timeBomb("escalate_time") = -999; | |
timeBomb("end_time") = -999; | |
if(FCApp.schema_rev >= 55){ //55 = clarify_10 | |
timeBomb("creation_time") = -999; | |
} | |
timeBomb("focus_type") = 0; | |
timeBomb("flags") = 65863682; // (1005*65536) + 2 = 65863682 | |
timeBomb.RelateById(FCSession.Item("employee.id"),"cmit_creator2employee"); | |
timeBomb("focus_lowid")= caseObjid; | |
timeBomb("time_period")= actEntry.Id; | |
timeBomb.Update(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment