cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

I want to retrieve all task data like name, number, role, assignee, activity name, vote

@_1647
12-Amethyst

I want to retrieve all task data like name, number, role, assignee, activity name, vote

@avillanueva  

I have a custom utility on Promotion Notice and I want to retrieve all task data like name, number, role, assignee, activity name, vote, and comments as well. So, I  retrieved below data but i am I am STRUGGLING to get user comments and assignee name   while performing the "approve" task. of Poomotion Notice

I need a java API so that I can use it in my utility where I am getting other details .

 

I  know that i ill get required info from this class WfVotingEventAudit  but How can i get this from Promotion Notice

I used below  code in wf but getting class cast exception  :

wt.fc.collections.WTArrayList auditCol = (wt.fc.collections.WTArrayList) wt.workflow.engine.WfEngineHelper.service.getVotingEvents((wt.workflow.engine.WfProcess) ((wt.workflow.work.WfAssignedActivity) self.getObject()).getParentProcess(), null, null, null); System.out.println("***Transition Expression: Audit = " + auditCol.toString());

 

2 REPLIES 2
avillanueva
22-Sapphire II
(To:@_1647)

I did this slightly differently since I was using eSignature. This object has everything but you must enable the task to have signature required which forces users to have to enter password to complete. In my workflow, I use this code to copy the comments to a discussion forum associated with the promotion request or change object. 

               QueryResult result = PersistenceHelper.manager.navigate(promotion, SignatureLink.SIGNATURE_ROLE,SignatureLink.class,false);
			LOGGER.debug("Read in: " + result.size() + " Signatures");
			SignatureLink link = null;
			
			//Loop through the signatures
			while(result.hasMoreElements()) {
				link = (SignatureLink) result.nextElement();
				LOGGER.debug("Found " + link.getComments() + " comments");
				
				//Get user from signature
				QueryResult userLink = PersistenceHelper.manager.navigate(link.getSignature(),UserElectronicIDLink.USER_ROLE,UserElectronicIDLink.class);
                WTUser user = (WTUser)userLink.nextElement();
                LOGGER.debug("Got user: " + user.getFullName());
				
                //Get Comments
				String comments = link.getComments();
				if ((comments == null)||(comments.trim().isEmpty()))
		        {
		            LOGGER.debug("Caught case of no comments");
		            comments = "No comments entered.";
		        }
				
				//Get Vote
				String vote = link.getVote();
				LOGGER.debug("Got vote: " + link.getVote());
				
				//Get Role
				LOGGER.debug("Got role: " + link.getRole());
				String role = link.getRole();

 

Hello @@_1647,

 

It looks like you have a response from a community member. If it helped you solve your question please mark the reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.

Announcements


Top Tags