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

Workflow Task Instructions through LAPI

Status
Not open for further replies.

ShishirDwivedi

Programmer
May 9, 2010
8
JP
Hi,
I am using LAPI to execute Livelink Workflows.
The workpackage we work with does not contain the instructions assosiated with any perticular task. The instructions are present as a part of the workflow map. But the problem is, we don't have access to the workflow map when we want to execute a perticular task. We have the workId, subworkId and the taskId using which we can only obtain the workpackage and not the map.
Is there any way to get the instructions for a given task when we have only the workId, subworkId and taskId to work with?
 
Post a sample map ( a simple 1,2,3 step map) and where you find the instruction.I can take a look in my spare time.wmap has a record for every executing workflow,would you be willing to find that info from there if there is no direct lapi method.

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,Livelink ECM Champion 2008
 
I tried using the oscript methods. But i was unable to find the right way.
The WAPI class has a method called AllocNthMapTask which takes a WAPIMAP object and task id as parameters.
To create this WAPIMAP object i used the AllocMap method of WAPI class which takes WAPISESSION object as parameter.
To get this WAPISession object i used the .fPrgSession.Wsession() method.

Object session = .fPrgSession.WSession()

WAPIMAP map = WAPI.AllocMap(session.fSession)
WAPIMAPTASK task = WAPI.AllocNthMapTask(map, taskId)
task.pInstructions

But even doing all this doesn't work. And understandably so. Because the session will not know which map (there could be so many workflow maps in my workspace) is being referred. So
WAPI.AllocMap(session.fSession) will probably return an empty WAPIMAP handle in my opinion.
So automatically WAPI.AllocNthMapTask(map, taskId) is returning an empty task handle.

Also, i don't know what the taskId here means. I am passing it as 1. Generally a task instance is identified uniquely by three params - workId, subworkId and taskId. the taskId in most cases is 1. So i am passing the same.

I know i am doing it all wrong but i don't know how else to go about it.
Hope you can shed some light.

Here's the sample map for your reference.




utf8{6,0,{{'MAPINFO','TASKS','LINKS','WORK_PACKAGES'},{{-109,{{'INITIATECB','COMPLETECB','DELETECB','SUSPENDCB','RESUMECB','STOPCB','ARCHIVECB','PAINTER','FLAGS','TITLE','DESCRIPTION','INSTRUCTIONS','PRIORITY','PROJECT','MANAGERID','DUEDURATION','DUEDATE','DUETIME','STARTDATE','TYPE','SUBTYPE','USERFLAGS','PROMPT','USERDATA','EXATTS','CUSTOMDATA','MAPOBJID'},{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{2,36},{-1,'Shishir_test_workflow'},{-1,''},{0,?},{0,?},{0,?},{2,0},{0,?},{0,?},{0,?},{0,?},{2,1},{2,1},{-110,{{'ID','FLAGS','TYPE','NAME'},{}}},{5,false},{0,?},{-18,{{'CustomMsg','LL_Role','MaxTaskID'},{{-1,'Review process starts'},{0,?},{2,21}}}},{-18,{{},{}}},{2,97904}}}},{-110,{{'SUBMAPID','PERFORMERID','INITIATECB','COMPLETECB','READYCB','DONECB','KILLCB','RESURRECTCB','PERFORMERCB','SUBMAPIDCB','CONDITIONCB','CONDITION','FORM','PAINTER','DUEDURATION','DUEDATE','DUETIME','FLAGS','TITLE','DESCRIPTION','STARTDATE','INSTRUCTIONS','PRIORITY','TYPE','SUBTYPE','USERFLAGS','TASKID','WORKPKGINFO','USERDATA','EXATTS','CUSTOMDATA'},{{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{}},{-2,{}},{-2,{6,5,3,2}}}}},{-2,{(23,303),'Customer'}},{0,?},{0,?},{0,?},{0,?},{-1,'Customer'},{0,?},{0,?},{-1,'1. Attach the document on the Attachments tab.\r\n2. Type any comments on the Comments tab.\r\n3. Update the File Attached attribute on the Attributes tab.'},{0,?},{2,1},{2,100},{0,?},{2,1},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{-18,{{'Display'},{{2,1}}}},{-18,{{'SetDueDate','Signature'},{{5,false},{2,0}}}},{-18,{{},{}}}},{{0,?},{2,4533},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{}},{-2,{6,5,3,2}},{-2,{}}}}},{-2,{(117,301),?}},{2,172800},{0,?},{0,?},{2,128},{-1,'FAM'},{0,?},{0,?},{-1,'1. Review and edit this document.\r\n2. Attach the edited version as a new document.\r\n3. Update the Document Approved attribute.\r\n4. Update the File Attached attribute.\r\n5. Type additional comments on the Comments tab.'},{2,50},{2,1},{2,101},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,2},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags','PerformerData'},{{-1,'Concensus'},{5,false},{2,0},{0,?}}}},{-18,{{},{}}}},{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-2,{A<1,?,'ExpressionData'={A<1,?,'Key'='{1,3}','Operand'='3','Operator'='=','Value'=true>},'Steps'={}>}},{0,?},{0,?},{-2,{(328,299),'In Scope?'}},{0,?},{0,?},{0,?},{2,129},{-1,'In Scope?'},{0,?},{0,?},{0,?},{0,?},{2,1},{2,102},{0,?},{2,3},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{},{}}},{-18,{{},{}}}},{{0,?},{2,80264},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{}},{-2,{6}},{-2,{5,3,2}}}}},{-2,{(524,312),?}},{2,172800},{0,?},{0,?},{2,128},{-1,'SME'},{0,?},{0,?},{-1,'1. Review and edit this document.\r\n2. Attach the edited version as a new document.\r\n3. Update the Document Approved attribute.\r\n4. Update the File Attached attribute.\r\n5. Type additional comments on the Comments tab.'},{2,50},{2,1},{2,101},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,5},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags','PerformerData'},{{-1,'Concensus'},{5,false},{2,0},{0,?}}}},{-18,{{},{}}}},{{0,?},{2,6026},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{}},{-2,{6}},{-2,{5,3,2}}}}},{-2,{(707,309),?}},{2,172800},{0,?},{0,?},{2,128},{-1,'FARB'},{0,?},{0,?},{-1,'1. Review and edit this document.\r\n2. Attach the edited version as a new document.\r\n3. Update the Document Approved attribute.\r\n4. Update the File Attached attribute.\r\n5. Type additional comments on the Comments tab.'},{2,50},{2,1},{2,101},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,6},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags','PerformerData'},{{-1,'Concensus'},{5,false},{2,0},{0,?}}}},{-18,{{},{}}}},{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-2,{A<1,?,'ExpressionData'={A<1,?,'Key'='{1,3}','Operand'='6','Operator'='=','Value'=true>},'Steps'={}>}},{0,?},{0,?},{-2,{(601,310),'Evaluate'}},{0,?},{0,?},{0,?},{2,129},{-1,'Evaluate'},{0,?},{0,?},{0,?},{0,?},{2,1},{2,102},{0,?},{2,8},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{},{}}},{-18,{{},{}}}},{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-2,{A<1,?,'ExpressionData'={A<1,?,'Key'='{1,3}','Operand'='6','Operator'='=','Value'=true>},'Steps'={}>}},{0,?},{0,?},{-2,{(790,311),'Evaluate'}},{0,?},{0,?},{0,?},{2,129},{-1,'Evaluate'},{0,?},{0,?},{0,?},{0,?},{2,1},{2,102},{0,?},{2,9},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{},{}}},{-18,{{},{}}}},{{0,?},{2,0},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{2,3}},{-2,{}},{-2,{}}}}},{-2,{(895,311),?}},{2,86400},{0,?},{0,?},{2,128},{-1,'Approved'},{0,?},{0,?},{-1,'Save the approved document in the Approved Documents folder in\r\nthe Marketing Project.'},{2,50},{2,1},{2,104},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,10},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags'},{{0,?},{5,false},{2,0}}}},{-18,{{},{}}}},{{0,?},{2,0},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{6,5,3,2}},{-2,{}},{-2,{}}}}},{-2,{(664,224),?}},{2,172800},{0,?},{0,?},{2,128},{-1,'Initiator Revision'},{0,?},{0,?},{-1,'1. Review the changes in the document and edit as needed.\r\n2. Attach the revised document on the Attachments tab.\r\n3. Update the File Attached attribute on the Attributes tab.'},{2,50},{2,1},{2,104},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,11},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags'},{{0,?},{5,false},{2,0}}}},{-18,{{},{}}}},{{0,?},{2,0},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{6,5,3,2}},{-2,{}},{-2,{}}}}},{-2,{(848,224),?}},{2,172800},{0,?},{0,?},{2,128},{-1,'Initiator Revision'},{0,?},{0,?},{-1,'1. Review the changes in the document and edit as needed.\r\n2. Attach the revised document on the Attachments tab.\r\n3. Update the File Attached attribute on the Attributes tab.'},{2,50},{2,1},{2,104},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,12},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags'},{{0,?},{5,false},{2,0}}}},{-18,{{},{}}}},{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-2,{A<1,?,'ExpressionData'={A<1,?,'Key'='{1,3}','Operand'='5','Operator'='=','Value'=true>},'Steps'={}>}},{0,?},{0,?},{-2,{(419,240),'APL?'}},{0,?},{0,?},{0,?},{2,1},{-1,'APL?'},{0,?},{0,?},{0,?},{0,?},{2,1},{2,102},{0,?},{2,15},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{},{}}},{-18,{{},{}}}},{{0,?},{2,0},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{6,5,3,2}},{-2,{}},{-2,{}}}}},{-2,{(342,177),?}},{2,86400},{0,?},{0,?},{2,128},{-1,'Approved'},{0,?},{0,?},{-1,'Save the approved document in the Approved Documents folder in\r\nthe Marketing Project.'},{2,50},{2,1},{2,104},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,16},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags'},{{0,?},{5,false},{2,0}}}},{-18,{{},{}}}},{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-2,{A<1,?,'ExpressionData'={A<1,?,'Key'='{1,3}','Operand'='2','Operator'='=','Value'=true>},'Steps'={}>}},{0,?},{0,?},{-2,{(417,372),'Pre Approved?'}},{0,?},{0,?},{0,?},{2,1},{-1,'Pre Approved?'},{0,?},{0,?},{0,?},{0,?},{2,1},{2,102},{0,?},{2,17},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{},{}}},{-18,{{},{}}}},{{0,?},{2,0},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{6,5,3,2}},{-2,{}},{-2,{}}}}},{-2,{(515,407),?}},{2,86400},{0,?},{0,?},{2,128},{-1,'Approved'},{0,?},{0,?},{-1,'Save the approved document in the Approved Documents folder in\r\nthe Marketing Project.'},{2,50},{2,1},{2,104},{-18,{{'DispositionDefault','Dispositions','Permissions'},{{2,1},{-2,{'Approve','Reject'}},{2,2}}}},{2,18},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'DispoChoice','EnableEmail','GroupFlags'},{{0,?},{5,false},{2,0}}}},{-18,{{},{}}}},{{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-2,{A<1,?,'ExpressionData'={A<1,?,'Key'='{1,3}','Operand'='6','Operator'='=','Value'=true>},'Steps'={}>}},{0,?},{0,?},{-2,{(225,254),'Evaluate'}},{0,?},{0,?},{0,?},{2,1},{-1,'Evaluate'},{0,?},{0,?},{0,?},{0,?},{2,1},{2,102},{0,?},{2,20},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{},{}}},{-18,{{},{}}}},{{0,?},{2,0},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{0,?},{-18,{{'1_3_Instructions','NONEDITABLE_ATTRIBS','REQUIRED_ATTRIBS','VISIBLE_ATTRIBS'},{{-1,''},{-2,{6,5,3,2}},{-2,{}},{-2,{}}}}},{-2,{(220,135),?}},{0,?},{0,?},{0,?},{2,128},{-1,'Initiator revision'},{0,?},{0,?},{-1,''},{2,50},{2,1},{2,104},{0,?},{2,21},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{}}},{0,?},{-18,{{'EnableEmail','GroupFlags'},{{5,false},{2,0}}}},{-18,{{},{}}}}}}},{-110,{{'FROMTASK','TOTASK','LINKTYPE'},{{{2,4},{2,6},{2,0}},{{2,5},{2,7},{2,0}},{{2,6},{2,9},{2,16}},{{2,6},{2,5},{2,15}},{{2,7},{2,10},{2,16}},{{2,7},{2,8},{2,15}},{{2,1},{2,2},{2,0}},{{2,10},{2,5},{2,17}},{{2,9},{2,4},{2,17}},{{2,3},{2,11},{2,15}},{{2,11},{2,4},{2,16}},{{2,3},{2,12},{2,16}},{{2,11},{2,13},{2,15}},{{2,13},{2,14},{2,15}},{{2,2},{2,15},{2,0}},{{2,15},{2,3},{2,15}},{{2,15},{2,16},{2,16}},{{2,16},{2,2},{2,17}},{{2,13},{2,4},{2,16}}}}},{-110,{{'TYPE','SUBTYPE','USERDATA','DESCRIPTION'},{{{2,1},{2,2},{-2,{}},{0,?}},{{2,1},{2,3},{-18,{{'AttrAssoc','BuildInstruction','Content','Version'},{{-18,{{'fAttrChangePrefix','fValueChanges'},{{-1,''},{-110,{{'Key','Old','New'},{{{-1,'Attributes[1].Document Approved[1]'},{5,false},{5,false}},{{-1,'Attributes[1].File Attached[1]'},{0,?},{5,false}},{{-1,'Attributes[1].Document Approved[1]'},{5,false},{5,false}},{{-1,'Attributes[1].File Attached[1]'},{5,false},{5,false}},{{-1,'Attributes[1].Test_att[1]'},{0,?},{0,?}},{{-1,'Attributes[1].In scope?[1]'},{5,false},{5,false}},{{-1,'Attributes[1].Pre Approved?[1]'},{5,false},{5,false}},{{-1,'Attributes[1].In approved parts list?[1]'},{5,false},{5,false}},{{-1,'Attributes[1].Approved[1]'},{0,?},{5,false}}}}}}}},{-1,X<WEBWFP_HTMLLABEL.AddAttributeItemsMsg>},{-18,{{'RootSet'},{{-18,{{'Children','DisplayName','FixedRows','ID','MaxRows','Name','NextID','NumRows','Type','ValueTemplate'},{{-2,{A<1,?,'DisplayName'='In scope?','FixedRows'=true,'ID'=3,'MaxRows'=1,'Name'='In_scope_','NumRows'=1,'Search'=false,'Type'=5>,A<1,?,'DisplayName'='Pre Approved?','FixedRows'=true,'ID'=2,'MaxRows'=1,'Name'='Pre_Approved_','NumRows'=1,'Search'=false,'Type'=5>,A<1,?,'DisplayName'='In approved parts list?','FixedRows'=true,'ID'=5,'MaxRows'=1,'Name'='In_approved_parts_list_','NumRows'=1,'Search'=false,'Type'=5>,A<1,?,'DisplayName'='Approved','FixedRows'=true,'ID'=6,'MaxRows'=1,'Name'='Approved','NumRows'=1,'Search'=false,'Type'=5>}},{-1,'Attributes'},{5,true},{2,1},{2,1},{-1,'Attributes'},{2,7},{2,1},{2,-18},{-18,{{'ID','Values'},{{2,1},{-2,{A<1,?,2=A<1,?,'ID'=2,'Values'={false}>,3=A<1,?,'ID'=3,'Values'={false}>,5=A<1,?,'ID'=5,'Values'={false}>,6=A<1,?,'ID'=6,'Values'={false}>>}}}}}}}}}}},{5,true}}}},{0,?}}}}}}},{A<1,?,'ID'=4533,'NAME'='shruti','TYPE'=0>,A<1,?,'ID'=80264,'NAME'='mark','TYPE'=0>,A<1,?,'ID'=6026,'NAME'='jackie','TYPE'=0>}}




Thanx
 
New Postappnair (Programmer)
2 Sep 10 14:02
As I said I do not have time to check it with oscript or lapi butI have for you figured out the instructions how it is laid out in the tables.I would test manaul running and test accuracy of the relation and then call this form lapi using a db query or livereport.



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,Livelink ECM Champion 2008

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,Livelink ECM Champion 2008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top