Get Lifecycle tasks programatically
Hi,
I need to complete current state task of an entity instance programatically, using html5 sdk.
Is there a way to get the task given the lifecycle instance identifier, please advise:
I need to complete current state task of an entity instance programatically, using html5 sdk.
Is there a way to get the task given the lifecycle instance identifier, please advise:
$.cordys.workflow.getTasks({ parameters: { TaskIdentifiers: { TaskIdentifierType: { "@id": "000C29F4-D700-A1EA-A640-9099FAE6C372" } } }}). done(function(tasks) { console.log(tasks); });
0
Comments
-
You can add the web service building block on the LifecycleTask child entity. You could then use the Find web service on either the main entity or the Lifecycle identifier.
0 -
I can now get the Lifecycle Task instance, by 'find' webservice, but there's no details about the workflow task.
I get the error:
The request did not process successfully due to missing data. The "ClaimTask" request expects "TaskId" at "ClaimTask/TaskId"<data>
<wstxns1:findEDCTaskResponse xmlns:wstxns1="http://schemas/BASSEGASProject/Application.LifecycleTask/operations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <wstxns2:LifecycleTask xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wstxns1="http://schemas/BASSEGASProject/Application.LifecycleTask/operations" xmlns:wstxns2="http://schemas/BASSEGASProject/Application.LifecycleTask" xmlns="http://schemas/BASSEGASProject/Application.LifecycleTask"> <LifecycleTask-id xmlns="http://schemas/BASSEGASProject/Application.LifecycleTask"> <Id>327686</Id> <Id1>16401</Id1> <ItemId>000C29A9BAFCA1E9BDF48AC10BA00375.327686</ItemId> <ItemId1>000C29A9BAFCA1E9BE2541F1317F0375.327686.16401</ItemId1> </LifecycleTask-id> <ParentEntity xmlns="http://schemas/BASSEGASProject/Application.LifecycleTask"> <wstxns3:Application-id xmlns:wstxns3="http://schemas/BASSEGASProject/Application" xmlns="http://schemas/BASSEGASProject/Application"> <Id xmlns="http://schemas/BASSEGASProject/Application">327686</Id> <ItemId xmlns="http://schemas/BASSEGASProject/Application">000C29A9BAFCA1E9BDF48AC10BA00375.327686</ItemId> </wstxns3:Application-id> </ParentEntity> </wstxns2:LifecycleTask> </wstxns1:findEDCTaskResponse> </data>
0 -
It looks like it worked correctly; the ItemId1 contains the identifier of your only task for that entity. If you had multiple tasks for that entity, the LifecycleTask element would have repeated.
You can now use the read operation from the web service building block to get any information you need about that task.
1 -
I am trying to do a similar feat with a Find operation on the LifecycleTask, calling from a BPM which is called by a Rule on that LifecycleTask.
I don't know what property on the filter to use. What is passed to the BPM by the rule that can be used to get the task, then read? I could call a service on the parent entity but there is no guarantee I will get the correct task.0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 117 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management