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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Category attached to a document which is attached to a Workflow

Status
Not open for further replies.

hanreb

Technical User
Jan 23, 2008
90
US
Hi,

I have a workflow to which a document is attached.

When the Approver approves the WF, there is a status attribute in the category, which is attached to the document in the workflow, which needs to be updated with the value “Approved”

How do I achieve this ?



I appreciate your help.

Thanks,

Sunu


 
With the Item handler, I am able to update the value of an attribute that is attached to a map, with the value of an attribute in a category which is attached to a document.

I am looking forward to achive the opposite, ie. the value of the attribute attached to the WF map , need to be updated to the attribute value of a category that is attached to a document.

Thanks for your help.

-Sunu
 
One more time you want to do
:A document attribute needs to be mapped to a workflow attribute.I would probably work like this if I was tasked to do this.I thought itemhandler could do both I could be mistaken.


Your options are

Easiest:An oscript event script step
Easier:Lapi you have to iterate the workflow dats structure and manipulate.since this is done thru lapi you have to do it behind the scenes because the user may not see it like a synchronous change as in an event script.

If you are absolutely new to oscript then you should try to learn it by doing the "addressbook" module or attend SDK training.Once you understand oscript then you can do simple event scripting.I wrote some documentation here if you want to take a look


it does not show you how to access the attachments volume because OT includes that as a freebie code.you can expand on that if you choose that route.There is excellent hand holding code within the event scripts area in livelink.

If you decide to do it with lapi,I will tell you the psuedo code.A workflow step is information in a bunch of different tables so lapi exposes that as a simple data structure.It is the same for lapi and oscript.A accessworkpackage gives you in index 1(print out the loop) the dataid of the attachments volume.At this point if you do a ListObjects on that you will get the nodes in that.You again have to find the cat/atts on those documents and when you found what you have looking for put that value in the attributes recarray which is at index 3.Finally after you do all this you call UpdateWorkPackage which will reflect the changes.

Let me know if this is very challenging or not understandable.I can't promise much but I may be able to do some research if I know what exactly you are trying to accomplish.

I would strongly urge you to see if XMLworkflowextensions
could work for you as well.

Good luck




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

Certified OT Developer and probably certfiable
 
Thanks for your suggestions. I am not sure if I have enough time to touch on areas which I is very new to me, like oScript, eventscript etc. I need to complete development by October 10th.
LAPi is fine. Will look into the areas that you recommended for the next task.

One more question that I have in this direction is when the user clicks the approve button in the Work flow, I want to capture the time stamp when the approval was made and add it as a metadata into the category that is attached to the document.How can I set that current system time ?

Thanks for your help.
-Sunu
 
if you can't do event script then use a form to front end the workflow.using javascript date/time then you should be able to approximate the time strictly using client side programming

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

Certified OT Developer and probably certfiable
 
I could not access the link that you had posted for some documentation.
Gave error saying not enough permissions.
Looks like I need to learn event script. Can I get all the pointers for a starter ?

e do not have XML Workflow extension ?
Any idea if it is freely dowloadable.

-Sunu
 
Ok. I think I can install XML Workflow extensions. Will get back to you if I have a problem
Thank You,
sunu
 
I tried XML Workflow extensions.
With that I am able to get the date and even the hour.
But I need the timestamp.Will I be able to get the minute and second also ??

Thanks,
Sunu
 
Hello,

The reason why I was not able to get the minute and second is bcos in Date datatype of the attribute that is attached to the category, it accomodates only the hour, not the minute and second. Is there any settings that I could change in the attribute date data type, which could accomodate for the minute and seconds.

Thanks,
Sunu
 
in my livelink when I use a date type attribute for workflow or category I see a "Include time field"

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

Certified OT Developer and probably certfiable
 
Yes. I have done that. That is how I get the hour. But it does not store the minute and seconds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top