Reject a Task using DFC
Hi,
I have a workflow which contains a Reject Flow (the red arrow on designer) and a regular flow on a task (let's say task X).
I want to reject this task using DFC. However, the "reject" is not one of the operations that IDfWorkitem handle.
So, how can I make this operation? Is there a query or a DFC method for doing this operation?
Thanks,
Tagged:
0
Comments
-
Thanks, @DCTM_GuruI found something (http://www.javablog.fr/dctm-java-useful-dfc ) and I believe it works.Following code, takes the queue item's object id as input and rejects the task.
</code><code>public int rejectTask(String qitemId){<br> IDfSession session = null;<br><br> try{<br> session = getSession();<br> <br> IDfQueueItem qitem = (IDfQueueItem) session.getObject(new DfId(qitemId));<br> IDfWorkitem witem = qitem.getWorkitem();<br><br> if(witem != null){<br> if(witem.getRuntimeState() == 0)<br> witem.acquire();<br><br> IDfList activities = wi.getRejectActivities();<br> IDfList list = new DfList();<br> list.append(activities.get(0));<br> wi.setOutputByActivities(list);<br> wi.complete(); <br><br> return 0;<br> }<br><br> return 1;<br><br> }<br> catch(Exception e) {<br> e.printStackTrace();<br> return -1; <br> }<br>}
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
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management