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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

WF Expression to auto create discussion topics and postings

dwilliams
6-Contributor

WF Expression to auto create discussion topics and postings


Hello,
I am hoping someone out there can help me out with yet another possibly simple workflow expression. Now that we have started using the discussion forums in the ECR process, we have found a need to have pre-populated topics and postings. I am hoping that you can help me create the following workflow expressions:

Workflow expression that creates a topic in the discussion forum of the ECR. Let's call the topic "Topic1" for now.
Workflow expression that creates an initial posting to the previously created topic. Let's call the posting "Posting1".

Any help that you can provide is greatly appreciated.

Thanks for your time,
Dax Williams
Business Administrator
Lifetime Products
-<">mailto:->

1 REPLY 1
avillanueva
22-Sapphire I
(To:dwilliams)



//Add forum posting with comments

DiscussionForum forum=NmPostingCommands.getForumFromOid(workitem);

DiscussionTopic topic=NmPostingCommands.service.getTopic(forum,s11);

if (topic == null)

{

topic = DiscussionTopic.newDiscussionTopic(s11, forum);

topic =
ForumHelper.service.saveTopic((DiscussionTopic)topic);

}

String voteaction=new String(");

if (getContextAction().equals("UserTask1"))

voteaction=properties.getProperty("voteAction").toUpperCase();

else if (getContextAction().equals("UserTask2"))

{

voteaction=properties.getProperty("WfUserEvent0").toUpperCase();

}

DiscussionPosting posting =
DiscussionPosting.newDiscussionPosting(workitem.getRole().getDisplay()+"
:"+voteaction, s12, topic);

posting = ForumHelper.service.savePosting(posting);

//End of forum posting



Looks like this after a signoff task.


Top Tags