Hi All,
I have business requirement where I'm creating folders & content fragment using the workflow.
So, for this I created one custom process step where I'm getting ResourceResolver after execute method as below:
try(ResourceResolver rr = workflowSession.adaptTo(ResourceResolver.class)){
Resource cfModel = rr.getReource(cfmpath);
FragmentTemplate ft = cfModel.adaptTo(FragmentTemplate.class);
ContentFragment cf = ft.createFragment(folder, cfName, cfTitle);
}
This is working fine, but when I check CF's property jcr:createdBy="admin" is coming.
Instead, I want the user/account name who has triggered this workflow.
Could anyone please advise me as to how I get the desired result?
Many Thanks,
sesmic