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
Hi All,
I am trying to create a doc which needs to be approved by at least 4 department. WorkFlow stuff is easy but my issue comes with two things.
1st issue: Creator needs to pick (Drop down or radio button) a route for this doc. Not sure how i can implement a condition routing during a work flow.
2nd issue: one of the approving role (department) need to attached (Required) doc. so how can i make this mandatory for that Role?
Hi Imtiyaz,
For your 1st issue,
You can use an activity's Routing tab with Routing type Manual or Manual Exclusive.
For your 2nd issue,
In Activity's Transition tab for complete event you can write a code to check whether there is any doc attached (primary or secondary) with the PBO.
If not throw an Exception with a message.
When the user will Complete the task then the code will execute.
Thanks & Regards,
Kaushik
Kaushik,
would you be able to write that code for 2nd issue?
Hi Imtiyaz,
QueryResult qr2 = AttachmentsHelper.service.getAttachments(persistable, ContentRoleType.SECONDARY);
//If size of qr2 is zero that mean it has no secondary attachment
ContentHelper.service.getPrimaryContent(ObjectReference.newObjectReference(persistable));
//Returns null means no primary object
In your case the persistable object is nothing but your PBO which is a WTDocument I guess.
In workflow you have to write fully qualified class name.
Thanks & Rehards,
Kaushik
Kaushik,
I have never done this before. do you think you can help me out?