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?
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,
QueryResult qr2 = AttachmentsHelper.service.getAttachments(persistable, ContentRoleType.SECONDARY);
//If size of qr2 is zero that mean it has no secondary attachment
//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,