Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Categories customisation with permission work

Status
Not open for further replies.

madhuusa

IS-IT--Management
Oct 5, 2006
93
US
Guru's,
Here is my req.

I have a category/attribute (let's call it Cat:Finance and Attrib as Status) which can be changed from Active to Inactive status. This will happen via cats/atts submenu screen under properties menu.

Once this happens I need to do 2 things.

1.Change the permission of the document (and the parent folder)
2. Copy the document over to another folder.

I dont want to use workflow's or webreports. I want to write a small OScript module which can do this.

Can you tell me the steps on which module to override and use.

Thanks, Madhu
 
Are you willing to do some research on CallBack Objects ?

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Can you please point some links in KC on this (or anywhere else).

Is Callback objects extending objects using their llnode.create method. For instance Can i extend category and create MyCategory so that it can pick up custom code on the back.

Please advice.
 
Unfortunately they do not have implemented any callback objects for something when the attribute value changes.Here's a thread where
Christopher Meyer explains how to do it.
But something easier might be looking at annode event ,perhaps like a NodeVersionCreate subclass or something along those lines.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Another simpler idea would be to watch that folder,especially if this thing happens in a special folder,and write a simple agent that can do the business logic.Agents are pretty easy to do.There is a customagent code module in OT.I used that agent and posted a workflow sample in OT as well.

I am almost sure that when you apply/change a acategory in a node one of the four dates in dtree changes.You could also explore if you could "piggy back" off of a notification event.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Nair,
Can you please post the link of the custom agent you wrote.

Can't I just override the submit action on that specfic cats/atts page and write custom code. Is there no hook for this kind of action.

Chris's link mainly talks about tweaking the page when it loads with respect to cats/atts.

One more constraint is that I should not allow a specific attribute value to change (say from review to complete for a parent document) if a corresponding child document does not exsist in the same folder.

There are couple of small things like this also. I was hoping I could easily orphan and override the submit button and then proceed.
 
if you look at this date,I wrote it when OT did not have a workflow agent out of the box,


But still agent code hasnot cahnged that much should work as well.

You should be abele to trace the category attribute update to somewhere in editattrs2 or something like that.I actually did something similar,but did not quite like it.

If you need to take a look at my research,I should be able to give you something on monday,I don't have my code stuff handy,but you are right,if you trace the call of the submit action you should be able to find a good place to get it done.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Thanks for the link.

I will go thro the oscript and get back to you.

I put a break point on the editattrs2, but did not break there. Maybe I missed something. I will revisit this again.

Will get back tomorrow on this.
 
You can trace the submit and apply action to
Code:
WEBATTRIBUTE::WebAttributeAction::RunTimeAction::AttrValuesEdit2
Put a break in the SubClassExecute and your break will be hit.

Please let me know how you are planning to implement or post it in the WIKI for everybody's comment on it.

The way I did it was,I employed a node command,so I could get a command in one of the nodes,and the command would be in my module,and then I traced almost all this code ,inherited,copied a lot of superflous code and finally got it working(I am not proud of it otherwise I would have shown it off )I still think you should take Chris's approach so that you ahve a good framerwork to work on.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Nair,
I think I got the thread.

I installed Chris's module and it breaks nicely in editattrs2.

I will proceed on the coding using Chris's framework and keep you posted. Thanks for your inputs.

Madhu
 
Hello Nair,

Although I am able to trace the flow, I am not getting the essence of it.

#1:
Some of my requirements can be met by javascript. For instance in the attribute (called Status having values Active, Review, Attested) dropdown, only shift from Active to Review is allowed whereas all other shifts should not be allowed.
Question: Can I tap the attrrtset html file and put javascript for this. Although I understand when the attribute values changes (due to business req change) I have to re-code it. But since the business req is pretty frozen, can I do these validations in client side and is attrrtset the correct file.

#2: Once the shift happens from say Active to Review, I need to invoke API call to change the parent folder permissions. THis can be easily done. But how do I get the target value (in this case Review). It looks like I can find it in reponse but how do I parse this from the response which is an Assoc object.

Response object value is below.

Madhu.

A<1,?,'adminHelp'=false,'data'=A<1,?,'AttrAssoc'=<LL:Frame>{{fParent:#400346a}fAddedCategories:V{<'Name','Key'>},fAttrChangePrefix:'',fData:A<1,?,{4376,3}=A<1,?,'CustomID'=0,'ID'=1,'Values'={A<1,?,2=A<1,?,'ID'=2,'Values'={'Attested'}>,3=A<1,?,'ID'=3,'Values'={false}>,4=A<1,?,'ID'=4,'Values'={false}>,5=A<1,?,'ID'=5,'Values'={false}>>}>>,fDefID:?,fDefinitions:A<1,?,{4376,3}=A<1,?,'Children'={A<1,?,'DisplayName'='Status','FixedRows'=true,'ID'=2,'MaxRows'=1,'NumRows'=1,'Required'=false,'Search'=true,'Type'=10,'ValidValues'={'Active','Review','Attested'}>,A<1,?,'DisplayName'='Steward Sign Off','FixedRows'=true,'ID'=3,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>,A<1,?,'DisplayName'='Attestor Sign Off','FixedRows'=true,'ID'=4,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>,A<1,?,'DisplayName'='ESignature','FixedRows'=true,'ID'=5,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>},'DisplayName'='EBinder','FixedRows'=true,'ID'=1,'MaxRows'=1,'Name'='EBinder','NextID'=6,'NumRows'=1,'Required'=false,'Type'=-18,'ValueTemplate'=A<1,?,'CustomID'=0,'ID'=1,'Values'={A<1,?,2=A<1,?,'ID'=2,'Values'={'Attested'}>,3=A<1,?,'ID'=3,'Values'={false}>,4=A<1,?,'ID'=4,'Values'={false}>,5=A<1,?,'ID'=5,'Values'={false}>>}>>>,fDeletedCategories:V{<'Name','Key'>},fID:4587,fNoPermData:?,fPrgCtx:#41d61b1,fUserData:?,fValueChanges:V{<'Key','Old','New'><'EBinder[1].Status[1]','Attested','Attested'><'EBinder[1].Steward Sign Off[1]',false,false><'EBinder[1].Attestor Sign Off[1]',false,false><'EBinder[1].ESignature[1]',false,false>},fVerNum:1}</LL:Frame>,'AttrData'=A<1,?,{4376,3}=A<1,?,'CustomID'=0,'ID'=1,'Values'={A<1,?,2=A<1,?,'ID'=2,'Values'={'Attested'}>,3=A<1,?,'ID'=3,'Values'={false}>,4=A<1,?,'ID'=4,'Values'={false}>,5=A<1,?,'ID'=5,'Values'={false}>>}>>,'AttrDefinition'=A<1,?,{4376,3}=A<1,?,'Children'={A<1,?,'DisplayName'='Status','FixedRows'=true,'ID'=2,'MaxRows'=1,'NumRows'=1,'Required'=false,'Search'=true,'Type'=10,'ValidValues'={'Active','Review','Attested'}>,A<1,?,'DisplayName'='Steward Sign Off','FixedRows'=true,'ID'=3,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>,A<1,?,'DisplayName'='Attestor Sign Off','FixedRows'=true,'ID'=4,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>,A<1,?,'DisplayName'='ESignature','FixedRows'=true,'ID'=5,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>},'DisplayName'='EBinder','FixedRows'=true,'ID'=1,'MaxRows'=1,'Name'='EBinder','NextID'=6,'NumRows'=1,'Required'=false,'Type'=-18,'ValueTemplate'=A<1,?,'CustomID'=0,'ID'=1,'Values'={A<1,?,2=A<1,?,'ID'=2,'Values'={'Attested'}>,3=A<1,?,'ID'=3,'Values'={false}>,4=A<1,?,'ID'=4,'Values'={false}>,5=A<1,?,'ID'=5,'Values'={false}>>}>>>,'AttrGroupNames'={{{4376,3},'EBinder'}},'AttrKey'={4376,3},'AttrOrder'={{4376,3}},'Content'=A<1,?,'RootSet'=A<1,?,'Children'={A<1,?,'DisplayName'='Status','FixedRows'=true,'ID'=2,'MaxRows'=1,'NumRows'=1,'Required'=false,'Search'=true,'Type'=10,'ValidValues'={'Active','Review','Attested'}>,A<1,?,'DisplayName'='Steward Sign Off','FixedRows'=true,'ID'=3,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>,A<1,?,'DisplayName'='Attestor Sign Off','FixedRows'=true,'ID'=4,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>,A<1,?,'DisplayName'='ESignature','FixedRows'=true,'ID'=5,'MaxRows'=1,'NumRows'=1,'Search'=true,'Type'=5>},'DisplayName'='EBinder','FixedRows'=true,'ID'=1,'MaxRows'=1,'Name'='EBinder','NextID'=6,'NumRows'=1,'Required'=false,'Type'=-18,'ValueTemplate'=A<1,?,'CustomID'=0,'ID'=1,'Values'={A<1,?,2=A<1,?,'ID'=2,'Values'={'Attested'}>,3=A<1,?,'ID'=3,'Values'={false}>,4=A<1,?,'ID'=4,'Values'={false}>,5=A<1,?,'ID'=5,'Values'={false}>>}>>>,'NodeRec'=R<'OwnerID'=-2000,'DataID'=4587,'ParentID'=5259,'OriginOwnerID'=0,'OriginDataID'=0,'UserID'=1000,'GroupID'=1001,'UPermissions'=16777215,'GPermissions'=36995,'WPermissions'=36995,'SPermissions'=16777215,'PermID'=?,'Name'='ACL_FY_07_Q1','DataType'=?,'SubType'=144,'DCategory'=?,'CreateDate'=D/2007/3/14:14:39:16,'ModifyDate'=D/2007/3/19:18:43:50,'ExAtt1'=?,'ExAtt2'=?,'Reserved'=0,'ReservedBy'=0,'ReservedDate'=?,'Ordering'=?,'VersionNum'=1,'FileName'='TLS Phase 1 Business Requirements.doc','FileType'='doc','DataSize'=410624,'ResSize'=0,'ChildCount'=0,'Items'=0,'MimeType'='application/msword','Permissions'=-2130706433,'AssignedTo'=?,'Status'=?,'Priority'=?,'GIF'=?,'Catalog'=0>>,'error'=A<1,?,'detail'=?,'message'=?,'prefix'=X<WEBNODE_ERRMSG.ErrorProcessingRequest>>,'filename'=?,'headers'=?,'location'=?,'menuArgs'='','menuSet'='','mimeType'='application/octet-stream','styleSheetFiles'={},'webScript'='C:\\OPENTEXT\\module\\webattribute_1_0_0\\html\\attrvaluesedit2.html'>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top