Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
WFM - PreProcessor Commands
mstradling
Hi,
Has anyone had any luck with Workflow Modeler and PreProcessor commands?
I'm trying to dynamically assign users to a review task (Group task-type) which should be straight forward...
The code seems to run but the /Instance/ModelInstance/****.ipm still only has the single user defined in the WFModel it's self...
Code Snippet
[html]
public class PreProcessWorkflow implements InProcessJavaCommand {
public WFMWorkflow execute(WFMWorkflow workflow, Map params) {
try {
WFMTask[] tasks = workflow.getTasks();
for(int i=0;i if (tasks
.getName().equals("Group Task")) {
WFMGroupTaskImpl groupTask = (WFMGroupTaskImpl) tasks
;
List < String > userList = new ArrayList < String > ( );
userList.add("A_User");
userList.add("DOMAIN\\A_User");
groupTask.addSharedByUsers(userList);
}
}
} catch (Exception e) {
} finally {
}
return workflow;
}
}
[/html]
Environment
TeamSite 6.7.1SP1 Windows 2003 Server
Anyone had any luck with WFMGroupTaskImpl.addShardByUsers()?
Find more posts tagged with
Comments
Bill Klish
We have used them successfully, but their abilities are somewhat limited.
I will try your code and see if it works on my system and get back to you.